mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-24 02:12:09 -05:00
LibGL: Add stub for glCopyTexImage2D
This commit is contained in:
parent
401472c9a4
commit
6643775999
5 changed files with 20 additions and 1 deletions
|
@ -489,6 +489,7 @@ GLAPI void glLineWidth(GLfloat width);
|
||||||
GLAPI void glPushAttrib(GLbitfield mask);
|
GLAPI void glPushAttrib(GLbitfield mask);
|
||||||
GLAPI void glPopAttrib();
|
GLAPI void glPopAttrib();
|
||||||
GLAPI void glBitmap(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, GLubyte const* bitmap);
|
GLAPI void glBitmap(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, GLubyte const* bitmap);
|
||||||
|
GLAPI void glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
|
@ -104,6 +104,7 @@ public:
|
||||||
virtual void gl_pop_attrib() = 0;
|
virtual void gl_pop_attrib() = 0;
|
||||||
virtual void gl_light_model(GLenum pname, GLfloat x, GLfloat y, GLfloat z, GLfloat w) = 0;
|
virtual void gl_light_model(GLenum pname, GLfloat x, GLfloat y, GLfloat z, GLfloat w) = 0;
|
||||||
virtual void gl_bitmap(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, GLubyte const* bitmap) = 0;
|
virtual void gl_bitmap(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, GLubyte const* bitmap) = 0;
|
||||||
|
virtual void gl_copy_tex_image_2d(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) = 0;
|
||||||
|
|
||||||
virtual void present() = 0;
|
virtual void present() = 0;
|
||||||
};
|
};
|
||||||
|
|
|
@ -56,3 +56,8 @@ void glTexEnvf(GLenum target, GLenum pname, GLfloat param)
|
||||||
{
|
{
|
||||||
g_gl_context->gl_tex_env(target, pname, param);
|
g_gl_context->gl_tex_env(target, pname, param);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border)
|
||||||
|
{
|
||||||
|
g_gl_context->gl_copy_tex_image_2d(target, level, internalformat, x, y, width, height, border);
|
||||||
|
}
|
||||||
|
|
|
@ -2475,6 +2475,16 @@ void SoftwareGLContext::gl_bitmap(GLsizei width, GLsizei height, GLfloat xorig,
|
||||||
dbgln_if(GL_DEBUG, "SoftwareGLContext FIXME: implement gl_bitmap({}, {}, {}, {}, {}, {}, {})", width, height, xorig, yorig, xmove, ymove, bitmap);
|
dbgln_if(GL_DEBUG, "SoftwareGLContext FIXME: implement gl_bitmap({}, {}, {}, {}, {}, {}, {})", width, height, xorig, yorig, xmove, ymove, bitmap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SoftwareGLContext::gl_copy_tex_image_2d(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border)
|
||||||
|
{
|
||||||
|
APPEND_TO_CALL_LIST_AND_RETURN_IF_NEEDED(gl_copy_tex_image_2d, target, level, internalformat, x, y, width, height, border);
|
||||||
|
RETURN_WITH_ERROR_IF(m_in_draw_state, GL_INVALID_OPERATION);
|
||||||
|
|
||||||
|
// FIXME: implement
|
||||||
|
dbgln_if(GL_DEBUG, "SoftwareGLContext FIXME: implement gl_copy_tex_image_2d({:#x}, {}, {:#x}, {}, {}, {}, {}, {})",
|
||||||
|
target, level, internalformat, x, y, width, height, border);
|
||||||
|
}
|
||||||
|
|
||||||
void SoftwareGLContext::present()
|
void SoftwareGLContext::present()
|
||||||
{
|
{
|
||||||
m_rasterizer.blit_to(*m_frontbuffer);
|
m_rasterizer.blit_to(*m_frontbuffer);
|
||||||
|
|
|
@ -115,6 +115,7 @@ public:
|
||||||
virtual void gl_pop_attrib() override;
|
virtual void gl_pop_attrib() override;
|
||||||
virtual void gl_light_model(GLenum pname, GLfloat x, GLfloat y, GLfloat z, GLfloat w) override;
|
virtual void gl_light_model(GLenum pname, GLfloat x, GLfloat y, GLfloat z, GLfloat w) override;
|
||||||
virtual void gl_bitmap(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, GLubyte const* bitmap) override;
|
virtual void gl_bitmap(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, GLubyte const* bitmap) override;
|
||||||
|
virtual void gl_copy_tex_image_2d(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) override;
|
||||||
virtual void present() override;
|
virtual void present() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -290,7 +291,8 @@ private:
|
||||||
decltype(&SoftwareGLContext::gl_push_attrib),
|
decltype(&SoftwareGLContext::gl_push_attrib),
|
||||||
decltype(&SoftwareGLContext::gl_pop_attrib),
|
decltype(&SoftwareGLContext::gl_pop_attrib),
|
||||||
decltype(&SoftwareGLContext::gl_light_model),
|
decltype(&SoftwareGLContext::gl_light_model),
|
||||||
decltype(&SoftwareGLContext::gl_bitmap)>;
|
decltype(&SoftwareGLContext::gl_bitmap),
|
||||||
|
decltype(&SoftwareGLContext::gl_copy_tex_image_2d)>;
|
||||||
|
|
||||||
using ExtraSavedArguments = Variant<
|
using ExtraSavedArguments = Variant<
|
||||||
FloatMatrix4x4>;
|
FloatMatrix4x4>;
|
||||||
|
|
Loading…
Add table
Reference in a new issue