faiface
c0766504e3
minor, mostly stylistic, changes
2017-06-09 18:13:05 +02:00
Seebs
ce8687b80f
Don't duplicate computations in gltriangles.go
...
The computation including a call to Stride() can't be optimized away
safely because the compiler can't tell that Stride() is effectively
constant, but we know it won't change so we can make a slice pointing
at that part of the array.
CPU time for updateData goes from 26.35% to 18.65% in my test case.
2017-06-09 10:37:47 -05: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
be2434cfa8
add Window.Repeat
2017-05-10 23:54:06 +02:00
faiface
9062f1eae9
fix and simplify input handling in Window
2017-05-10 21:22:47 +02:00
faiface
c9319763d7
add Window.Typed
2017-05-10 21:10:10 +02:00
faiface
650263a314
fix creating window with no icon
2017-05-01 12:18:23 +02:00
faiface
4de5df6980
just align doc comment to 100 chars per line
2017-05-01 01:38:57 +02:00
Michal Štrba
a730295ce8
Merge pull request #14 from otraore/set-icon
...
Add support for setting an icon of a window
2017-05-01 01:33:59 +02:00
Ousmane Traore
4e7e3956db
Set value rather than append
2017-04-30 19:30:11 -04:00
Ousmane Traore
ac4239754f
Address review comments
2017-04-30 18:43:05 -04:00
Ousmane Traore
8ae8551fda
Add Icons paramter to window config
2017-04-30 17:19:51 -04:00
faiface
2c1528a927
fix Window.CursorVisible intial value (was false)
2017-04-30 20:42:25 +02:00
Ousmane Traore
b6620c9775
Address review comments
2017-04-30 12:33:27 -04:00
Ousmane Traore
2fa80f7d42
Add ability to hide the cursor
2017-04-30 10:40:31 -04: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
639bd44303
temporarily fix issue #1
2017-04-22 13:15:57 +02: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
00bd0fe945
add pixelgl package doc
2017-04-21 17:00:18 +02:00
faiface
79b6412a14
minor change
2017-04-13 20:30:32 +02:00
faiface
4ce6e2b3c4
remove a bunch of unnecessary Window control methods
2017-04-13 15:03:13 +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
bce553aeec
remove accidentaly kept updateLock field from GLTriangles
2017-04-12 11:25:11 +02:00
faiface
41e5e8ca77
fix race condition in GLTriangles
2017-04-11 15:02:58 +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
8489bdad27
fix compile error
2017-04-10 00:48:17 +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
5be03c8beb
add Window.SetComposeMethod
2017-04-10 00:41:48 +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
e6af9eb3c2
fix typo in Window doc
2017-04-08 18:05:50 +02:00
faiface
5097bc9cac
adjust WindowConfig doc, more consistent with the rest
2017-04-07 12:34:16 +02:00
faiface
8db95af845
fix GLFrame.SetBounds to not reallocate when not necessary
2017-04-05 23:20:55 +02:00
faiface
1a2ca3264d
add Window.Color
2017-04-02 19:08:48 +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
8625586bee
fix two misspells
2017-03-16 00:45:04 +01:00
faiface
19ba78bb0c
minor changes
2017-03-16 00:15:39 +01:00
faiface
311b474e89
remove last usages of mainthread.CallVal
2017-03-15 23:43:00 +01:00
faiface
cd11c39e64
one more doc bug
2017-03-15 22:56:23 +01:00
faiface
eab91b4110
fix many bugs in pixelgl doc
2017-03-15 22:55:43 +01:00
faiface
415fc129ca
add missing dot in doc
2017-03-15 01:09:33 +01:00
faiface
07ecae706d
fix consistency in Canvas.SetBounds
2017-03-14 19:27:28 +01:00
faiface
cb3276493d
fix window resizing consistency
2017-03-14 18:31:44 +01:00
faiface
203adc914b
change Rect to have Min, Max instead of Pos, Size
2017-03-13 23:52:34 +01:00
faiface
dcf70e5a26
fix mouse moving outside window with glfw callbacks
2017-03-10 13:11:44 +01:00
faiface
3071cf1750
add TODO comment
2017-03-10 00:56:35 +01:00
faiface
c2a1fe7de8
only register mouse inside window
2017-03-10 00:01:58 +01:00
faiface
000a18e2cf
fix GLTriangles.SetLen when decreasing length
2017-03-09 22:56:46 +01:00
faiface
fa774a4259
fix key callback for glfw.KeyUnknown
2017-03-09 22:11:59 +01:00
faiface
94fe4019fd
optimize Window.MousePosition
2017-03-09 00:56:57 +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
faiface
79bffcc7e8
another minor change (code consistency)
2017-03-08 16:29:25 +01:00
faiface
4f2ef50783
remove multisampling (will add it back later)
2017-03-08 16:24:01 +01:00
faiface
907082326f
fix color masking in Canvas.Clear
2017-03-08 15:02:40 +01:00
faiface
e4ecafefc5
add clarifying comment
2017-03-07 22:44:25 +01:00
faiface
3d13e52add
allow efficiently drawing one Canvas onto another
2017-03-07 20:33:07 +01:00
faiface
f65ea40e19
implement Picture for Canvas
2017-03-07 17:45:46 +01:00
faiface
7feecc2e35
correct glhf.Bounds in Canvas
2017-03-07 01:06:37 +01:00
faiface
6b643e588a
make Canvas code more consistent
2017-03-07 00:32:58 +01:00
faiface
f0394ec7d1
replace Transform by much simpler Matrix
2017-03-06 19:58:24 +01:00
faiface
1083ca720d
add Picture.Original
2017-03-06 19:04:57 +01:00
faiface
53066d4759
fix Picture drawing in Canvas
2017-03-06 16:09:09 +01:00
faiface
17d1731d66
fix Window.MousePosition (new coordinate system)
2017-03-06 15:51:59 +01:00
faiface
146797bad5
fix PictureData.Color (off by 1)
2017-03-06 13:05:45 +01:00
faiface
69a3c17cfc
big big commit - rework whole pixelgl
2017-03-06 00:28:52 +01:00
faiface
f7a52854c6
adapt GLTriangles (+ make them exported)
2017-02-24 19:30:06 +01:00
faiface
67529bf8fc
stop using mainthread.CallVal
2017-02-24 15:45:32 +01:00
faiface
c1843b8608
add Drawer struct
2017-02-23 13:07:40 +01:00
faiface
6dc55b8746
change fundamental interfaces (add Picture)
2017-02-22 20:57:22 +01:00
faiface
dbd90a0bcb
move OpenGL specific stuff to pixelgl (except for Picture)
2017-02-22 20:44:38 +01:00
faiface
3300f02d21
adopt github.com/faiface/glhf
2017-02-11 14:09:47 +01:00
faiface
0771f07888
update pixelgl.VertexSlice API similarly to Triangles
2017-01-28 20:14:20 +01:00
faiface
4a31512454
update doc in pixelgl
2017-01-25 18:26:57 +01:00
faiface
8917a09da9
improve docs in pixelgl
2017-01-25 18:25:37 +01:00
faiface
e0e59f1d96
remove debug print
2017-01-22 14:42:54 +01:00
faiface
e656130ce3
change pixelgl.Texture.Pixels to work with OpenGL 3.3
2017-01-22 14:16:06 +01:00
faiface
4d2ccc92df
add pixelgl.Texture.SetPixels/Pixels
2017-01-22 13:45:24 +01:00
faiface
79ef8d51eb
remove pixelgl.Viewport, because Frame sets viewport
2017-01-22 02:38:04 +01:00
faiface
2f070dc302
clarify doc
2017-01-22 01:57:36 +01:00