Hajime Hoshi
e5e7ceb688
internal/graphicsdriver/opengl/gl: refactoring
2022-11-13 23:10:20 +09:00
Hajime Hoshi
144d2374bf
internal/graphicsdriver/opengl/gl: remove 'egl' build tag
...
Probably nobody uses this.
2022-11-13 22:50:21 +09:00
Hajime Hoshi
5b96d93d13
internal/graphicsdriver/opengl/gl: refactoring
2022-11-13 22:26:13 +09:00
Hajime Hoshi
78f8ddbda8
internal/graphicsdriver/opengl/gl: load OpenGLES.framework if possible on Darwin
...
Closes #2449
2022-11-13 19:51:43 +09:00
Hajime Hoshi
b6ed95750b
internal/graphicsdriver/opengl: unify context_gl.go and context_gles.go
...
Closes #2451
2022-11-13 19:42:21 +09:00
Hajime Hoshi
f69beffc6c
internal/graphicsdriver/opengl: bug fix: initialization was too early on Windows
...
Closes #2452
2022-11-13 18:00:40 +09:00
Hajime Hoshi
b536b82109
internal/graphicsdriver/opengl/gl: hide concrete context types
2022-11-13 17:13:52 +09:00
Hajime Hoshi
b66cf74c99
internal/graphicsdriver/opengl: bug fix: compile error
2022-11-13 16:16:19 +09:00
Hajime Hoshi
656a2d758e
internal/graphicsdriver/opengl: bug fix: compile error
2022-11-13 15:55:33 +09:00
Hajime Hoshi
8393211ed7
internal/graphicsdriver/opengl: bug fix: compile error
2022-11-13 15:44:15 +09:00
Hajime Hoshi
8c49c88b08
internal/graphicsdriver/opengl: refactoring
2022-11-13 15:27:37 +09:00
Hajime Hoshi
42566c6c9a
internal/graphicsdriver/opengl: refactoring: remove SetCanvas
2022-11-13 15:18:44 +09:00
Hajime Hoshi
a0a5f2b301
internal/graphicsdriver/opengl: remove SetGomobileGLContext
...
This change is needed to initialize the context at opengl.NewGraphics.
Updates #2451
2022-11-13 15:07:14 +09:00
Hajime Hoshi
5cfb7c9469
internal/graphicsdriver/opengl: make context_gles.go closer to context_gl.go
...
Updates #2451
2022-11-13 14:20:47 +09:00
Hajime Hoshi
0c5a77eaa4
internal/graphicsdriver/opengl/gles: integrate gles and glconst into gl
...
Updates #2451
2022-11-13 14:15:22 +09:00
Hajime Hoshi
c4abaa32f5
internal/graphicsdriver/opengl: initialize gl at init()
...
This changes context_gl.go a little closer to context_gles.go.
Updates #2451
2022-11-13 04:13:18 +09:00
Hajime Hoshi
bb30b85d29
internal/graphicsdriver/opengl/gl: simplify C code
2022-11-13 03:35:40 +09:00
Hajime Hoshi
879cf50aaf
internal/graphicsdriver/opengl: remove unused functions
2022-11-13 02:54:34 +09:00
Hajime Hoshi
fad9f1592c
internal/graphicsdriver/opengl/gles: remove unused functions
2022-11-13 02:45:53 +09:00
Hajime Hoshi
c5fb6fa23f
internal/graphicsdriver/opengl/gl: remove unused functions
2022-11-13 02:35:45 +09:00
Hajime Hoshi
1ecac8d834
all: allow integer uniform variables for Kage shaders
...
Closes #2305
Updates #2448
2022-11-13 01:49:24 +09:00
Hajime Hoshi
a406904a51
internal/graphicsdriver: refactoring
2022-11-12 21:03:54 +09:00
Hajime Hoshi
419bb4c1e9
all: use uint32 instead of float32 for uniform values
...
This is a preparation for other types of uniform values.
Updates #2305
2022-11-12 20:28:07 +09:00
Hajime Hoshi
0db2318a8d
internal/graphicsdriver/opengl: update comments
2022-11-12 19:31:16 +09:00
Hajime Hoshi
cee948048d
internal/graphicsdriver/opengl: remove unused functions
2022-11-12 19:28:14 +09:00
Hajime Hoshi
2deceaa0af
internal/graphicsdriver/directx: specify DX level 12
...
The DirectX initialization passed but crashed later on some old machines
supporting the feature level 11 but not 12.
This change fixes the issue by changing the required feature level from
11 to 12 so that the initialization fails and OpenGL is used as the
fallback.
Closes #2447
2022-11-12 12:25:24 +09:00
Hajime Hoshi
303965e1a9
all: remove unnecessary copying
...
Copying []byte to string should copy the data if necessary, as the
Go specification assures that strings are immutable.
2022-11-11 00:28:47 +09:00
Hajime Hoshi
097adcf8b6
internal/graphicsdriver/opengl/gl: reladn: refactoring
...
This is a reland of a1ad87a262
2022-11-09 21:02:31 +09:00
Hajime Hoshi
96298bb59d
Revert "internal/graphicsdriver/opengl/gl: refactoring"
...
This reverts commit a1ad87a262
.
Reason: compile error
2022-11-09 18:27:06 +09:00
Hajime Hoshi
a1ad87a262
internal/graphicsdriver/opengl/gl: refactoring
2022-11-09 16:07:30 +09:00
Hajime Hoshi
915fff96f8
all: reduce reflect usages
2022-11-09 13:24:31 +09:00
Hajime Hoshi
262ff351f4
internal/graphicsdriver/directx: bug fix: ScheduleFrameEventX might not return S_OK on Xbox One
2022-11-05 15:09:38 +09:00
Hajime Hoshi
a6e121613f
internal/graphicsdriver/directx: bug fix: wrong SDK version for Xbox One
2022-11-05 02:31:28 +09:00
Hajime Hoshi
d73e8f785d
internal/graphicsdriver: render various destination regions as one command
...
Closes #2232
2022-11-04 20:49:44 +09:00
Hajime Hoshi
1ce29e2afa
internal/graphicsdriver/directx: reduce rendering paths for even-odd rendering
2022-11-04 18:18:08 +09:00
Hajime Hoshi
0afb6fd22a
internal/graphicsdriver/metal: reduce rendering paths for even-odd rendering
2022-11-04 16:17:51 +09:00
Hajime Hoshi
384dee7160
internal/graphicscommand: remove unused uniform variables
...
This improves possibility of merging graphics commands by reducing
uniform variables.
Updates #2232
2022-11-03 22:45:17 +09:00
Artem Yadelskyi
10415d417a
all: replace interface{}
with any
( #2430 )
...
Closes #2429
2022-11-03 15:33:09 +09:00
Artem Yadelskyi
5b53cef59e
all: remove old // +build
comments ( #2431 )
...
Closes #2325
2022-11-03 12:55:14 +09:00
Hajime Hoshi
1b3696a7ff
internal/graphicsdriver/opengl: fix comments
2022-10-31 12:59:27 +09:00
Hajime Hoshi
a5993f09a2
internal/graphicscommand: refactoring: add preserved uniform variables at the graphicscommand package
...
This is a preparation to skip setting unnecessary uniform variables
like dstRegion.
Updates #2232
2022-10-30 22:30:52 +09:00
Hajime Hoshi
690e73c11b
all: replace reflect.SliceHeader with unsafe.Slice
...
Closes #2420
2022-10-30 12:25:30 +09:00
Hajime Hoshi
b019a3723a
internal/ui: optimize GPU usages when the screen doesn't have to be updated
...
This change skips rendering when 1) the screen is not cleared every frame
(`SetScreenClearedEveryFrame(false)`) and 2) Draw doesn't draw anything
onto the screen. The GPU usages decreased on some machines (e.g. GPU usage
was 10% with an empty Ebitengine project and became 2-3 % on a Windows
machine).
Updates #2341
2022-10-28 18:51:06 +09:00
Hajime Hoshi
2cf651bed8
internal/graphicsdriver/directx: resize the swap buffer chain at the end of a frame
...
Updates #2144
2022-10-25 00:35:09 +09:00
Nathan Levett
f220eb729c
internal/graphicsdriver/opengl: move OpenGL constants to seperate package ( #2408 )
...
Closes #2389
2022-10-24 23:22:14 +09:00
Hajime Hoshi
da5f5ea327
ebiten: add blend factors
...
Updates #2382
2022-10-18 00:21:13 +09:00
Hajime Hoshi
d2a99afa44
internal/graphicsdriver/opengl: bug fix: lastBlend was not updated correctly on GLES
2022-10-17 16:05:09 +09:00
Hajime Hoshi
46a218c278
internal/graphicsdriver/metal/mtl: bug fix: wrong renaming
...
Updates #2382
2022-10-17 01:11:54 +09:00
Hajime Hoshi
871a8869db
ebiten: bug fix: wrong renaming
...
Updates #2382
2022-10-17 01:00:23 +09:00
Hajime Hoshi
180e456a8e
ebiten: rename members of Blend
...
Updates #2382
2022-10-17 00:51:55 +09:00