Hajime Hoshi
878831b842
internal/graphicsdriver/opengl: Bug fix: compile error
2021-10-24 14:55:50 +09:00
Hajime Hoshi
a5198275fa
internal/graphicsdriver/opengl/gl: Remove an unused file
2021-10-24 14:46:38 +09:00
Hajime Hoshi
3f5d1762bb
internal/graphicsdriver/opengl: Return an error when initializing OpenGL fails
...
Updates #1838
2021-10-06 00:38:47 +09:00
Hajime Hoshi
58ea710a84
internal/affine: Rename UnsafeElements -> Elements as this is no longer unsafe
2021-09-04 18:08:27 +09:00
Hajime Hoshi
df710a5c63
internal/affine: Change UnsafeElements to take arguments
...
This will enable to suppress unnecessary array allocations in the
future.
Updates #1796
2021-09-04 17:38:30 +09:00
Hajime Hoshi
d1c764640d
internal/glfw, internal/graphicsdriver/opengl/gl: Use the last byte to detect a bool
...
When a C function returns a bool value, only the first byte of a
uintptr value matters. When we want to get a bool value from a C
function, filter this for sefety.
2021-08-25 02:09:55 +09:00
Hajime Hoshi
6c8a7d1079
internal/graphicsdriver/opengl: Bug fix: A location cache map must be reset when a program is deleted
...
Closes #1753
2021-08-15 04:54:20 +09:00
Hajime Hoshi
da08577095
internal/graphicsdriver/opengl: Refactoring
2021-08-14 04:05:18 +09:00
Hajime Hoshi
ce8fc39451
internal/graphicsdriver/opengl: Bug fix: the current program must be reset
...
Updates #1751
2021-08-13 23:44:30 +09:00
Hajime Hoshi
15ac69b8d5
internal/graphicsdriver/metal: Bug fix: Disable presentsWithTransaction on fullscreen
...
Closes #1745
2021-08-08 17:40:37 +09:00
Hajime Hoshi
8967384dac
internal/graphicsdriver: Bug fix: getting a WebGL2 context might fail even though WebGL2RenderingContext exists
...
Closes #1738
2021-08-01 22:00:47 +09:00
Hajime Hoshi
e4329d0349
internal/driver: Refactoring: Reduce dependencies on affine
2021-07-27 12:19:50 +09:00
Hajime Hoshi
21aa96f9f5
internal/affine: Refactoring: Make ColorM interface
2021-07-27 12:10:22 +09:00
Hajime Hoshi
7e5b259dd2
internal/affine: Use a pointer of an array for UnsafeElements
2021-07-26 21:19:53 +09:00
Hajime Hoshi
50d2d7ed61
internal/graphicsdriver/opengl: Remove unused code using PBO
...
Updates #1678
2021-07-14 21:51:27 +09:00
Hajime Hoshi
6213c17abc
internal/driver: Add Graphics.Initialize
2021-07-07 13:58:42 +09:00
Hajime Hoshi
38ce325958
internal/graphicsdriver/metal: Skip clearing the screen on Metal
2021-07-07 01:45:51 +09:00
Hajime Hoshi
daa883d799
ebiten: Bug fix: Stencil buffers should not be cleared until all the vertices are rendered
...
Updates #1684
2021-07-05 17:41:06 +09:00
Hajime Hoshi
b466a0cbd7
ebiten: Add EvenOdd to DrawTrianglesOptions and DrawShaderTrianglesOptions
...
Updates #844
Closes #1684
2021-07-05 03:35:55 +09:00
Hajime Hoshi
5c4d3325f6
internal/graphicsdriver/opengl: Add APIs for stencil buffers
...
Updates #1684
2021-07-05 00:24:44 +09:00
Hajime Hoshi
f6e210e086
internal/graphicsdriver/opengl: Refactoring: Remove redundant conversions
2021-07-03 22:39:48 +09:00
Hajime Hoshi
56f4e6b2d0
internal/graphicsdriver/opengl: Refactoring: Rename a variable
2021-07-03 02:41:37 +09:00
Hajime Hoshi
269ea7c489
internal/graphicsdriver/opengl: Refactoring: Reorder functions
...
glPixelStorei affects the result of glTexImage2D. This change makes
this fact more explicit.
2021-07-03 02:09:47 +09:00
Hajime Hoshi
ff2dd6fe7e
internal/graphicsdriver/opengl: Refactoring: Unify two drawTriangles* functions
2021-07-02 00:02:21 +09:00
Hajime Hoshi
e9b6237f61
internal/driver: Refactoring: Merge two Draw* functions
2021-07-01 15:55:48 +09:00
Hajime Hoshi
b9d52c0267
internal/driver: Change InvalidImageID/InvalidShaderID to 0
2021-07-01 14:58:55 +09:00
Hajime Hoshi
73bf1f36e5
internal/driver: Define InvalidImageID / InvalidShaderID
2021-07-01 13:56:42 +09:00
Hajime Hoshi
067e3c004d
Remove internal/web
2021-06-26 17:04:00 +09:00
Hajime Hoshi
8ff42f55a1
internal/graphicsdriver/opengl: Give up restorign on browsers
...
Using restorable images is expensive as this sometimes requires to
load pixels from GPU. On browsers, just reloading the application
should be fine when the context lost happens.
Closes #1603
2021-06-26 16:54:21 +09:00
Hajime Hoshi
2a8e8d0eb6
internal/graphicsdriver/opengl: Stop using PBO
...
PBO was introduced to improve the performance at ReplacePixels,
but we found that PBO can degrades the performance. Also, now
multiple glTexImage2Ds are called successively like a batch, so
the situation is now different from that time when PBO was
introduced.
Let's remove PBO usages and wait and see.
Closes #1678
2021-06-24 21:20:58 +09:00
Hajime Hoshi
7f60cd41eb
internal/graphicsdriver/opengl: Refactoring: Remove unused arguments from texSubImage2D
2021-06-24 12:06:28 +09:00
Hajime Hoshi
584c6524ee
internal/graphicsdriver/opengl: Refactring
2021-06-13 14:19:33 +09:00
Hajime Hoshi
b54ad73a2b
Add go:build comments with go1.17beta1 fmt
2021-06-11 01:11:46 +09:00
Hajime Hoshi
a627c41217
Remove support of Go 1.13 and Go 1.14
...
Updates #1258
Updates #1415
Updates #1462
2021-06-07 21:44:22 +09:00
Hajime Hoshi
6fe6543b4b
internal/graphicsdriver/opengl: Bug fix: getBufferSubData was available only with WebGL2
2021-04-06 00:11:51 +09:00
Hajime Hoshi
bd8367588e
internal/graphicsdriver/opengl: Prepare function objects by bind
...
Passing a Go string to the JS world is expensive. This change reduces
this cost by preparing function objects by bind.
Closes #1438
2021-04-05 23:53:21 +09:00
Hajime Hoshi
6b3c51921c
internal/driver: Remove Image.Sync
...
Syncing is no longer needed for Metal, and additionally, OpenGL's sync
implementation was mock.
Updates #1508
2021-02-26 23:16:28 +09:00
Hajime Hoshi
969964cb46
internal/graphicsdriver/opengl/gl: Bug fix: Remove unsafe reflect usage
...
Closes #1495
2021-02-14 21:27:30 +09:00
Hajime Hoshi
b8694aa66a
internal/graphicsdriver/opengl: Optimization
2021-01-26 00:45:17 +09:00
Hajime Hoshi
f77c514598
graphicsdriver/opengl: Refactoring
2021-01-05 02:07:30 +09:00
Hajime Hoshi
b7abde7f00
graphicsdriver/opengl: Bug fix: getBufferSubData did not work correctly on JS
2021-01-03 19:44:29 +09:00
Hajime Hoshi
7e32075abd
jsutil: Avoid creating Uint8Array when copying bytes from Go to JS
...
Updates #1435
2020-12-16 01:50:05 +09:00
Hajime Hoshi
49b86843c3
jsutil: Avoid creating Uint8Array at TemporaryUint8Array
...
Updates #1435
2020-12-16 01:21:13 +09:00
Hajime Hoshi
146357c298
jsutil: Enable to specify length at Uint8ArrayToSlice
2020-12-15 01:13:15 +09:00
Hajime Hoshi
e5c1151cc5
jsutil: Avoid creating Float32Array at TemporaryFloat32Array
...
Updates #1435
2020-12-15 00:40:43 +09:00
Hajime Hoshi
f440e368b3
graphicsdriver/opengl: Use WebGL2 API on go2cpp
2020-12-14 02:02:45 +09:00
Hajime Hoshi
718273c2d7
ebiten: Add a new shader function imageDstRegionOnTexture
...
Updates #1428
2020-12-09 11:36:29 +09:00
Hajime Hoshi
66d12722ae
graphicsdriver/opengl: Remove comments
2020-12-06 03:24:08 +09:00
Hajime Hoshi
2c31156a34
graphicsdriver/opengl: Reduce allocations of Float32Array on go2cpp
...
Updates #1426
2020-12-06 03:23:09 +09:00
Hajime Hoshi
d4a2433643
Revert "graphicsdriver/opengl: Reduce creation of Float32Array"
...
This reverts commit 3c28bcf3c4
.
Reason: Tests failed: https://github.com/hajimehoshi/ebiten/runs/1496602911
2020-12-04 12:10:15 +09:00