61
Window / sf::ContextSettings, opengl version hint
« on: January 31, 2011, 07:31:18 pm »
the way I got around it was to create a dummy context on the stack just before it create the actual context.
and I also modified the code for selecting the version context to create, because although my card supports 3.3 if I chose 4.0, it would fail and jump to 2.0 instead
regards
Code: [Select]
GlContext* GlContext::New(const WindowImpl* owner, unsigned int bitsPerPixel, const ContextSettings& settings)
{
//I added this line
ContextType dummyContext(&referenceContext);
ContextType* context = new ContextType(&referenceContext, owner, bitsPerPixel, settings);
// Enable antialiasing if needed
if (context->GetSettings().AntialiasingLevel > 0)
glEnable(GL_MULTISAMPLE_ARB);
return context;
}
and I also modified the code for selecting the version context to create, because although my card supports 3.3 if I chose 4.0, it would fail and jump to 2.0 instead
regards