aboutsummaryrefslogtreecommitdiffstats
path: root/emulator/opengl/host/libs/libOpenglRender/FrameBuffer.h
diff options
context:
space:
mode:
authorJesse Hall <jessehall@google.com>2012-05-09 15:45:23 -0700
committerJesse Hall <jessehall@google.com>2012-05-10 10:06:56 -0700
commitab800d7b0188e840407a61fa931f678d2ef46de6 (patch)
tree7fd509cfa7f2e005f9b162f9200677c14fbd0fff /emulator/opengl/host/libs/libOpenglRender/FrameBuffer.h
parent347fec44f5ebd8e037a47f66256eb739ade9aa6c (diff)
downloadsdk-ab800d7b0188e840407a61fa931f678d2ef46de6.zip
sdk-ab800d7b0188e840407a61fa931f678d2ef46de6.tar.gz
sdk-ab800d7b0188e840407a61fa931f678d2ef46de6.tar.bz2
Allow frame callback to be enabled/disabled
Since per-frame readback is slow and clients don't need it on all the time, this change allows the callback to be registered after initialization, and allows it to be disabled later. Change-Id: Ic73d4515d302a0981ee0c80b9e6f9ba5c84b82ae
Diffstat (limited to 'emulator/opengl/host/libs/libOpenglRender/FrameBuffer.h')
-rw-r--r--emulator/opengl/host/libs/libOpenglRender/FrameBuffer.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/emulator/opengl/host/libs/libOpenglRender/FrameBuffer.h b/emulator/opengl/host/libs/libOpenglRender/FrameBuffer.h
index 89a708b..de0b71c 100644
--- a/emulator/opengl/host/libs/libOpenglRender/FrameBuffer.h
+++ b/emulator/opengl/host/libs/libOpenglRender/FrameBuffer.h
@@ -46,7 +46,7 @@ struct FrameBufferCaps
class FrameBuffer
{
public:
- static bool initialize(int width, int height, OnPostFn onPost, void* onPostContext);
+ static bool initialize(int width, int height);
static bool setupSubWindow(FBNativeWindowType p_window,
int x, int y,
int width, int height, float zRot);
@@ -59,6 +59,8 @@ public:
int getWidth() const { return m_width; }
int getHeight() const { return m_height; }
+ void setPostCallback(OnPostFn onPost, void* onPostContext);
+
void getGLStrings(const char** vendor, const char** renderer, const char** version) const {
*vendor = m_glVendor;
*renderer = m_glRenderer;
@@ -96,7 +98,7 @@ public:
}
private:
- FrameBuffer(int p_width, int p_height, OnPostFn onPost, void* onPostContext);
+ FrameBuffer(int p_width, int p_height);
~FrameBuffer();
HandleType genHandle();
bool bindSubwin_locked();