X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fgraphics%2Fcgl%2Fglcontext.cpp;h=02c4d4421a4b0716cc75fb0bcd13d7520ec6a049;hb=213ca43656411a06bbf1c0d18e4ebacaf545eb34;hp=7e06d2333aea4c631b0e956e0fbe6047d5380737;hpb=7cd7824857aa9b95a9df40e782bfc121854e1d9c;p=libs%2Fgui.git diff --git a/source/graphics/cgl/glcontext.cpp b/source/graphics/cgl/glcontext.cpp index 7e06d23..02c4d44 100644 --- a/source/graphics/cgl/glcontext.cpp +++ b/source/graphics/cgl/glcontext.cpp @@ -20,25 +20,25 @@ struct GLContext::Private void GLContext::platform_init(const GLOptions &opts) { vector attribs; - + attribs.push_back(CPF_DEPTH_SIZE); attribs.push_back(1); - + if(opts.alpha) { attribs.push_back(CPF_ALPHA_SIZE); attribs.push_back(1); } - + if(opts.stencil) { attribs.push_back(CPF_STENCIL_SIZE); attribs.push_back(1); } - + if(opts.doublebuffer) attribs.push_back(CPF_DOUBLEBUFFER); - + if(opts.multisample>0) { attribs.push_back(CPF_SAMPLE_BUFFERS); @@ -67,15 +67,19 @@ GLContext::~GLContext() delete priv; } +void GLContext::set_swap_interval(unsigned) +{ + // TODO +} + void GLContext::swap_buffers() { flush_gl_buffer(priv->context); } -void GLContext::window_resized(unsigned w, unsigned h) +void GLContext::window_resized(unsigned, unsigned) { // XXX Call [context update] here? - glViewport(0, 0, w, h); } } // namespace Graphics