SetPixelFormat() fails on canvases

BlitzMax Forums/BlitzMax OpenGL Programming/SetPixelFormat() fails on canvases

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

I edited my original post. SetPixelFormat() can only be called once on any dc. After that, you have to create a new window and get the dc. You cannot call SetPixelFormat() twice on any dc. For example, to change antialias modes, you have to destroy the viewport panel, create a new one, and set the pixel format with the new antialias mode. I am guessing that by the time I get the handle of a canvas, Blitz has already internally set the pixel format, disallowing me to set it again.

By the way, to add AntiAliasing to Blitz GL graphics, you just add these values when you call wglChoosePixelFormat(), where antialiasmode is 0,2,4,8 or 16:
WGL_SAMPLE_BUFFERS_ARB,GL_TRUE,WGL_SAMPLES_ARB,antialiasmode