Commit Graph

1373 Commits

Author SHA1 Message Date
Hajime Hoshi
18d109e3df graphicsdriver/opengl/gl: Fix README 2018-12-09 04:41:43 +09:00
Hajime Hoshi
e8a1be7748 graphicsdriver/opengl: Use non-cgo gl package on Windows (#171)
This is a temporal fix until go-gl/glow#102 is applied.
2018-12-09 03:06:11 +09:00
Hajime Hoshi
2fd0daec10 ui: Fix comments 2018-12-04 03:10:54 +01:00
Hajime Hoshi
155ee828b8 Fix misspelling 2018-12-03 18:23:25 +01:00
Hajime Hoshi
f85a62c6a7 restorable: Rename dummyImage -> emptyImage 2018-12-01 21:49:41 +01:00
Hajime Hoshi
e537cb2c27 graphics: Bug fix: render source might not be initialized 2018-12-01 21:36:51 +01:00
Hajime Hoshi
3f75da5f35 restorable: Refactoring: Remove newImageWithoutInit 2018-12-01 21:36:51 +01:00
Hajime Hoshi
c6dd0a75d9 graphicscommand: Optimize replace-image calls
Now ReplacePixels command is called only when necessary.

This also ensures that DrawImage must be called after ReplacePixels
is called since there is a potential problem that rendering images
on a texture without initializing by replacing pixels might cause
problems (escpecially on Metal. Perhaps #593 might be related).
2018-12-01 21:36:47 +01:00
Hajime Hoshi
e799a0c6a8 shareable: Fix wrong variable names 2018-12-01 11:31:32 +01:00
Hajime Hoshi
247e4f5b6b restorable: Skip initializing the screen image 2018-11-30 00:19:52 +01:00
Hajime Hoshi
962a11468b restorable: Fix clearing logic
Fixes #740
2018-11-28 23:00:24 +01:00
Hajime Hoshi
1a54ff34e6 graphics: Forbid nil at ReplacePixels explicitly 2018-11-28 22:26:34 +01:00
Hajime Hoshi
1f538af440 restorable: Refactoring 2018-11-24 21:08:28 +09:00
Hajime Hoshi
d165673789 devicescale: Bug fix: Crash on Wine
GetWindowDC(0) doesn't work on Wine. Let that return an arbitrary
scale 1 in this case.

Fixes #738
2018-11-24 16:37:30 +09:00
Hajime Hoshi
b48d501bc0 graphics: Explicit limitation of indices at DrawTriangles
Fixes #728
2018-11-23 19:02:10 +09:00
Hajime Hoshi
62210c89f3 graphicsdriver/opengl: Add assertion at ReplacePixels 2018-11-18 02:09:44 +09:00
Hajime Hoshi
31f15bc5ad Revert "graphics: Change the number of floats for a vertex from 10 to 12"
This reverts commit 7586c660d5.
2018-11-18 00:07:15 +09:00
Hajime Hoshi
d8f337985d graphicsdriver/opengl: Refactoring 2018-11-17 22:40:21 +09:00
Hajime Hoshi
ef08e218c8 graphicsdriver/opengl: Refactoring: Remove framebuffer.projectionMatrix 2018-11-17 22:29:04 +09:00
Hajime Hoshi
14f5a03a79 Merge math and graphics packages 2018-11-17 20:23:12 +09:00
Hajime Hoshi
de745f00fa graphicsdriver/opengl: Refactoring: Improve logic to generate framebuffer 2018-11-17 19:49:30 +09:00
Hajime Hoshi
44d1b137e7 graphicsdriver/opengl: Refactoring 2018-11-17 19:29:52 +09:00
Hajime Hoshi
7586c660d5 graphics: Change the number of floats for a vertex from 10 to 12
This is a preparation for Metal, that forces 4 floats for a vertex
position.
2018-11-17 15:30:11 +09:00
Hajime Hoshi
d2595c5be7 ui: Refactoring 2018-11-15 01:08:36 +09:00
Hajime Hoshi
e24f6b7848 graphicsdriver/opengl: Rename GetDriver -> Get 2018-11-13 00:01:26 +09:00
Hajime Hoshi
2313f79160 graphicsdriver: Rename Delete -> Dispose 2018-11-12 23:44:39 +09:00
Hajime Hoshi
cc2174bd69 graphicsdriver: Adjust API 2018-11-11 23:57:23 +09:00
Hajime Hoshi
907a28c434 graphicsdriver: Rename BufferSubData -> SetVertices 2018-11-11 23:54:58 +09:00
Hajime Hoshi
846a719d6c graphicsdriver: Merge UseProgram and DrawElements into Draw 2018-11-11 23:53:23 +09:00
Hajime Hoshi
575af7e416 graphicsdriver: Change indexOffsetInBytes -> indexOffset at DrawElements 2018-11-11 23:51:16 +09:00
Hajime Hoshi
b2b51fb1bf graphicsdriver/opengl: Refactoring 2018-11-11 22:08:36 +09:00
Hajime Hoshi
aff77d98e4 graphicsdriver/opengl: Bug fix: compile error on browsers and mobiles 2018-11-11 04:51:17 +09:00
Hajime Hoshi
734aeabc8d graphicsdriver/opengl: Remove theContext 2018-11-11 03:37:37 +09:00
Hajime Hoshi
2f692d98c7 graphicsdriver: Rename TexSubImage2D -> ReplacePixels 2018-11-11 01:35:10 +09:00
Hajime Hoshi
61ca48225c graphicsdriver: Rename MaxTextureSize -> MaxImageSize 2018-11-11 01:26:37 +09:00
Hajime Hoshi
7e363a6f3b graphicsdriver/opengl: Unexport Context 2018-11-11 01:19:11 +09:00
Hajime Hoshi
241716d0e6 Add package graphicsdriver; Move opengl to graphicsdriver/opengl 2018-11-10 22:52:37 +09:00
Ben Echols
5e70fce639 Added monitor cache and scale cache (#731) 2018-11-07 20:54:37 +09:00
Hajime Hoshi
b396b4f88a opengl: Refactoring: Remove theOpenGLState 2018-11-07 02:01:00 +09:00
Hajime Hoshi
09c8516545 graphcis: Move IndicesNum from opengl to graphics 2018-11-07 01:49:45 +09:00
Hajime Hoshi
07ae1db0dd opengl: Add Driver 2018-11-07 01:43:07 +09:00
Hajime Hoshi
ed961505d2 opengl: Refactoring: Hide projection matrix inside opengl package 2018-11-06 03:45:44 +09:00
Hajime Hoshi
57c8c089e9 opengl: Unexport BlendFunc 2018-11-06 03:18:56 +09:00
Hajime Hoshi
c9f49efd41 graphics: Add VertexFlaotNum 2018-11-06 02:34:52 +09:00
Hajime Hoshi
580cd5cc71 opengl: Unexport DataType/Float/Short 2018-11-06 01:58:15 +09:00
Hajime Hoshi
82e9f227d1 opengl: Remove arrayBufferLayoutPart.dataType 2018-11-06 01:13:55 +09:00
Hajime Hoshi
00f28dd896 opengl: Remove BeforeSwapping
I couldn't machines that requre this any longer. Perhaps a bound
framebuffer is always the screen framebuffer before swapping now.
2018-11-05 02:14:56 +09:00
Hajime Hoshi
2c7017534f ui: Remove opengl dependency from ui package (desktop) 2018-11-05 01:24:53 +09:00
Hajime Hoshi
02b570a8e1 opengl: Refactoring: Use value type for theContext 2018-11-05 00:48:15 +09:00
Hajime Hoshi
f7fa4ed8f9 opengl: Refactoring 2018-11-05 00:44:27 +09:00