mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-06-01 03:19:10 +12:00
Mooore
This commit is contained in:
parent
adb78bf838
commit
73321856c8
4 changed files with 53 additions and 29 deletions
include/renderer_gl
|
@ -34,11 +34,13 @@ struct GLStateManager {
|
|||
bool redMask, greenMask, blueMask, alphaMask;
|
||||
bool depthMask;
|
||||
|
||||
GLuint stencilMask;
|
||||
GLuint boundVAO;
|
||||
GLuint boundVBO;
|
||||
GLuint currentProgram;
|
||||
|
||||
GLenum depthFunc;
|
||||
GLenum logicOp;
|
||||
|
||||
void reset();
|
||||
void resetBlend();
|
||||
|
@ -121,6 +123,13 @@ struct GLStateManager {
|
|||
}
|
||||
}
|
||||
|
||||
void setLogicOp(GLenum op) {
|
||||
if (logicOp != op) {
|
||||
logicOp = op;
|
||||
OpenGL::setLogicOp(op);
|
||||
}
|
||||
}
|
||||
|
||||
void enableClipPlane(GLuint index) {
|
||||
if (index >= clipPlaneCount) [[unlikely]] {
|
||||
Helpers::panic("Enabled invalid clipping plane %d\n", index);
|
||||
|
@ -143,6 +152,13 @@ struct GLStateManager {
|
|||
}
|
||||
}
|
||||
|
||||
void setStencilMask(GLuint mask) {
|
||||
if (stencilMask != mask) {
|
||||
stencilMask = mask;
|
||||
OpenGL::setStencilMask(mask);
|
||||
}
|
||||
}
|
||||
|
||||
void bindVAO(GLuint handle) {
|
||||
if (boundVAO != handle) {
|
||||
boundVAO = handle;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue