mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-12 09:09:47 +12:00
Remove opengl.hpp from gles.patch, use in-file gles checks
This commit is contained in:
parent
4adc50039c
commit
8b84e06c68
2 changed files with 14 additions and 32 deletions
32
.github/gles.patch
vendored
32
.github/gles.patch
vendored
|
@ -241,35 +241,3 @@ index 057f9a88..dc735ced 100644
|
||||||
|
|
||||||
v_quaternion = a_quaternion;
|
v_quaternion = a_quaternion;
|
||||||
}
|
}
|
||||||
diff --git a/third_party/opengl/opengl.hpp b/third_party/opengl/opengl.hpp
|
|
||||||
index 607815fa..cbfcc096 100644
|
|
||||||
--- a/third_party/opengl/opengl.hpp
|
|
||||||
+++ b/third_party/opengl/opengl.hpp
|
|
||||||
@@ -602,22 +602,22 @@ namespace OpenGL {
|
|
||||||
static void disableScissor() { glDisable(GL_SCISSOR_TEST); }
|
|
||||||
static void enableBlend() { glEnable(GL_BLEND); }
|
|
||||||
static void disableBlend() { glDisable(GL_BLEND); }
|
|
||||||
- static void enableLogicOp() { glEnable(GL_COLOR_LOGIC_OP); }
|
|
||||||
- static void disableLogicOp() { glDisable(GL_COLOR_LOGIC_OP); }
|
|
||||||
+ static void enableLogicOp() { /* glEnable(GL_COLOR_LOGIC_OP); */ }
|
|
||||||
+ static void disableLogicOp() { /* glDisable(GL_COLOR_LOGIC_OP); */ }
|
|
||||||
static void enableDepth() { glEnable(GL_DEPTH_TEST); }
|
|
||||||
static void disableDepth() { glDisable(GL_DEPTH_TEST); }
|
|
||||||
static void enableStencil() { glEnable(GL_STENCIL_TEST); }
|
|
||||||
static void disableStencil() { glDisable(GL_STENCIL_TEST); }
|
|
||||||
|
|
||||||
- static void enableClipPlane(GLuint index) { glEnable(GL_CLIP_DISTANCE0 + index); }
|
|
||||||
- static void disableClipPlane(GLuint index) { glDisable(GL_CLIP_DISTANCE0 + index); }
|
|
||||||
+ static void enableClipPlane(GLuint index) { /* glEnable(GL_CLIP_DISTANCE0 + index); */ }
|
|
||||||
+ static void disableClipPlane(GLuint index) { /* glDisable(GL_CLIP_DISTANCE0 + index); */ }
|
|
||||||
|
|
||||||
static void setDepthFunc(DepthFunc func) { glDepthFunc(static_cast<GLenum>(func)); }
|
|
||||||
static void setColourMask(GLboolean r, GLboolean g, GLboolean b, GLboolean a) { glColorMask(r, g, b, a); }
|
|
||||||
static void setDepthMask(GLboolean mask) { glDepthMask(mask); }
|
|
||||||
|
|
||||||
// TODO: Add a proper enum for this
|
|
||||||
- static void setLogicOp(GLenum op) { glLogicOp(op); }
|
|
||||||
+ static void setLogicOp(GLenum op) { /* glLogicOp(op); */ }
|
|
||||||
|
|
||||||
enum Primitives {
|
|
||||||
Triangle = GL_TRIANGLES,
|
|
||||||
|
|
14
third_party/opengl/opengl.hpp
vendored
14
third_party/opengl/opengl.hpp
vendored
|
@ -602,22 +602,36 @@ namespace OpenGL {
|
||||||
static void disableScissor() { glDisable(GL_SCISSOR_TEST); }
|
static void disableScissor() { glDisable(GL_SCISSOR_TEST); }
|
||||||
static void enableBlend() { glEnable(GL_BLEND); }
|
static void enableBlend() { glEnable(GL_BLEND); }
|
||||||
static void disableBlend() { glDisable(GL_BLEND); }
|
static void disableBlend() { glDisable(GL_BLEND); }
|
||||||
|
#ifdef USING_GLES
|
||||||
|
static void enableLogicOp() { /* glEnable(GL_COLOR_LOGIC_OP); */ }
|
||||||
|
static void disableLogicOp() { /* glDisable(GL_COLOR_LOGIC_OP); */ }
|
||||||
|
#else
|
||||||
static void enableLogicOp() { glEnable(GL_COLOR_LOGIC_OP); }
|
static void enableLogicOp() { glEnable(GL_COLOR_LOGIC_OP); }
|
||||||
static void disableLogicOp() { glDisable(GL_COLOR_LOGIC_OP); }
|
static void disableLogicOp() { glDisable(GL_COLOR_LOGIC_OP); }
|
||||||
|
#endif
|
||||||
static void enableDepth() { glEnable(GL_DEPTH_TEST); }
|
static void enableDepth() { glEnable(GL_DEPTH_TEST); }
|
||||||
static void disableDepth() { glDisable(GL_DEPTH_TEST); }
|
static void disableDepth() { glDisable(GL_DEPTH_TEST); }
|
||||||
static void enableStencil() { glEnable(GL_STENCIL_TEST); }
|
static void enableStencil() { glEnable(GL_STENCIL_TEST); }
|
||||||
static void disableStencil() { glDisable(GL_STENCIL_TEST); }
|
static void disableStencil() { glDisable(GL_STENCIL_TEST); }
|
||||||
|
|
||||||
|
#ifdef USING_GLES
|
||||||
|
static void enableClipPlane(GLuint index) { /* glEnable(GL_CLIP_DISTANCE0 + index); */ }
|
||||||
|
static void disableClipPlane(GLuint index) { /* glDisable(GL_CLIP_DISTANCE0 + index); */ }
|
||||||
|
#else
|
||||||
static void enableClipPlane(GLuint index) { glEnable(GL_CLIP_DISTANCE0 + index); }
|
static void enableClipPlane(GLuint index) { glEnable(GL_CLIP_DISTANCE0 + index); }
|
||||||
static void disableClipPlane(GLuint index) { glDisable(GL_CLIP_DISTANCE0 + index); }
|
static void disableClipPlane(GLuint index) { glDisable(GL_CLIP_DISTANCE0 + index); }
|
||||||
|
#endif
|
||||||
|
|
||||||
static void setDepthFunc(DepthFunc func) { glDepthFunc(static_cast<GLenum>(func)); }
|
static void setDepthFunc(DepthFunc func) { glDepthFunc(static_cast<GLenum>(func)); }
|
||||||
static void setColourMask(GLboolean r, GLboolean g, GLboolean b, GLboolean a) { glColorMask(r, g, b, a); }
|
static void setColourMask(GLboolean r, GLboolean g, GLboolean b, GLboolean a) { glColorMask(r, g, b, a); }
|
||||||
static void setDepthMask(GLboolean mask) { glDepthMask(mask); }
|
static void setDepthMask(GLboolean mask) { glDepthMask(mask); }
|
||||||
|
|
||||||
// TODO: Add a proper enum for this
|
// TODO: Add a proper enum for this
|
||||||
|
#ifdef USING_GLES
|
||||||
|
static void setLogicOp(GLenum op) { /* glLogicOp(op); */ }
|
||||||
|
#else
|
||||||
static void setLogicOp(GLenum op) { glLogicOp(op); }
|
static void setLogicOp(GLenum op) { glLogicOp(op); }
|
||||||
|
#endif
|
||||||
|
|
||||||
enum Primitives {
|
enum Primitives {
|
||||||
Triangle = GL_TRIANGLES,
|
Triangle = GL_TRIANGLES,
|
||||||
|
|
Loading…
Add table
Reference in a new issue