Commit graph

133 commits

Author SHA1 Message Date
wheremyfoodat
60655febba [GL] Disable scissor in clearBuffer 2023-07-27 19:39:49 +03:00
wheremyfoodat
79a341a297 [GL] Fix depth mask getting corrupted, remove dead code 2023-07-27 18:17:14 +03:00
wheremyfoodat
1d3b078dfb Convert warn to log 2023-07-27 18:01:18 +03:00
wheremyfoodat
b4cc743608 [GL] Add stencil enable to state tracker 2023-07-27 15:34:21 +03:00
GPUCode
c6c71bb9b2 renderer_gl: Implement semi proper clears 2023-07-26 22:34:39 +03:00
GPUCode
50bcf3b617 renderer_gl: Respect depth-stencil write flag 2023-07-26 22:13:41 +03:00
GPUCode
6f7874227c renderer_gl: Implement logic op 2023-07-26 22:08:20 +03:00
wheremyfoodat
95a8917589 renderer_gl: Implement stencil testing 2023-07-26 22:05:30 +03:00
Wunkolo
b048d4dd6e Add SDL_Window to initGraphicsContext prototype
This value is needed for vulkan to properly allocate a surface, and would benefit OpenGL to move more of its initialization code into here rather than in `emulator.cpp`.
2023-07-22 13:16:23 -07:00
wheremyfoodat
fbcb7cee42
Merge pull request #128 from GPUCode/span-across
texture: Use spans
2023-07-20 16:10:00 +03:00
GPUCode
a019d98af9 texture: Use spans 2023-07-20 15:43:24 +03:00
Wunkolo
b10e69de0e Add virtual deconstructor override
Virtual classes need to override the base-type deconstructor so that they are proper called when referred to by their base-type.
2023-07-17 09:30:12 -07:00
Wunkolo
a9bb11e4b3 Migrate OpenGL string-literals to embedded files
Rather than declaring a big C++ literal for these strings, they are now
proper `.vert` and `.frag` files that will become embedded into the
application at build-time. It also allows for clang-format to format the
glsl files the same as our C++ code. CMake will also automatically track
and re-embed the file if it detects that the glsl source files have
changed since the last build. Ex, making a change to
`opengl_display.frag` and compiling will automatically recompile and
link the resource-target that it is associated with.
2023-07-15 19:12:07 -07:00
wheremyfoodat
a601686cb1 Pretend to know CMake 2023-07-16 00:11:07 +03:00
wheremyfoodat
7b6cd90d36 Cleanup for #98 2023-07-15 04:56:43 +03:00
Wunkolo
666fd96e7f Move color/depth format and size to Renderer interface
The state of these values are not specific to any rendering backend and
can be moved to be part of the interface itself
2023-07-11 11:28:06 -07:00
Wunkolo
5b7fa5be7e Remove redundant Renderer::screenshot definition 2023-07-11 11:28:06 -07:00
Wunkolo
0f3d77768d Fix array declarations to use block-formatting 2023-07-11 11:28:06 -07:00
Wunkolo
4864c51125 Migrate OpenGL specific headers to renderer_gl 2023-07-11 11:28:06 -07:00
Wunkolo
c53080b444 Fix HTTPServer gpu-renderer interfacing
Fixing some compilation issues that occur when enabling the HTTP server
2023-07-11 11:28:06 -07:00
Wunkolo
2a1683ba62 Introduce "Renderer" abstraction layer
Adds a `renderer` class for which a rendering backend must implement and
will conditionally use OpenGL in the case that `ENABLE_GL` is enabled.
2023-07-11 11:27:35 -07:00
Wunkolo
d96289cc05 Address remaining C4244 warnings
Remaining warnings regarding an implicit cast from `double` to `float`.
2023-07-10 12:33:37 -07:00
Wunkolo
119c908aa7 Add explicit return-type overload for getBits
Allows the return-type to be specified, allowing a concise final cast
after extracting the bit-type.  Addresses the remaining `C4244` warnings
regarding `getBits`.
2023-07-10 12:33:37 -07:00
Wunkolo
37b75f0928 Fix C4267/C4244 warnings
Address warnings involving lossy conversions from larger integer-types into smaller integer-types
2023-07-10 12:33:37 -07:00
wheremyfoodat
ba1c3a8ec5 Moar HTTP 2023-07-10 11:30:09 +03:00
wheremyfoodat
e67b98f990 doormat 2023-07-07 12:19:04 +03:00
Sky
255947b2fc [GPU] Add texture surface cache eviction
Implemented as a simple ring buffer evicting the oldest entry for now.
2023-07-06 08:48:37 -07:00
wheremyfoodat
883e1d4bd0 Madness trying to optimize assembly by reordering statements 2023-07-05 22:16:15 +03:00
wheremyfoodat
52c7783ae1 [OpenGL] Same for depth func 2023-07-05 19:08:13 +03:00
wheremyfoodat
7307bd270b [OpenGL] Same for depth mask 2023-07-05 18:54:09 +03:00
wheremyfoodat
d80785cbb5 [OpenGL] More efficient colour mask handling 2023-07-05 18:23:14 +03:00
wheremyfoodat
feacb9359d Formatting 2023-07-05 02:59:54 +03:00
wheremyfoodat
dd3e1ea72b Ditch more uniforms 2023-07-05 01:37:18 +03:00
wheremyfoodat
c282a44c27 [OpenGL renderer] Fewer uniform uploads 2023-07-05 01:12:13 +03:00
wheremyfoodat
3e18281a99 Remove outdated comments 2023-07-05 00:46:34 +03:00
wheremyfoodat
139c8759c9 More OpenGL state management stuff 2023-07-05 00:43:49 +03:00
wheremyfoodat
a3d8f777b4 PicaVertex -> PICA::Vertex 2023-07-04 23:40:47 +03:00
wheremyfoodat
aa27389473 [GL renderer] Implement clipping planes 2023-07-04 20:33:14 +03:00
wheremyfoodat
0cc8d0d8a4 Some GLSL formatting 2023-07-04 18:47:56 +03:00
wheremyfoodat
e854d4ba63 Formatting 2023-07-04 18:15:27 +03:00
Sky
0f66527cbe
Merge pull request #1 from wheremyfoodat/master
Not Ignoring this PR I fucked up something on my Github GUI
2023-07-03 13:05:46 -07:00
Sky
157254e8a9 [GL] Set disabled light LUTs to 0
Fixes Kirby and Mario Kart
2023-07-02 22:01:42 -07:00
Sky
df555372ad [GL] Move quaternion to normal, et. al into vs 2023-07-02 21:04:29 -07:00
Sky
12dbaeaeb0 [GL] Initial Implementation of Lighting LUTs 2023-07-02 16:14:11 -07:00
wheremyfoodat
0b2ff6c5c8 Separate user and dev builds 2023-07-02 22:36:45 +03:00
Sky
769e90a45f [GL] Implement most fragment lighting 2023-07-01 22:14:57 -07:00
Sky
6fababb93a [GL] Pipe Pica registers and implement ambient lighting 2023-07-01 16:43:57 -07:00
Sky
de3c4020d8 [GL] Add lighting attributes 2023-07-01 15:16:35 -07:00
wheremyfoodat
1ac3a474da Fix formatting & cmake 2023-07-01 22:35:07 +03:00
Sky
ca89909c00 Refactored Vertex Pipeline to always use Pica Formatted Vertex 2023-07-01 11:39:25 -07:00