Commit Graph

65 Commits

Author SHA1 Message Date
Alexandru-Paul Copil aae9927b58 Apply gofumpt and basic styling changes 2021-07-09 10:43:10 +03:00
Allen Ray 865e930023
Merge branch 'master' into tri_shader 2020-06-28 20:03:04 -04:00
Allen Ray 926463aa6f #244 GLTriangle's fragment shader is used when rendered by the Canvas.
Allows for custom fragment shaders to be used after canvas.MakeTriangles.
2020-06-21 23:27:28 -04:00
Allen Ray 543819d066 Forgot to add import in PR 2020-06-21 23:09:08 -04:00
Allen Ray c3e5e4fdb2 Moved triangle clipping to the proper location 2020-06-21 22:54:23 -04:00
Allen Ray e79a8c37e6 Adding support for clipping rectangles in GLTriangles 2020-06-21 22:51:08 -04:00
Brandon dc545043c1 lowercased SetUniform arguments 2018-10-07 12:28:20 -06:00
Brandon f4edf628b1 standardized glsl variable naming 2018-10-07 08:33:37 -06:00
Brandon e9dfd22ffa pr 141 review #3 changes, see https://github.com/faiface/pixel/pull/141#pullrequestreview-162261776 2018-10-06 10:27:47 -06:00
Brandon fa10844351 pr 141 review #2 changes, see https://github.com/faiface/pixel/pull/141#pullrequestreview-162259357 2018-10-06 10:01:05 -06:00
Brandon a25a444cbf pr 141 review #1 changes, see https://github.com/faiface/pixel/pull/141#pullrequestreview-161208458 2018-10-03 13:02:10 -06:00
Brandon 55d3a6ab00 implemented custom fragment shader support 2018-10-02 08:59:37 -06:00
faiface cfdc8beb81 switch back to OpenGL 3.3 (OS X issues) 2017-06-10 15:11:45 +02:00
faiface 3665eaf702 Merge branch 'master' into gl2.1 2017-06-09 19:26:14 +02:00
faiface c0766504e3 minor, mostly stylistic, changes 2017-06-09 18:13:05 +02:00
Seebs c321515d3c Simplify Matrix math, use 6-value affine matrixes.
It turns out that affine matrices are much simpler than the 3x3 matrices
they imply, and we can use this to dramatically streamline some code.
For a test program, this was about a 50% gain in frame rate just from
the cost of the applyMatrixAndMask calls in imdraw, which were calling
matrix.Project() many times. Simplifying matrix.Project, alone, got a
nearly 50% frame rate boost!

Also modify pixelgl's SetMatrix to copy the six values of a 3x2
Affine into the corresponding locations of a 3x3 matrix.
2017-06-09 10:37:43 -05:00
faiface 793d1e6a9a fix typo in doc 2017-05-28 18:50:56 +02:00
faiface f0c42c6e56 add Canvas.Frame method 2017-05-28 18:44:30 +02:00
faiface fa2c741fcf switch to OpenGL 2.1 2017-05-27 13:14:13 +02:00
faiface fcfeb200b6 replace complex128 Vec with a struct 2017-05-21 19:25:06 +02:00
faiface 6735475b44 change Sprite.Draw and Canvas.Draw signatures (include Matrix) 2017-05-17 23:45:22 +02:00
faiface c12d22757d add Canvas.SetPixels and Canvas.Pixels methods 2017-04-28 13:24:30 +02:00
Paul Ivanov 8643f6d0d0 fix for 'texture' as a variable error, closes #4 2017-04-26 08:35:10 -07:00
faiface d214312c06 remove debug print 2017-04-21 23:10:02 +02:00
faiface 7b7b663f7d fix Canvas drawing when bounds don't start at (0, 0) 2017-04-21 23:07:48 +02:00
faiface 79b6412a14 minor change 2017-04-13 20:30:32 +02:00
faiface 87b57f21cb fix Canvas.Draw 2017-04-12 16:02:39 +02:00
faiface cb9e936395 add Canvas.Draw 2017-04-12 16:00:56 +02:00
faiface 3e65588e00 adopt RGB and Alpha 2017-04-10 17:25:56 +02:00
faiface 5d82c3cdb9 rename ComposeDst* -> ComposeR* + add ComposePlus, ComposeCopy 2017-04-10 13:59:16 +02:00
faiface c2633848f6 remove smooth argument from Canvas constructor 2017-04-10 00:47:06 +02:00
faiface 8379e17cac fix drawing onto Canvas 2017-04-10 00:41:56 +02:00
faiface 3068153419 add Canvas.SetComposeMethod 2017-04-10 00:30:50 +02:00
faiface 9238e701a7 use glhf.BlendFunc 2017-04-09 23:16:34 +02:00
faiface f4916a4272 replace NRGBA to RGBA because Porter-Duff (!!!) 2017-04-09 22:00:26 +02:00
faiface 46c8784df0 split Canvas into Canvas+GLFrame + add GLPicture 2017-04-01 21:54:44 +02:00
faiface f9482d311f remove Slice and Original from Canvas 2017-03-31 15:03:06 +02:00
faiface 0b3cfac547 remove Slice and Original from Picture interface 2017-03-30 23:34:07 +02:00
faiface 379b4df667 adopt new ToNRGBA function 2017-03-23 23:07:49 +01:00
faiface 4b17773a1a fix bug in Canvas.MakeTriangles 2017-03-20 23:11:50 +01:00
faiface 4c526867a4 heavily optimize Canvas.MakePicture with PictureData 2017-03-20 19:54:59 +01:00
faiface eab91b4110 fix many bugs in pixelgl doc 2017-03-15 22:55:43 +01:00
faiface 07ecae706d fix consistency in Canvas.SetBounds 2017-03-14 19:27:28 +01:00
faiface 203adc914b change Rect to have Min, Max instead of Pos, Size 2017-03-13 23:52:34 +01:00
faiface a1e7f9bf04 better error messages %T -> (%T) 2017-03-08 23:51:53 +01:00
faiface 7f38aac901 minor stability change in Canvas.SetBounds 2017-03-08 22:51:18 +01:00
faiface 46f21a3096 fix changing Canvas Bounds 2017-03-08 19:19:20 +01:00
faiface 0127a8ae21 clarify doc 2017-03-08 16:57:02 +01:00
faiface d797cee6ce optimize Canvas.SetBounds 2017-03-08 16:56:02 +01:00
faiface d63590a799 add PictureColor properties to Canvas TargetPicture 2017-03-08 16:37:57 +01:00