How to Create Dummy / False OpenGL Context with SDL 2.0 on Windows

As a budding game developer here, I am currently practicing with C++ and OpenGL graphics, and the desire is to assemble a skeleton project that I can both use for small game projects, as well as share with some friends with like interest.

The target is OpenGL 3.3+ (using no deprecated mechanisms such as 'glBegin' etc.), using the libraries SDL 2.0, GLEW 1.10.0 (with WGLEW) and GLM 0.9.4.5. I'm developing with Visual Studio 2012, and primarilly for Windows, but multi-platform compatibility is also desireable if possible to achieve.

The problem at hand is that I am now trying to implement Anti- Aliasing. Most sources appear to tell me that in order to achieve this, I first need to create a dummy context, in order to get access to certain OpenGL functionality, activating multisampling, and lastly spawn a proper rendering context. As described on [OpenGLs pages](http://www.opengl.org/wiki/Creating_an_OpenGL_Context_%28WGL%29"Creating an OpenGL Context").

What I ponder then, is this; Most guides, examples and other, tend to either mix SDL-functionality and OpenGL calls, or build functions focusing entirely on OpenGL calls. While I would be able to reproduce this with some digital elbow grease; half the reason I desire to use SDL is not to have to manage window handles, pixelformats and such too much myself, but let SDL take care of this.

As such I ask you now; Can I somehow create a dummy context, initiate things such as Multisampling and Anisotropy, and transfer into a proper context solely through support libraries such as SDL 2.0, or will I have to get my hands into the OpenGL API (preferably through GLEW then) and build a few launcher functions such as others have? If I need to myself, would not much of the purpose of SDL be lost?

链接地址: http://www.djcxy.com/p/38454.html

上一篇: 现代OpenGL上下文失败

下一篇: 如何在Windows上使用SDL 2.0创建伪/假OpenGL上下文