diff options
author | don bright <hugh.m.bright@gmail.com> | 2013-01-26 06:09:37 (GMT) |
---|---|---|
committer | don bright <hugh.m.bright@gmail.com> | 2013-01-26 06:09:37 (GMT) |
commit | af4333a669eacc2cafc8274e23f58415e634477b (patch) | |
tree | 67d54465e838a224e16e262ebe8a5dfc0fde95f1 /src/OffscreenContextGLX.cc | |
parent | 544a8e5b799f5dd0a35d650c00db10074104650a (diff) |
refactor to reduce duplicate code. enable ostream save from OffscreenView
Diffstat (limited to 'src/OffscreenContextGLX.cc')
-rw-r--r-- | src/OffscreenContextGLX.cc | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/src/OffscreenContextGLX.cc b/src/OffscreenContextGLX.cc index 574fbb5..ef26ce7 100644 --- a/src/OffscreenContextGLX.cc +++ b/src/OffscreenContextGLX.cc @@ -269,20 +269,7 @@ OffscreenContext *create_offscreen_context(int w, int h) return NULL; } - // glewInit must come after Context creation and before FBO calls. - GLenum err = glewInit(); - if (GLEW_OK != err) { - cerr << "Unable to init GLEW: " << glewGetErrorString(err) << endl; - return NULL; - } - - ctx->fbo = fbo_new(); - if (!fbo_init(ctx->fbo, w, h)) { - cerr << "GL Framebuffer Object init failed; dumping GLEW info" << endl; - return NULL; - } - - return ctx; + return create_offscreen_context_common( ctx ); } bool teardown_offscreen_context(OffscreenContext *ctx) |