Hajime Hoshi
93cdfe107e
ui: Keep the device scale to avoid re-calculation
2017-05-14 04:21:20 +09:00
Hajime Hoshi
d6219e38d8
ui: Rename files
2017-05-13 19:50:40 +09:00
Hajime Hoshi
b409631515
Add FreeBSD support ( #352 )
2017-05-11 19:09:13 +09:00
Hajime Hoshi
951e5bccef
restorable: Remove Images()
2017-05-04 00:08:07 +09:00
Hajime Hoshi
8b48d010ed
restorable: Refactoring
2017-05-03 23:24:00 +09:00
Hajime Hoshi
bc105e7350
restorable: Unexport functions
2017-05-03 23:18:35 +09:00
Hajime Hoshi
aa5c278445
restorable: Unexport add
2017-05-03 23:15:18 +09:00
Hajime Hoshi
9f5cf48d24
restorable: Move Images to resotrable package
2017-05-03 23:11:43 +09:00
Hajime Hoshi
d94e9c9d86
restorable: Bug fix: Make limit to the number of draw-image command history ( #349 )
2017-05-03 22:16:32 +09:00
Hajime Hoshi
76ad9cf42b
doc: Fix comments
2017-05-03 01:08:27 +09:00
Hajime Hoshi
5699822d64
graphics: Avoid creating struct as much as possible
2017-05-02 22:45:09 +09:00
Hajime Hoshi
4e22bd770f
ui: Remove Input interface and remove locks on browsers to improve performance ( #346 )
2017-04-28 23:45:01 +09:00
Hajime Hoshi
0dafbfe99d
ui: Speed optimization for browser keyboard inputs
2017-04-27 11:40:32 +09:00
Hajime Hoshi
fb612a4b87
ui: Adjust window size in case when glfwGetVideoMode fails ( #328 )
2017-04-19 00:51:15 +09:00
Hajime Hoshi
95cb0133de
ui: Add keys ( #339 )
2017-04-14 03:09:00 +09:00
Hajime Hoshi
0cd692d26a
ui: Use code instead of keyCode on browsers but Safari
2017-04-14 03:02:38 +09:00
Hajime Hoshi
88cfdf8878
ui: Remove println
2017-04-11 12:00:40 +09:00
Hajime Hoshi
187a93d80a
ui: Bug fix: IsKeyPressed might return a wrong value when only one of Shift/Ctrl/Alt keys is pressed
2017-04-11 11:56:05 +09:00
Hajime Hoshi
aa1e7e9cd6
Revert "ui: Use code instead of keyCode on browsers ( #339 )"
...
This reverts commit d7ea02d8c1
.
2017-04-10 20:38:23 +09:00
Hajime Hoshi
d7ea02d8c1
ui: Use code instead of keyCode on browsers ( #339 )
2017-04-10 20:30:28 +09:00
Hajime Hoshi
b0454b874e
Fix frame counters to int64 ( #337 )
2017-04-06 00:45:28 +09:00
Hajime Hoshi
a3e14c9ddb
graphics: Image.ReplacePixels/Dispose always returns nil ( #331 )
2017-03-04 02:23:39 +09:00
Hajime Hoshi
6ca71c6931
graphics: Errors of NewImage* are always nil ( #331 )
2017-03-04 01:22:51 +09:00
Hajime Hoshi
33ff25cc40
gofmt -s -w
2017-03-04 00:00:04 +09:00
Hajime Hoshi
147798e14d
Simplify internal API not to return errors
2017-03-03 23:59:44 +09:00
Hajime Hoshi
cad051437d
ui: Refactoring
2017-03-03 11:15:07 +09:00
Hajime Hoshi
e11bc62059
ui: SetScreenSize/Scale no longer returns error
2017-03-03 10:58:29 +09:00
Hajime Hoshi
b6b61fc003
ui: setScreenSize in ui_glfw.go no longer returns error
2017-03-03 10:50:47 +09:00
Hajime Hoshi
0ba28d1183
ui: Remove unused function
2017-03-03 02:27:39 +09:00
Hajime Hoshi
ae378dc7f5
input: Extend number of gamepad buttons from 16 to 32 (for PS4)
2017-02-25 22:49:17 +09:00
Hajime Hoshi
acc488b980
graphics: Bug fix: Wrong palette usage when the palette is big
2017-02-19 02:56:20 +09:00
Hajime Hoshi
9634794e7e
ui: Use GetWindowThreadProcessId to check who created the console ( #304 , #318 )
2017-02-09 03:49:45 +09:00
Hajime Hoshi
bd1a486b3a
Bug fix: gopherjs build failed on Windows
2017-02-09 02:37:40 +09:00
Hajime Hoshi
93684d5df3
ui: Hide console window by checking the parent process ( #304 , #318 )
2017-02-09 02:01:03 +09:00
gonutz
112654995f
Hide console window on Windows ( #318 )
...
* Hide console only if double-clicking Windows exe
When building on Windows the console window is hidden on start-up if
double-clicking the executable but not if running the program from the
command line (as a developer).
See the code comments for an explanation of the used heuristic.
2017-02-07 20:44:10 +09:00
Hajime Hoshi
bb993a481b
graphics: Bug fix: Outside texels are used ( #317 )
2017-02-06 09:10:44 +09:00
Hajime Hoshi
0967df7f5e
graphics: Fix TestImagePixels to check out-of-range pixels
2017-02-05 04:24:07 +09:00
Hajime Hoshi
91681bdc25
graphics: Bug fix: ReplacePixels must reset pixels out of range ( #316 )
2017-02-05 04:16:09 +09:00
Hajime Hoshi
d7f1165aa3
graphics: Avoid calling ReplacePixels unnecessarily
2017-02-05 02:19:30 +09:00
Hajime Hoshi
0ef1e61d55
mobile: Fix iOS tag usages ( #310 )
2017-01-26 01:32:33 +09:00
Hajime Hoshi
6e897d1479
graphcis: Bug fix: Can't dispose textures/framebuffers after the context is lost (fixing #305 )
2017-01-22 01:37:08 +09:00
Hajime Hoshi
d3e1f91511
graphis: Bug fix: blurred screen after restoring the context ( #306 )
2017-01-21 15:16:47 +09:00
Hajime Hoshi
53952100d3
restorable: Bug fix: graphics.Image can be recreated and must not be used for restoring
2017-01-21 04:24:39 +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
bccf76867e
graphics: Try to restore the context on browsers (WIP)
2017-01-21 02:56:26 +09:00
Hajime Hoshi
de987be85f
opengl: Add IsContextLost
2017-01-20 02:20:41 +09:00
Hajime Hoshi
6e84919ed5
affine: Make Scale/Translate faster
2017-01-20 01:08:14 +09:00
Hajime Hoshi
48c8934838
affine: Refactoring
2017-01-20 00:46:25 +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
9087269212
graphics: Make copying GeoM faster
2017-01-19 10:59:07 +09:00
Hajime Hoshi
3331f17723
graphics: Bug fix: start pixel must start at 0 ( #303 )
2017-01-19 10:40:59 +09:00
Hajime Hoshi
333b0956ff
graphics: Improve speed by merging vertices arrays into one
2017-01-19 01:27:04 +09:00
Hajime Hoshi
a744285b51
graphics: Make copying ColorM faster
2017-01-18 02:25:23 +09:00
Hajime Hoshi
c44ee9cde2
graphics: Refactoring
2016-12-29 01:15:57 +09:00
Hajime Hoshi
aeaa877949
restorable: Remove (*restorable).width/height
2016-12-27 10:58:46 +09:00
Hajime Hoshi
5c403d9969
graphics: Avoid copying images twice
2016-12-27 10:43:05 +09:00
Hajime Hoshi
260b938422
graphics: CopyImage optimization
2016-12-27 03:21:07 +09:00
Hajime Hoshi
5c9b9ef6cb
graphics: Add BenchmarkCopyImageNRGBA
2016-12-27 01:57:36 +09:00
Hajime Hoshi
006f87d02b
graphics: Stop CopyImage blocking on browsers
2016-12-27 01:57:15 +09:00
Hajime Hoshi
3db15bc5bf
graphics: Avoid copying color.RGBA struct
2016-12-27 01:08:22 +09:00
Hajime Hoshi
6b4801ac7a
graphics: Make copying images faster
2016-12-27 00:50:14 +09:00
Hajime Hoshi
15f7a605c5
graphics: Create framebuffers lazily
2016-12-14 23:40:43 +09:00
Hajime Hoshi
b86f1771e4
ui: Add goroutine so that blocking is available everywhere
2016-11-29 01:40:06 +09:00
Hajime Hoshi
7bd2fb6ce2
graphics: Bug fix: ColorM.Scale worked wrongly
2016-11-27 23:27:20 +09:00
Hajime Hoshi
a1e868b822
ui: Don't use 'image-rendering' CSS on Safari ( #293 )
2016-11-26 23:45:06 +09:00
Hajime Hoshi
411721a4da
ui: Add TODO
2016-11-26 02:35:55 +09:00
Hajime Hoshi
74c552ea6c
opengl: Should access the prototype of WebGLRenderingContext on Safari ( #293 )
2016-11-26 01:17:22 +09:00
Hajime Hoshi
3e2f2e9f08
opengl: Update error messages
2016-11-26 00:57:02 +09:00
Hajime Hoshi
e47c3bbbfb
graphics: Limit image size strictly
2016-11-05 03:06:18 +09:00
Hajime Hoshi
07294a98b6
Move internal/graphics/opengl -> internal/opengl
2016-11-03 23:31:25 +09:00
Hajime Hoshi
b2780fb585
graphics: Merge commands when appending
2016-11-03 17:40:52 +09:00
Hajime Hoshi
50b2d8ee94
graphics: Use float values for vertices
2016-11-02 02:34:01 +09:00
Hajime Hoshi
b2be6681d4
graphics: Bug fix: invalid calc of num of quads
2016-11-02 02:08:12 +09:00
Hajime Hoshi
b188a0dd99
affine: Stop using multiple-dimension array for consistency
2016-11-01 23:32:27 +09:00
Hajime Hoshi
edf336499c
affine: Revert ColorM implementation to use float64 array
2016-11-01 23:32:24 +09:00
Hajime Hoshi
4915531450
affine: Add ColorM.Equals
2016-11-01 00:28:07 +09:00
Hajime Hoshi
d02c67a996
graphics: Use affine.ColorM instead of graphics.Matrix
2016-11-01 00:20:27 +09:00
Hajime Hoshi
84baee8ca7
Add internals/affine
2016-11-01 00:13:19 +09:00
Hajime Hoshi
49fb2635ec
graphics: Remove glMatrix
2016-10-29 05:02:22 +09:00
Hajime Hoshi
6de9e6696e
graphics: Cache total bytes
2016-10-29 01:07:19 +09:00
Hajime Hoshi
fbf6b6c525
graphics: Calc capacity of vertices
2016-10-27 01:42:18 +09:00
Hajime Hoshi
5a1eb24138
graphics: Improve speed by using []int16 instead of []uint8
2016-10-26 00:20:41 +09:00
Hajime Hoshi
a65ededc3c
graphics: Merge draw commands if possible
2016-10-25 11:53:00 +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
2c844ec70c
graphics: Refactoring: Simplify NextPowerOf2Int
2016-10-23 01:59:04 +09:00
Hajime Hoshi
e72ccee61b
graphics: Expose graphics.QuadVertexNum
2016-10-23 01:52:55 +09:00
Hajime Hoshi
af4130c0d6
graphics: Bug fix: wrong argument in VertexAttribPointer
2016-10-22 20:47:33 +09:00
Hajime Hoshi
f21f6d357e
graphics: Bug fix: Command splitting threshold is more strict on browsers?
2016-10-22 20:25:58 +09:00
Hajime Hoshi
27acc5efd9
opengl: Use uint8 intead of byte
2016-10-22 18:45:32 +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
80e3a3497c
opengl: BufferSubData should be able to take generic type
2016-10-22 03:21:53 +09:00
Hajime Hoshi
37c0461573
internal: Fix LicenseComment not to use LICENSE file
2016-10-21 00:30:51 +09:00
Hajime Hoshi
3264532004
doc: Add and use LicenseYear
2016-10-21 00:12:31 +09:00
Hajime Hoshi
3efabe988a
graphics: Reduce magic numbers
2016-10-17 11:16:17 +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
dc0254db40
ui: Optimized scaling on browsers
2016-09-15 10:04:48 +09:00
Hajime Hoshi
1f8cd41326
windows: Add comments
2016-09-11 22:34:39 +09:00
Hajime Hoshi
5cd048011e
restorable: Fix a comment
2016-09-10 01:36:56 +09:00
Hajime Hoshi
959abec06d
restoring: Refactoring: Add Image.screen and unify restoring functions
2016-09-04 02:31:50 +09:00
Hajime Hoshi
c73860caa2
restorable: Bug fix: volatile images are not relaiable when restoring
2016-09-04 02:16:58 +09:00
Hajime Hoshi
865a45e052
restorable: Reset states after restoring
2016-09-04 02:11:02 +09:00
Hajime Hoshi
d386f57ac6
restoring: Refactoring: Add Image.volatile
2016-09-04 02:06:54 +09:00
Hajime Hoshi
43e8349567
graphics: Remove imageImpl.width/height
2016-09-04 01:25:02 +09:00
Hajime Hoshi
b8b7e97511
restorable: Remove arguments from restoring functions
2016-09-04 00:57:23 +09:00
Hajime Hoshi
02151e48ea
restorable: Remove Image()
2016-09-04 00:53:30 +09:00
Hajime Hoshi
82febc9c6e
restorable: Reduce Image() usage and remove MakeStale()
2016-09-03 23:54:52 +09:00
Hajime Hoshi
e7558036ae
restorable: Remove IsStale
2016-09-03 23:42:44 +09:00
Hajime Hoshi
cae75fac69
graphics: Bug fix: Invalid Clear calling in Dispose
2016-09-03 23:42:28 +09:00
Hajime Hoshi
fb3724a40e
graphics: Remove imageImpl.image member
2016-09-03 23:08:51 +09:00
Hajime Hoshi
438afdac5b
restorable: Add NewImage
2016-09-03 22:24:37 +09:00
Hajime Hoshi
9c079917f1
Rename pixels -> restorable
2016-09-03 22:19:59 +09:00
Hajime Hoshi
071b65f173
loop: Remove IsRunning
2016-09-03 21:14:06 +09:00
Hajime Hoshi
cd885ce7c5
ui: Add SetCursorVisibility ( #258 )
2016-09-03 18:54:21 +09:00
Hajime Hoshi
d08beef412
ui: Bug fix: ScreenScale should not cause deadlock ( #264 )
2016-09-03 18:04:22 +09:00
Hajime Hoshi
87efaafcff
Update GLFW version 3.1 -> 3.2
2016-09-03 16:25:43 +09:00
Hajime Hoshi
84b512a3ac
ui: Bug fix: Remove unneeded argument
2016-09-03 02:12:11 +09:00
Hajime Hoshi
ec70ea3be5
ui: Refactoring
2016-09-03 01:06:16 +09:00
Hajime Hoshi
db782ff0d9
ui: Remove UserInterface interface
2016-09-03 00:20:05 +09:00
Hajime Hoshi
f204c14f90
ui: Rename Run -> RunMainThreadLoop
2016-09-03 00:00:44 +09:00
Hajime Hoshi
6164ecb9fc
ui: Reduce functions in UserInterface
2016-09-02 23:45:54 +09:00
Hajime Hoshi
128dcaa342
ui: Rename Main -> Run
2016-09-02 02:59:40 +09:00
Hajime Hoshi
571d67f967
ui: Reduce methods in UserInterface
2016-09-02 02:31:03 +09:00
Hajime Hoshi
93a994f1d6
ui: Refactoring on mobile
2016-09-02 01:34:51 +09:00
Hajime Hoshi
453c2c4589
ui: Remove Terminate
2016-09-02 01:07:41 +09:00
Hajime Hoshi
6da16aa1a0
ui: Refactoring: Remove events
2016-09-02 00:53:05 +09:00
Hajime Hoshi
b95d714eed
loop: Simplify update
2016-09-01 22:21:58 +09:00
Hajime Hoshi
068bc55ded
loop: Remove comments
2016-09-01 10:37:08 +09:00
Hajime Hoshi
1e0bdf844d
loop: Bug fix: vsync should not use channels on browsers ( #259 )
2016-09-01 10:36:00 +09:00
Hajime Hoshi
57a32464dc
loop: Use RLock
2016-08-30 23:56:34 +09:00
Hajime Hoshi
53e1f90146
graphics: Bug fix: Don't store interface color.Color value inside ( #261 )
2016-08-30 23:34:18 +09:00
Hajime Hoshi
c23224c56b
loop: Bug fix: the threshold to detect if the game stops was too strict (#)
2016-08-29 01:40:43 +09:00
Hajime Hoshi
cddaae55dd
ui: Simplify vsync
2016-08-28 17:09:58 +09:00
Hajime Hoshi
de1bb1b392
go generate
2016-08-27 00:50:26 +09:00
Hajime Hoshi
1cb66048ad
doc: go generate; Add style.css
2016-08-26 23:33:36 +09:00
Hajime Hoshi
3dad97af8a
Add comments
2016-08-23 00:05:23 +09:00
Hajime Hoshi
749a751369
graphics: Bug fix: Make an image stale when another stale image is drawn to this ( #257 )
2016-08-23 00:05:11 +09:00
Hajime Hoshi
c54dc8ee1c
graphics: Less calls of ReadPixelsFromVRAM
2016-08-20 23:25:45 +09:00
Hajime Hoshi
7b32d7a206
graphics: Bug fix: Pixels should be copied to store it as a command
2016-08-17 22:10:29 +09:00
Hajime Hoshi
612d3b07b0
ui: Bug fix: ui.funcs might be closed before sending a value
2016-08-17 01:57:20 +09:00
Hajime Hoshi
3619a796dc
ui: Check the return value of ReleaseDC()
2016-08-09 00:25:47 +09:00