Commit Graph

1405 Commits

Author SHA1 Message Date
Hajime Hoshi
454a7d8ef9 graphicsdriver/opengl: Bug fix: misspelling on variables
Fixes #764
2018-12-26 03:03:06 +09:00
Hajime Hoshi
99e4c874fe Reduce init functions
This mitigates the init-order issue on jsgo.io.
2018-12-26 02:13:47 +09:00
Hajime Hoshi
de788603d6 graphicsdriver/opengl: Remove init order dependency 2018-12-25 23:58:01 +09:00
Hajime Hoshi
ebbbb448fa graphicsdriver/metal: Rename function for consistency 2018-12-25 02:24:02 +09:00
Hajime Hoshi
f5708cb58a graphicsdriver/opengl: Bug fix: Rename a function not to override an existing function 2018-12-24 17:45:16 +09:00
Hajime Hoshi
f1582c2d73 graphics: Add Address representing a sampler address mode
Fixes #761
2018-12-24 17:29:31 +09:00
Hajime Hoshi
7e50ae39c9 graphicsdriver/opengl: Refactoring: Filter as a uniform value 2018-12-24 16:06:25 +09:00
Hajime Hoshi
85df49dc96 graphicsdriver/opengl: Bug fix: variables can be optimized out 2018-12-23 06:04:35 +09:00
Hajime Hoshi
189b8a17e9 graphics: Use source-border check even at DrawTriangles
DrawTriangles can now take a sub-image.
2018-12-23 03:24:39 +09:00
Hajime Hoshi
4149a56524 graphics: Refactoring: Use 12 floats for each vertex
This is a preparation for #761.
2018-12-23 02:36:28 +09:00
Hajime Hoshi
bf67998fc5 graphicscommand: Bug fix: Do not assure the initial state of the image 2018-12-23 01:18:05 +09:00
Hajime Hoshi
4d0cc623fb ui: Rename functions 2018-12-22 02:32:02 +09:00
Hajime Hoshi
e809991c9f shareable: Bug fix: Image invalidation by ReplacePixels
ReplacePixels on a part of image might invalidate the other part of
the image on MacBook Pro 2013, especially when the other part is
rendered by DrawImage.

Fixes #593 #758
2018-12-21 11:50:10 +09:00
Hajime Hoshi
c227934153 graphicsdriver/metal: Bug fix: Adjust texels
Fixes #759
2018-12-21 02:38:00 +09:00
Hajime Hoshi
d520749dcb graphicsdriver/metal: Call Release on the main thread 2018-12-20 23:08:40 +09:00
wasedaigo
6840e9e739 graphicsdriver/metal: Clarify the type of passing parameters (#757)
Fixes #756
2018-12-20 17:04:03 +09:00
Hajime Hoshi
ff62876552 Add Metal implementation
Fixes #621
2018-12-20 02:37:10 +09:00
Hajime Hoshi
d738639c48 graphicsdriver/opengl: Fix panic messages 2018-12-20 02:36:21 +09:00
Hajime Hoshi
294bf855af ui: Fix logic: [NSApp mainWindow] can be nil when borderless 2018-12-19 02:25:12 +09:00
Hajime Hoshi
db4395d71b ui: Bug fix: ScreenSizeFullscreen before Run crashes on Linux 2018-12-19 01:21:00 +09:00
Hajime Hoshi
6ef5cc5857 ui: Bug fix: SetWindowDecorated didn't work
Fixes #753
2018-12-19 01:01:18 +09:00
Hajime Hoshi
b3ce89aab1 ui: Bug fix: SetWindowIcon before Run didn't work
Fixes #755
2018-12-18 23:16:09 +09:00
Hajime Hoshi
241ccc307f ui: Add comments about #753 2018-12-18 03:34:45 +09:00
Hajime Hoshi
eac00c3d83 ui: Bug fix: SetCursorVisible before Run didn't work
Fixes #754
2018-12-18 03:07:16 +09:00
Hajime Hoshi
9628e629ae graphicscommand: Fix tests to be more deterministic
Fixes #751
2018-12-17 21:46:53 +09:00
Hajime Hoshi
5d0420cea0 graphicscommand: Simplify Image
First I thought Metal requried an initialization process by
replacing pixels, but now this is not needed. Initialize images by
the dummy texture.
2018-12-16 22:36:03 +09:00
Hajime Hoshi
8b72ff5ec0 graphicscommand: Add tests 2018-12-16 17:38:02 +09:00
Hajime Hoshi
2c25318634 shareable: Add TestReplacePixelsAfterDrawImage 2018-12-16 15:13:35 +09:00
Hajime Hoshi
5f8a0e34bb graphics: isPowerOf2(0 or negative) should return false 2018-12-16 14:26:16 +09:00
Hajime Hoshi
17b225083d shareable: Improve TestExtend 2018-12-16 05:09:43 +09:00
Hajime Hoshi
22b11aafac shareable: Add TestExtend 2018-12-15 19:51:17 +09:00
Hajime Hoshi
d29cabca43 graphicsdriver: Remove MaxImageSize 2018-12-15 03:46:32 +09:00
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