mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-04 13:30:31 +00:00
LibGL: Implement glFlush() and glFinish()
This commit is contained in:
parent
3429b44161
commit
2b9ad11bd8
Notes:
sideshowbarker
2024-07-18 18:09:06 +09:00
Author: https://github.com/sunverwerth Commit: https://github.com/SerenityOS/serenity/commit/2b9ad11bd81 Pull-request: https://github.com/SerenityOS/serenity/pull/7110
5 changed files with 36 additions and 0 deletions
|
@ -124,6 +124,8 @@ void glCallList(GLuint list);
|
|||
void glDeleteLists(GLuint list, GLsizei range);
|
||||
void glEndList(void);
|
||||
void glNewList(GLuint list, GLenum mode);
|
||||
void glFlush();
|
||||
void glFinish();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -47,6 +47,8 @@ public:
|
|||
virtual void gl_delete_lists(GLuint list, GLsizei range) = 0;
|
||||
virtual void gl_end_list(void) = 0;
|
||||
virtual void gl_new_list(GLuint list, GLenum mode) = 0;
|
||||
virtual void gl_flush() = 0;
|
||||
virtual void gl_finish() = 0;
|
||||
|
||||
virtual void present() = 0;
|
||||
};
|
||||
|
|
|
@ -59,3 +59,13 @@ GLenum glGetError()
|
|||
{
|
||||
return g_gl_context->gl_get_error();
|
||||
}
|
||||
|
||||
void glFlush()
|
||||
{
|
||||
return g_gl_context->gl_flush();
|
||||
}
|
||||
|
||||
void glFinish()
|
||||
{
|
||||
return g_gl_context->gl_finish();
|
||||
}
|
||||
|
|
|
@ -839,6 +839,26 @@ void SoftwareGLContext::gl_new_list(GLuint list, GLenum mode)
|
|||
m_current_listing_index = CurrentListing { {}, static_cast<size_t>(list - 1), mode };
|
||||
}
|
||||
|
||||
void SoftwareGLContext::gl_flush()
|
||||
{
|
||||
if (m_in_draw_state) {
|
||||
m_error = GL_INVALID_OPERATION;
|
||||
return;
|
||||
}
|
||||
|
||||
// No-op since SoftwareGLContext is completely synchronous at the moment
|
||||
}
|
||||
|
||||
void SoftwareGLContext::gl_finish()
|
||||
{
|
||||
if (m_in_draw_state) {
|
||||
m_error = GL_INVALID_OPERATION;
|
||||
return;
|
||||
}
|
||||
|
||||
// No-op since SoftwareGLContext is completely synchronous at the moment
|
||||
}
|
||||
|
||||
void SoftwareGLContext::present()
|
||||
{
|
||||
m_rasterizer.blit_to(*m_frontbuffer);
|
||||
|
|
|
@ -53,6 +53,8 @@ public:
|
|||
virtual void gl_delete_lists(GLuint list, GLsizei range) override;
|
||||
virtual void gl_end_list(void) override;
|
||||
virtual void gl_new_list(GLuint list, GLenum mode) override;
|
||||
virtual void gl_flush() override;
|
||||
virtual void gl_finish() override;
|
||||
|
||||
virtual void present() override;
|
||||
|
||||
|
|
Loading…
Reference in a new issue