martinfouilleul
b797f187dc
[wip, win32, canvas] porting new canvas renderer to opengl
2023-06-27 18:53:09 +02:00
martinfouilleul
83f128fb55
[win32, graphics] adding example to test rendering in a secondary thread
2023-06-21 19:14:56 +02:00
martinfouilleul
2bec7a633a
[win32] reflected changes to canvas surface interface on GL backend. But implementation still uses the (slower) Loop-Blinn + triangle fan method.
2023-05-16 18:06:22 +02:00
martinfouilleul
52538248d9
[win32, wip] compile and run simple window example
2023-05-12 16:46:13 +02:00
Martin Fouilleul
b27dc615d1
Finish separating graphics_common and graphics_surface + add platform_math, so that we can compile graphics_common to wasm in orca
2023-04-26 14:56:02 +02:00
Martin Fouilleul
794f47b141
abstracting logging for orca
2023-04-18 18:05:54 +02:00
Martin Fouilleul
86a16d3775
modifications to log system to support orca env where stdio is not defined
2023-04-18 14:33:27 +02:00
Martin Fouilleul
592f4cdecd
end of line renormalization
2023-03-05 16:05:43 +01:00
Martin Fouilleul
3615775168
[canvas] decompose image atlas API into simple rect atlas API + image atlas helpers. This avoids creating a bunch of new types/handles, and exposes the underlying image/sourceRegion so that user code can freely use these for more complex scenarios (eg drawing only a sub-region of an atlased image, or using an atlas image for arbitrary path filling)
2023-02-28 16:54:39 +01:00
Martin Fouilleul
d4bceba7e9
[canvas] basic image atlas API
2023-02-28 13:16:36 +01:00
martinfouilleul
9cb4aedbc5
[canvas, gl] use pre-multiplied alpha in draw shader and when compositing batches
2023-02-27 19:50:18 +01:00
martinfouilleul
8f834fa1a5
[wip, canvas, gl] implementing basic image API
2023-02-27 19:25:41 +01:00
martinfouilleul
20e425494f
Use a custom GL loader to allow different versions of GL/GLES APIs to co-exist. The loader fills an api struct with GL functions pointers.
...
We have a per-thread pointer to select which api struct is used, and GL functions are pound-defined to call the versions in that struct.
GL/GLES surfaces can use one of the loader function to load their api, and the prepare proc of the surface sets its api as the current one
before gl calls are issued.
2023-02-16 19:35:01 +01:00
martinfouilleul
80ea8db687
[surface/canvas cleanup]
...
- Make build-time and runtime backend selection a bit easier
- Reorganized backend-specific files with slightly more coherent naming scheme
2023-02-10 16:56:10 +01:00
martinfouilleul
08d3521b61
[canvas/surface cleanup]
...
- properly destroy gl canvas backend
- properly destroy gl surface
2023-02-09 18:40:42 +01:00
martinfouilleul
af7cbae1fa
[canvas cleanup] cleanup canvas resources on creation failure
2023-02-09 18:18:12 +01:00
martinfouilleul
4e816a838b
[Clean canvas/shaders]
...
- Simplified shader names, prefix embedded strings by "glsl_"
- Extracted shader compilation in common function
- Add shader version string and common structs in canvas code rather than in every shader file
- Renamed zIndex with shapeIndex everywhere
2023-02-09 16:14:15 +01:00
martinfouilleul
4a8c77f023
- Move and Zoom perf_text example with the mouse
...
- Reverted to using 4 bits of subpixel precision and computing cross products with 32 bits integers, for perf reasons
- Fixed some confusion in tile array size vs number of elements (could still clean-up naming a bit though)
- Fixed bug where triangles on the left or below canvas boundaries where bucketted to the first colum/row of tiles
- Fixed bug in mouse button message handling (was always sending press on left button)
2023-02-09 13:09:41 +01:00
martinfouilleul
7cf4c3d925
opengl surface/renderer: set surface scaling according to dpi of first monitor. Use that dpi to scale backing texture of canvas renderer. Note: changing monitor isn't handled yet!
2023-02-08 18:22:54 +01:00
martinfouilleul
2419ab7889
opengl canvas renderer: splitting vertex data and shape data
2023-02-07 18:59:51 +01:00
martinfouilleul
f0bc88c4fb
gl canvas renderer with buffer re-specification
2023-02-07 17:00:59 +01:00
martinfouilleul
5788cdbcda
Desktop opengl 4.3 canvas
2023-02-07 13:24:14 +01:00