mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-12 06:08:30 +09:00
[Feat] (GL_Drawing): Add DrawElementsSHITTILY. Add SPIRV->GLSL ES conversion.
This commit is contained in:
@@ -107,6 +107,7 @@ GLenum CommonState::Clear(GLbitfield mask) {
|
||||
if ((mask & ~validBits) != 0) {
|
||||
return GL_INVALID_VALUE;
|
||||
}
|
||||
clearMask = mask;
|
||||
return GL_NO_ERROR;
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,13 @@
|
||||
#include "../../../Includes.h"
|
||||
|
||||
class CommonState {
|
||||
private:
|
||||
public:
|
||||
// Viewport
|
||||
GLint viewport[4] = {0, 0, 0, 0};
|
||||
|
||||
// Color mask
|
||||
GLboolean colorMask[4] = {GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE};
|
||||
|
||||
// Pixel storage parameters
|
||||
std::unordered_map<GLenum, GLint> pixelStoreParams;
|
||||
|
||||
@@ -22,21 +28,15 @@ private:
|
||||
// Clear state
|
||||
GLfloat clearColor[4] = {0.0f, 0.0f, 0.0f, 0.0f};
|
||||
GLfloat clearDepth = 1.0f;
|
||||
|
||||
// Color mask
|
||||
GLboolean colorMask[4] = {GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE};
|
||||
|
||||
GLenum clearMask;
|
||||
|
||||
// Depth state
|
||||
GLenum depthFunc = GL_LESS;
|
||||
GLboolean depthMask = GL_TRUE;
|
||||
|
||||
// Viewport
|
||||
GLint viewport[4] = {0, 0, 0, 0};
|
||||
|
||||
|
||||
// Capability enables
|
||||
std::unordered_map<GLenum, bool> capabilities;
|
||||
|
||||
public:
|
||||
CommonState();
|
||||
|
||||
// Return: the validity of the operation, according to OpenGL 3 standard
|
||||
@@ -57,6 +57,7 @@ public:
|
||||
GLenum Viewport(GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
|
||||
GLint QueryPixelStoreInt(GLenum pname);
|
||||
|
||||
};
|
||||
|
||||
#endif //MOBILEGL_COMMONSTATE_H
|
||||
|
||||
Reference in New Issue
Block a user