浏览代码

LibGL: Add `GL::present_context()`

This provides a convenience method that performs the virtual resolution
for `::present` on the provided `GLContext`.
Jelle Raaijmakers 3 年之前
父节点
当前提交
e27b077c2a
共有 2 个文件被更改,包括 6 次插入0 次删除
  1. 5 0
      Userland/Libraries/LibGL/GLContext.cpp
  2. 1 0
      Userland/Libraries/LibGL/GLContext.h

+ 5 - 0
Userland/Libraries/LibGL/GLContext.cpp

@@ -33,4 +33,9 @@ void make_context_current(GLContext* context)
     g_gl_context = context;
 }
 
+void present_context(GLContext* context)
+{
+    context->present();
+}
+
 }

+ 1 - 0
Userland/Libraries/LibGL/GLContext.h

@@ -93,5 +93,6 @@ public:
 
 OwnPtr<GLContext> create_context(Gfx::Bitmap&);
 void make_context_current(GLContext*);
+void present_context(GLContext*);
 
 }