Commit graph

52 commits

Author SHA1 Message Date
bunnei a941547c1c android: renderer_opengl: Partially implement glLogicOp on GLES. 2021-07-24 23:37:03 +05:30
weihuoya cddd447506 use separate texture buffer for light and fog
gl_state.cpp: Fix typo in texture buffer LUT

gl_state.cpp: Initialize texture_buffer_lut_lf
2021-07-24 23:36:53 +05:30
LC 8ce81b19be
General: Remove usages of ARRAY_SIZE where applicable. (#5392)
Same behavior, but without our own boilerplate function.
2020-06-19 09:10:45 -05:00
James Rowe 586b8e8b46 Change from QOpenGLWidget to QWindow
While QOpenGLWidget sounds like a good idea, it has issues which are
harder to debug due to how Qt manages the context behind the scenes. We
could probably work around any of these issues over time, but its
probably easier to do it ourselves with a QWindow directly.

Plus using QWindow + createWindowContainer is the easiest to use
configuration for Qt + Vulkan so this is probably much better in the
long run.
2019-11-09 13:12:30 -07:00
James Rowe 9c32c0b98b Change from render to texture to render to renderbuffer 2019-11-09 13:12:29 -07:00
SachinVin d63acfc1e9 video_core: add workarounds to enable GLES support
video_core: shorten GetGLSLVersionString

video_core: make GLES version and extensions consistent

video_core: move some logic to LoadShader

video_core: deduplicate fragment shader precision specifier
2019-02-12 16:57:18 -06:00
Tobias 46e8237e7e Port yuzu-emu/yuzu#1137: "renderer_opengl: Namespace OpenGL code" (#4423)
* renderer_opengl: Namespace OpenGL code

Namespaces all OpenGL code under the OpenGL namespace.

Prevents polluting the global namespace and allows clear distinction
between other renderers' code in the future.

* Also namespace TextureCubeConfig
2018-11-16 23:29:10 -08:00
Weiyi Wang 7d8f115185 Prefix all size_t with std::
done automatically by executing regex replace `([^:0-9a-zA-Z_])size_t([^0-9a-zA-Z_])` -> `$1std::size_t$2`
2018-09-06 16:03:28 -04:00
Markus Wick 831d4f9aeb gl_rasterizer: Use the shared texture buffer for the proctex lut. 2018-06-22 17:20:55 +02:00
Markus Wick 1ca6d2ea8d gl_rasterizer: Use the shared texture buffer for the noise, color and alpha map. 2018-06-22 17:20:55 +02:00
Markus Wick 63fb7dcc1b gl_rasterizer: Use the shared texture buffer for the fog lut. 2018-06-22 17:20:55 +02:00
Markus Wick 4679487640 gl_rasterizer: Use the shared texture buffer for the lighting lut. 2018-06-22 17:20:54 +02:00
Markus Wick a8396cdbed renderer_opengl: Create shared texture buffer. 2018-06-22 17:05:40 +02:00
wwylele 781912e854 gl_rasterize: implement shadow mapping using image load/store 2018-06-01 14:26:44 +03:00
wwylele 4f9b9c4b80 gl_state: add pipeline state 2018-04-11 14:41:43 +03:00
wwylele 15e8664ef7 gl_rasterizer: implement texture cube 2018-03-10 01:15:06 +02:00
James Rowe 160ac25527 OpenGL State: Change setters so they don't directly write to curstate 2017-12-23 16:10:25 -07:00
Dwayne Slater 350082ab75 Fix logic ops not being enabled in the OpenGL renderer 2017-11-29 16:30:19 -05:00
Huw Pascoe a13ab958cb Fixed type conversion ambiguity 2017-09-30 09:34:35 +01:00
wwylele 1eca380886 gl_rasterizer: add clipping plane z<=0 defined in PICA 2017-08-21 08:03:07 +03:00
wwylele 8482933db8 gl_rasterizer: use texture buffer for proctex LUT 2017-07-01 11:02:48 +03:00
wwylele 8978ecb09c gl_rasterizer: use texture buffer for fog LUT 2017-06-22 20:41:00 +03:00
wwylele 457659fe01 gl_state: reset 1d textures 2017-06-21 23:13:06 +03:00
wwylele be9e952bdc gl_rasterizer: manage texture ids in one place 2017-06-21 23:13:06 +03:00
wwylele ab60414122 gl_rasterizer/lighting: fix LUT interpolation 2017-06-21 23:13:06 +03:00
wwylele 4d62e75fb2 gl_rasterizer: implement procedural texture 2017-05-20 13:50:50 +03:00
Markus Wick d0d49bb951 OpenGL: Drop framebuffer completeness check.
This OpenGL call synchronize the worker thread of the nvidia blob.
It can be verified on linux with the __GL_THREADED_OPTIMIZATIONS=1 environment variable.
Those errors should not happen on tested drivers.
It was used as a workaround for https://bugs.freedesktop.org/show_bug.cgi?id=94148
2016-12-07 22:09:13 +01:00
Subv 4623415026 RasterizerGL: Use GL_TRUE and 0xFF in the stencil and depth masks instead of simply true and -1 2016-11-27 13:09:11 -05:00
Yuri Kunde Schlesner 84fbbe2629 Use negative priorities to avoid special-casing the self-include 2016-09-21 00:15:56 -07:00
Emmanuel Gil Peyrot ebdae19fd2 Remove empty newlines in #include blocks.
This makes clang-format useful on those.

Also add a bunch of forgotten transitive includes, which otherwise
prevented compilation.
2016-09-21 11:15:47 +09:00
Emmanuel Gil Peyrot dc8479928c Sources: Run clang-format on everything. 2016-09-18 09:38:01 +09:00
Jannik Vogel a12571c709 OpenGL: Implement fog 2016-06-07 00:06:28 +02:00
Jannik Vogel 5864cb7e00 OpenGL: Support blend equation 2016-05-12 22:57:40 +02:00
Emmanuel Gil Peyrot 691a42fe98 VideoCore: Run include-what-you-use and fix most includes. 2016-04-30 17:02:41 +01:00
tfarley 22f3a7e94c HWRasterizer: Texture forwarding 2016-04-21 17:27:56 -04:00
MerryMage 0801363840 renderer_opengl: Initalise fragment shader LUT textures 2016-02-26 00:12:38 +00:00
bunnei 021cb0bced renderer_opengl: Use textures for fragment shader LUTs instead of UBOs.
- Gets us LUT interpolation for free.
- Some older Intel GPU drivers did not support the big UBOs needed to store the LUTs.
2016-02-05 17:17:31 -05:00
Yuri Kunde Schlesner 95dbc6eb0e OpenGL: Add support for glFrontFace in the state tracker 2015-12-04 21:58:26 -08:00
Subv 823ce62f2f FragShader: Use an UBO instead of several individual uniforms 2015-11-18 21:03:56 -05:00
Lioncash aec28ed91e video_core: Reorganize headers 2015-09-11 07:31:15 -04:00
Yuri Kunde Schlesner ec28f037e6 OpenGL: Add support for Sampler Objects to state tracker 2015-09-03 15:09:50 -03:00
Subv 46f660a789 GLRasterizer: Implemented stencil testing in the hw renderer. 2015-08-20 10:11:09 -05:00
Yuri Kunde Schlesner 254582aa35 OpenGL: Fix state tracking in situations with reused object handles
If an OpenGL object is created, bound to a binding using the state
tracker, and then destroyed, a newly created object can be assigned the
same numeric handle by OpenGL. However, even though it is a new object,
and thus needs to be bound to the binding again, the state tracker
compared the current and previous handles and concluded that no change
needed to be made, leading to failure to bind objects in certain cases.

This manifested as broken text in VVVVVV, which this commit fixes along
with similar texturing problems in other games.
2015-08-06 00:59:37 -03:00
Yuri Kunde Schlesner ff68db61bc OpenGL: Remove redundant texture.enable_2d field from OpenGLState
All uses of this field where it's false can just set the texture id to 0
instead.
2015-08-05 22:55:22 -03:00
Yuri Kunde Schlesner e5c4fe0098 GL Renderer: Remove erroneous glEnable(GL_TEXTURE_2D) calls
In OpenGL 3, texturing is always enabled, and this call is invalid.
While it produced no effect in the rest of the execution, it wouldn't
have the intended effect of disabling texturing for that unit. Instead
bind a null texture to the unit.
2015-07-22 01:22:09 -03:00
tfarley 26bc816d7a Renderer formatting edits 2015-06-08 19:19:15 -04:00
tfarley d42275f11c Implemented glColorMask 2015-06-08 19:18:17 -04:00
bunnei e6ace38815 Pica: Implement LogicOp function. 2015-05-31 01:52:41 -04:00
Emmanuel Gil Peyrot b1503b2020 Remove every trailing whitespace from the project (but externals). 2015-05-29 21:59:29 +01:00
Lioncash 951353558e gl_state: Remove unnecessary const specifier on Apply 2015-05-23 00:58:32 -04:00