Problem with wglCreateContext

Problem with wglCreateContext

Post by Dan Revell » Thu, 11 Jan 2001 07:55:38



Hi,
I have a program that seems to be running fine on my development machine and
a few other test machines.  However, we have one machine on which
wglCreateContext doesn't seem to be working when I try to copy the image to
a bitmap.  I can run the program fine and view the image on the screen, but
on this one machine when I try to save the image to a bitmap, the call to
wglCreateContext always fails - no matter what PixelFormat I set.  We've
tried updating the drivers, but nothing seems to work.  Does anyone have any
ideas about what other things to try to get wglCreateContext to work for a
bitmap?

Thanks,
Dan Revelle

 
 
 

Problem with wglCreateContext

Post by Frans Boum » Thu, 11 Jan 2001 15:44:03



> I have a program that seems to be running fine on my development machine and
> a few other test machines.  However, we have one machine on which
> wglCreateContext doesn't seem to be working when I try to copy the image to
> a bitmap.  I can run the program fine and view the image on the screen, but
> on this one machine when I try to save the image to a bitmap, the call to
> wglCreateContext always fails - no matter what PixelFormat I set.  We've
> tried updating the drivers, but nothing seems to work.  Does anyone have any
> ideas about what other things to try to get wglCreateContext to work for a
> bitmap?

    what does GetLastError() report?

    FB.

 
 
 

1. Problems with wglCreateContext

Hi,

Wonder if anyone has come across this one ?

Using GeForce 3 card with latest 2.8.3.2 drivers

Program is MS VC 6,00 C++

Creating the opengl  hRC - works fine in release mode, run in debug mode
return from wglCreateContext( hDC ) gives a NULL.

Use the MS the vanilla opengl32.dll implementation  works fine in both !

Code is given below

Thanks

Brian.

Code is :

     PIXELFORMATDESCRIPTOR pfd;
     int iFormat;
                             // get the device context (DC)
     hDC = GetDC( hwnd );
                                // set the pixel format for the DC
     ZeroMemory( &pfd, sizeof( pfd ) );
     pfd.nSize = sizeof( pfd );
     pfd.nVersion = 1;
     pfd.dwFlags = PFD_DRAW_TO_WINDOW |
     PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER;
     pfd.iPixelType = PFD_TYPE_RGBA;
     pfd.cColorBits = 32;
     pfd.cDepthBits = 16;
     pfd.iLayerType = PFD_MAIN_PLANE;
     iFormat = ChoosePixelFormat( hDC, &pfd );
     SetPixelFormat( hDC, iFormat, &pfd );

                             // create and enable the render context (RC)
     hRC = wglCreateContext( hDC );        // OK in release - returns NULL
in debug.
     wglMakeCurrent( hDC, hRC );

2. C++ Source code to display a graphical image??

3. wglCreateContext(hDC) returns 1114

4. Atlanta Area Artists Needed

5. wglCreateContext failure cases?

6. Sounds and OpenGL using Visual C++

7. Are rendering context handles returned by wglCreateContext() unique?

8. NURBS problem!!

9. Newbie wglCreateContext question

10. wglCreateContext makes GetLastError return 1157

11. wglCreateContext takes a LOT of time.

12. wglCreateContext fails when wrapped except with 3dfx ICD

13. wglCreateContext error