mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 01:17:34 +00:00
LibGL: Add stubs for glPushAttrib
and glPopAttrib
This commit is contained in:
parent
fbed7a5ba8
commit
0453cad46c
5 changed files with 37 additions and 1 deletions
|
@ -468,6 +468,8 @@ GLAPI void glRasterPos2i(GLint x, GLint y);
|
||||||
GLAPI void glMaterialf(GLenum face, GLenum pname, GLfloat param);
|
GLAPI void glMaterialf(GLenum face, GLenum pname, GLfloat param);
|
||||||
GLAPI void glMaterialfv(GLenum face, GLenum pname, GLfloat const* params);
|
GLAPI void glMaterialfv(GLenum face, GLenum pname, GLfloat const* params);
|
||||||
GLAPI void glLineWidth(GLfloat width);
|
GLAPI void glLineWidth(GLfloat width);
|
||||||
|
GLAPI void glPushAttrib(GLbitfield mask);
|
||||||
|
GLAPI void glPopAttrib();
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
|
@ -99,6 +99,8 @@ public:
|
||||||
virtual void gl_raster_pos(GLfloat x, GLfloat y, GLfloat z, GLfloat w) = 0;
|
virtual void gl_raster_pos(GLfloat x, GLfloat y, GLfloat z, GLfloat w) = 0;
|
||||||
virtual void gl_materialv(GLenum face, GLenum pname, GLfloat const* params) = 0;
|
virtual void gl_materialv(GLenum face, GLenum pname, GLfloat const* params) = 0;
|
||||||
virtual void gl_line_width(GLfloat width) = 0;
|
virtual void gl_line_width(GLfloat width) = 0;
|
||||||
|
virtual void gl_push_attrib(GLbitfield mask) = 0;
|
||||||
|
virtual void gl_pop_attrib() = 0;
|
||||||
|
|
||||||
virtual void present() = 0;
|
virtual void present() = 0;
|
||||||
};
|
};
|
||||||
|
|
|
@ -164,3 +164,13 @@ void glScissor(GLint x, GLint y, GLsizei width, GLsizei height)
|
||||||
{
|
{
|
||||||
g_gl_context->gl_scissor(x, y, width, height);
|
g_gl_context->gl_scissor(x, y, width, height);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void glPushAttrib(GLbitfield mask)
|
||||||
|
{
|
||||||
|
g_gl_context->gl_push_attrib(mask);
|
||||||
|
}
|
||||||
|
|
||||||
|
void glPopAttrib()
|
||||||
|
{
|
||||||
|
g_gl_context->gl_pop_attrib();
|
||||||
|
}
|
||||||
|
|
|
@ -2327,6 +2327,24 @@ void SoftwareGLContext::gl_line_width(GLfloat width)
|
||||||
m_line_width = width;
|
m_line_width = width;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SoftwareGLContext::gl_push_attrib(GLbitfield mask)
|
||||||
|
{
|
||||||
|
APPEND_TO_CALL_LIST_AND_RETURN_IF_NEEDED(gl_push_attrib, mask);
|
||||||
|
RETURN_WITH_ERROR_IF(m_in_draw_state, GL_INVALID_OPERATION);
|
||||||
|
|
||||||
|
// FIXME: implement
|
||||||
|
dbgln_if(GL_DEBUG, "SoftwareGLContext FIXME: implement gl_push_attrib({})", mask);
|
||||||
|
}
|
||||||
|
|
||||||
|
void SoftwareGLContext::gl_pop_attrib()
|
||||||
|
{
|
||||||
|
APPEND_TO_CALL_LIST_AND_RETURN_IF_NEEDED(gl_pop_attrib);
|
||||||
|
RETURN_WITH_ERROR_IF(m_in_draw_state, GL_INVALID_OPERATION);
|
||||||
|
|
||||||
|
// FIXME: implement
|
||||||
|
dbgln_if(GL_DEBUG, "SoftwareGLContext FIXME: implement gl_pop_attrib()");
|
||||||
|
}
|
||||||
|
|
||||||
void SoftwareGLContext::present()
|
void SoftwareGLContext::present()
|
||||||
{
|
{
|
||||||
m_rasterizer.blit_to(*m_frontbuffer);
|
m_rasterizer.blit_to(*m_frontbuffer);
|
||||||
|
|
|
@ -110,6 +110,8 @@ public:
|
||||||
virtual void gl_raster_pos(GLfloat x, GLfloat y, GLfloat z, GLfloat w) override;
|
virtual void gl_raster_pos(GLfloat x, GLfloat y, GLfloat z, GLfloat w) override;
|
||||||
virtual void gl_materialv(GLenum face, GLenum pname, GLfloat const* params) override;
|
virtual void gl_materialv(GLenum face, GLenum pname, GLfloat const* params) override;
|
||||||
virtual void gl_line_width(GLfloat width) override;
|
virtual void gl_line_width(GLfloat width) override;
|
||||||
|
virtual void gl_push_attrib(GLbitfield mask) override;
|
||||||
|
virtual void gl_pop_attrib() override;
|
||||||
virtual void present() override;
|
virtual void present() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -280,7 +282,9 @@ private:
|
||||||
decltype(&SoftwareGLContext::gl_normal),
|
decltype(&SoftwareGLContext::gl_normal),
|
||||||
decltype(&SoftwareGLContext::gl_raster_pos),
|
decltype(&SoftwareGLContext::gl_raster_pos),
|
||||||
decltype(&SoftwareGLContext::gl_materialv),
|
decltype(&SoftwareGLContext::gl_materialv),
|
||||||
decltype(&SoftwareGLContext::gl_line_width)>;
|
decltype(&SoftwareGLContext::gl_line_width),
|
||||||
|
decltype(&SoftwareGLContext::gl_push_attrib),
|
||||||
|
decltype(&SoftwareGLContext::gl_pop_attrib)>;
|
||||||
|
|
||||||
using ExtraSavedArguments = Variant<
|
using ExtraSavedArguments = Variant<
|
||||||
FloatMatrix4x4>;
|
FloatMatrix4x4>;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue