Commit Graph

68 Commits

Author SHA1 Message Date
Hajime Hoshi
95480d0644 affine: Separate ColorM impl into two slices
This fix avoids unnecessary allocating arrays.
2018-02-12 19:01:01 +09:00
seebs
0b7ba8e573 Do GeoM projection on CPU (#477)
Handling GeoM projection on CPU may seem like a weird choice, given
how fast GPU is, but it pays off:

* You only have to do a very small subset of the actual matrix
  multiply.
* You don't have to construct a matrix in the vertex shader.
* Six fewer float32 values per vertex.
* You do still have to do the matrix computation for each vertex,
  though.

Signed-off-by: Seebs <seebs@seebs.net>
2018-01-14 16:01:55 +09:00
Hajime Hoshi
8e72906f3d graphics: Separate GLSL programs for filters (#461) 2017-12-21 00:33:08 +09:00
Hajime Hoshi
723d153800 Reland(2): graphics: Appropriate rendering of edges on linear filter 2017-12-12 00:03:01 +09:00
Hajime Hoshi
362d1c417f Revert 'graphics: Appropriate rendering of edges on linear filter (Reland)' (#458) 2017-12-11 20:30:54 +09:00
Hajime Hoshi
1152439e65 graphics: Appropriate rendering of edges on linear filter (Reland)
Fixes #456
2017-12-07 02:26:16 +09:00
Hajime Hoshi
8091aa5190 Revert 'graphics: Appropriate rendering of edges on linear filter' #456 2017-12-06 23:40:29 +09:00
Hajime Hoshi
bc0432f310 graphics: Appropriate rendering of edges on linear filter
Fixes #315
2017-12-06 21:40:24 +09:00
Hajime Hoshi
eeea25f202 opengl: Remove 'normalize' argument from VertexAttribPointer 2017-12-03 19:21:59 +09:00
Hajime Hoshi
8e7e960b56 graphics: Limit source-rectangle range
Remove texture adjustment introduced due to #317
2017-12-02 23:13:44 +09:00
Hajime Hoshi
ade56f8176 opengl: BindTexture no longer returns error 2017-09-25 00:11:19 +09:00
Hajime Hoshi
37d8bd312a graphics: Refactoring 2017-09-25 00:06:45 +09:00
Hajime Hoshi
8fbe423125 graphics: Delete programs explicitly and add comments 2017-09-24 23:41:37 +09:00
Hajime Hoshi
e5ca84013c graphics: Bug fix: Delete buffer when necessary 2017-09-24 23:20:26 +09:00
Hajime Hoshi
ecc9d0b3b1 graphics: Add comments 2017-09-24 22:56:50 +09:00
Hajime Hoshi
2d5b062c3c opengl: Refactoring: Replace NewBuffer with new funcs
Replace NewBuffer with NewArrayBuffer and NewElementArrayBuffer
2017-09-01 01:30:09 +09:00
Hajime Hoshi
9ab517cf82 restorable: Refactoring 2017-08-07 00:06:35 +09:00
Hajime Hoshi
7d181e3182 opengl: Hide OpenGL context usages into internal/graphics package 2017-05-31 02:18:04 +09:00
Hajime Hoshi
50b50effc0 graphics: Bug fix: Can't delete object after GL context is restored 2017-01-21 03:05:21 +09:00
Hajime Hoshi
dfcd9fc30c graphics: Make matrices faster 2017-01-20 00:37:51 +09:00
Hajime Hoshi
71a4465c6f graphics: Improve matrices speed 2017-01-19 12:07:31 +09:00
Hajime Hoshi
c44ee9cde2 graphics: Refactoring 2016-12-29 01:15:57 +09:00
Hajime Hoshi
07294a98b6 Move internal/graphics/opengl -> internal/opengl 2016-11-03 23:31:25 +09:00
Hajime Hoshi
50b2d8ee94 graphics: Use float values for vertices 2016-11-02 02:34:01 +09:00
Hajime Hoshi
d02c67a996 graphics: Use affine.ColorM instead of graphics.Matrix 2016-11-01 00:20:27 +09:00
Hajime Hoshi
6de9e6696e graphics: Cache total bytes 2016-10-29 01:07:19 +09:00
Hajime Hoshi
a70f61b1d5 graphics: Remove passing GeoM to the lower layers 2016-10-25 10:42:49 +09:00
Hajime Hoshi
96053702ed graphics: Bug fix: Remove modelview_matrix 2016-10-25 03:17:14 +09:00
Hajime Hoshi
a2cc291573 graphics: Rename variables 2016-10-25 03:04:06 +09:00
Hajime Hoshi
ebf7f0df00 graphics: Add geometry matrix info to vertices 2016-10-25 01:56:59 +09:00
Hajime Hoshi
bc8a8fbae8 graphics: Refactoring: Replace QuadVertexNum with QuadVertexSizeInBytes func 2016-10-23 03:12:11 +09:00
Hajime Hoshi
af4130c0d6 graphics: Bug fix: wrong argument in VertexAttribPointer 2016-10-22 20:47:33 +09:00
Hajime Hoshi
17ad889bba graphics: Add a comment 2016-10-22 16:57:09 +09:00
Hajime Hoshi
d981466aed graphics: Use opengl.DataType 2016-10-22 16:52:58 +09:00
Hajime Hoshi
9abeb29d2a opengl: Add DataType 2016-10-22 14:51:23 +09:00
Hajime Hoshi
e5e9b178ae opengl: Fix argument order of VertexAttribPointer 2016-10-22 14:00:45 +09:00
Hajime Hoshi
cbcbdb0b97 graphics: Refactoring: Introduce arrayBufferLayoutPart 2016-10-17 10:36:33 +09:00
Hajime Hoshi
8ee859df31 graphics: Refactoring: Introduce arrayBufferLayout 2016-10-17 10:03:25 +09:00
Hajime Hoshi
c1b4624890 graphics: Remove unused const 2016-10-17 01:07:16 +09:00
Hajime Hoshi
c7106f595c Add error checks 2016-08-02 02:26:44 +09:00
Hajime Hoshi
7a96f31b1f graphics: Hide MaxQuads 2016-07-16 02:07:16 +09:00
Hajime Hoshi
275fc66f06 graphics: Bug fix: textuer should be stored at OpenGL layer 2016-07-09 19:36:34 +09:00
Hajime Hoshi
163ee01bd5 graphics: Rename Initialize/Resume -> Reset 2016-07-04 00:30:14 +09:00
Hajime Hoshi
d0a779e272 graphics: Delete programs and buffers when resuming 2016-07-04 00:23:45 +09:00
Hajime Hoshi
d70bf66a59 graphics: Reduce imageM usages 2016-07-03 23:23:57 +09:00
Hajime Hoshi
6e76c3ed6b graphics: Move context.resume() to internal/graphics 2016-07-03 21:42:01 +09:00
Hajime Hoshi
86144a1cd6 opengl: Move members to variables 2016-07-03 18:23:19 +09:00
Hajime Hoshi
ff30f01c1b graphics: Remove Finalize 2016-06-30 00:21:47 +09:00
Hajime Hoshi
4c2650c721 graphics: Reduce calls of glBindTexture 2016-06-05 01:55:28 +09:00
Hajime Hoshi
bddd3c9467 grahics: Reduce gl function calls 2016-06-04 22:30:52 +09:00