Missing GL extensions on PFD_DRAW_TO_BITMAP ?
Hello !
A funny OpenGL problem :
I've created a DIBSection that I use to render to from OpenGL.
hBMP=CreateDIBSection(hGLContext,(BITMAPINFO* &BIH,DIB_RGB_COLORS,&m_pBits,NULL,0);
Then I'm using PFD_DRAW_TO_BITMAP |PFD_SUPPORT_OPENGL |PFD_SUPPORT_GDI to choose the pixel format.
Finally I'm creating the context and starting rendering in it. It works, in that I can get a lighted & textured object on it. When I check the glGetString(GL_EXTENSIONS) the only extensions returned are GL_WIN_swap_hint, GL_EXT_bg and GL_EXT_paletted_texture.
The normal render context (the one rendering to the screen) acts "normally" and I can get all the extenstions I need. Just this one is missing. Is it because I'm rendering to memory that all the extensions are not avlb. ? Is DRAW_TO_BITMAP not HW accelerated ?
because you are drawing to system memory, as such the gfx card never enters into the equation
Ouch... 'was afraid of that. Any ideeas what I can do about it to have a HW-accelerated drawing to memory?
thanks anyway...
thanks anyway...
There isnt really much you can do, at best you could use the gfx card via a hidden window and copy back to system ram but this is also going to be a little slow (although probably faster than rendering via the MS SW OGL driver). The alternative is to try using the Mesa library which should be more optimised and contain more extensions, its still software but its better than the MS one.
My graphics card has over 100 pixel formats and I enumerated them all.
There is no such thing as a hardware-accelerated PFD_DRAW_TO_BITMAP.
There is no such thing as a hardware-accelerated PFD_DRAW_TO_BITMAP.
voidEnumerateAllPixelFormats(HDC hDC) { int iMax; PIXELFORMATDESCRIPTOR pfd; int iPixelFormat; iPixelFormat = 1; do { iMax = DescribePixelFormat( hDC, iPixelFormat, sizeof(PIXELFORMATDESCRIPTOR), &pfd ); if (iMax == 0) { break; } // Examine bits in pfd.dwFlags } while (++iPixelFormat <= iMax); }
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement