Commit Graph

64 Commits

Author SHA1 Message Date
Hajime Hoshi
e6c0c73b9e graphicscommand: Add assertion (the screen cannot be a render source) 2019-04-13 00:22:11 +09:00
Hajime Hoshi
7445144194 Move graphicsdriver.GrapahicsDriver to driver.Graphics 2019-03-30 22:38:02 +09:00
Hajime Hoshi
747d1be54e driver: Move getting actual drivers to ebiten package 2019-03-30 22:19:21 +09:00
Hajime Hoshi
8ec7ae4c08 Rename drivers -> driver 2019-03-28 01:48:45 +09:00
Hajime Hoshi
5e38f81462 Create packages drivers having actual drivers 2019-03-25 00:29:56 +09:00
Hajime Hoshi
8e42484294 graphicscommand: Add 'address' to (*DrawImageCommand).String 2019-02-10 14:27:49 +09:00
Hajime Hoshi
a3eddeb50f Improve panic messages 2019-02-06 23:43:03 -10:00
Hajime Hoshi
d3d56c076d shareable: Use CopyPixels
CopyPixels is basically Pixels and ReplacePixels, but executed
lazily while Pixels reads pixels from GPU immediately. Thanks to
this, restorable.Image no longer need to keep pixel data if not
needed.
2019-02-03 02:51:56 +09:00
Hajime Hoshi
ce21125345 graphicscommand: Rename functions 2019-01-12 01:33:27 +09:00
Hajime Hoshi
dc0c6e0907 graphicscommand: Use GL on macOS 10.11 or older (#781) 2019-01-12 01:30:47 +09:00
mebusy
0419aec617 graphicscommand: Use Opengl instead on early MacOSX platform which does not support Metal (#779) 2019-01-11 22:34:23 +09:00
Hajime Hoshi
b34834a895 graphicscommand: Explicitly forbide ReplacePixels for a part after DrawImage 2019-01-06 05:15:27 +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
bf67998fc5 graphicscommand: Bug fix: Do not assure the initial state of the image 2018-12-23 01:18:05 +09:00
Hajime Hoshi
ff62876552 Add Metal implementation
Fixes #621
2018-12-20 02:37:10 +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
d29cabca43 graphicsdriver: Remove MaxImageSize 2018-12-15 03:46:32 +09:00
Hajime Hoshi
e537cb2c27 graphics: Bug fix: render source might not be initialized 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
b48d501bc0 graphics: Explicit limitation of indices at DrawTriangles
Fixes #728
2018-11-23 19:02:10 +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
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
241716d0e6 Add package graphicsdriver; Move opengl to graphicsdriver/opengl 2018-11-10 22:52:37 +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
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
786b349579 opengl: Unexport TexSubImage2D 2018-11-04 19:44:30 +09:00
Hajime Hoshi
531251d4ad opengl: Unexport NewTexture 2018-11-04 19:39:14 +09:00
Hajime Hoshi
2a7caf7755 opengl: Move ensureFramebuffer to opengl.Image 2018-11-04 19:06:33 +09:00
Hajime Hoshi
95a925ec9a opengl: Refactoring 2018-11-04 18:51:50 +09:00
Hajime Hoshi
7fbf9f652e opengl: Unexport DeleteTexture 2018-11-04 18:46:05 +09:00
Hajime Hoshi
96f1a8aff6 opengl: Add Image struct 2018-11-04 18:39:28 +09:00
Hajime Hoshi
c7ea761031 opengl: Rename FramebufferStruct -> Framebuffer 2018-11-04 17:49:40 +09:00
Hajime Hoshi
c935c28498 opengl: Move Framebuffer from graphicscommand to opengl and rename it to FramebufferStruct 2018-11-04 17:39:01 +09:00
Hajime Hoshi
841353670f opengl: Unexport BindTexture 2018-11-02 03:45:37 +09:00
Hajime Hoshi
6dceeb343c opengl: Refactoring: Remove ResetViewportSize 2018-11-02 03:24:35 +09:00
Hajime Hoshi
09fe1886d7 graphicscommand: Add comments
Add explanation why ResetViewportSize is needed.
2018-11-02 03:06:26 +09:00