Commit Graph

88 Commits

Author SHA1 Message Date
Hajime Hoshi
5a9235aaf9
graphics: Embed color matrices values to vertices (#655)
Fixes #531
2018-07-26 11:37:27 +09:00
Hajime Hoshi
e6d0943366 graphics: Rename color_matrix -> color_matrix_body 2018-06-06 02:46:54 +09:00
Hajime Hoshi
b86860abcc graphics: Call BindBuffer only when the program was null 2018-06-04 00:13:23 +09:00
Hajime Hoshi
525ad04568 graphics: Split the notion of vertices and elements 2018-06-03 16:07:26 +09:00
Hajime Hoshi
25f2dfc677 graphics: Refactoring 2018-06-03 01:43:10 +09:00
Hajime Hoshi
03e3f0f5f7 graphics: Call glBufferSubData for element array buffer every frame
This is a preparation for more flexible drawing commands.
2018-05-31 00:53:05 +09:00
Hajime Hoshi
399f965729 opengl: Add BindBuffer accepting both element-array-buffer and array-buffer
This change is a pure refactoring to clarify that array buffer is
binded before its usage.
2018-05-28 00:34:00 +09:00
Hajime Hoshi
0a5deab0a2 graphics: Reland Bug fix: More strict calculation for the nearest filter (#558)
Better version of bae8f9d874
2018-03-21 02:40:26 +09:00
Hajime Hoshi
b157f2d6d0 Revert "graphics: Bug fix: More strict calculation for the nearest filter (#558)"
This reverts commit bae8f9d874.

Reason: TravisCI failed
2018-03-20 04:16:37 +09:00
Hajime Hoshi
bae8f9d874 graphics: Bug fix: More strict calculation for the nearest filter (#558) 2018-03-20 04:05:03 +09:00
Hajime Hoshi
e977019d2f graphics: Detect maximum texture size for each environment
Fixes #537, #539

See also #541
2018-03-09 11:47:23 +09:00
Hajime Hoshi
3479b80f1c opengl: Use unsafe-way to convert []float32/[]uint16 to []byte; Remove internal/endian 2018-03-04 18:06:35 +09:00
Hajime Hoshi
e5089934db graphics: Bug fix: Don't delete buffers on browsers (#526) 2018-03-02 01:06:21 +09:00
Hajime Hoshi
8c8e512059 affine: User nillable pattern for ColorM 2018-02-28 02:14:06 +09:00
Hajime Hoshi
591e0ad995 graphics: Add 'screen' filter for fast rendering (#509) 2018-02-23 01:28:35 +09:00
Hajime Hoshi
092cb2f3f6 graphics: Reset source size parameter just in case 2018-02-22 11:27:15 +09:00
Hajime Hoshi
30e48d5c3c graphics: Stop unnecessary copy of elements (projection matrix) 2018-02-20 01:36:56 +09:00
Hajime Hoshi
40b1948baa graphics: Stop unnecessary copy of elements 2018-02-20 01:17:21 +09:00
Hajime Hoshi
f1f7e5bcec affine: Transpose ColorM implementation for optimization 2018-02-20 00:53:53 +09:00
Hajime Hoshi
9b361086d7 affine: Use float32 inside of ColorM 2018-02-20 00:33:56 +09:00
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