Hi! I am new to the list and have a question involving the new PBuffer
support for OpenGL in v1.3.
I have been trying to run the “testrendertarget.c” demo supplied with
the CVS and it keeps crashing. After some extensive break-point
tracking, I think I have found the problem…
In sdl_wingl.c, i found a function called Init_WGL_WRB_Extensions(). in
this function there are the following lines…
this->gl_data->WGL_ARB_pbuffer = 0;
if( ExtensionSupported("WGL_ARB_pbuffer", extensions) ) {
this->gl_data->wglCreatePbufferARB =
(HPBUFFERARB (WINAPI *)(HDC hDC, int
iPixelFormat, int iWidth, int iHeight, const int *piAttribList))
this->gl_data->wglGetProcAddress(“wglChoosePixelFormatARB”);
this->gl_data->wglGetPbufferDCARB =
(HDC (WINAPI *) (HPBUFFERARB hPbuffer))
this->gl_data->wglGetProcAddress(“wglChoosePixelFormatARB”);
this->gl_data->wglReleasePbufferDCARB =
(int (WINAPI *)(HPBUFFERARB hPbuffer, HDC hDC))
this->gl_data->wglGetProcAddress(“wglChoosePixelFormatARB”);
this->gl_data->wglDestroyPbufferARB =
(BOOL (WINAPI *)(HPBUFFERARB hPbuffer))
this->gl_data->wglGetProcAddress(“wglChoosePixelFormatARB”);
this->gl_data->wglQueryPbufferARB =
(BOOL (WINAPI *)(HPBUFFERARB hPbuffer, int
iAttribute, int *piValue))
this->gl_data->wglGetProcAddress(“wglChoosePixelFormatARB”);
I believe these should be changed to reflect the actual function we are
trying to locate the entry point for, i.e.
this->gl_data->wglCreatePbufferARB =
(HPBUFFERARB (WINAPI *)(HDC hDC, int iPixelFormat, int
iWidth, int iHeight, const int *piAttribList))
this->gl_data->wglGetProcAddress(“wglChoosePixelFormatARB”);
should be changed to
this->gl_data->wglCreatePbufferARB =
(HPBUFFERARB (WINAPI *)(HDC hDC, int iPixelFormat, int
iWidth, int iHeight, const int *piAttribList))
this->gl_data->wglGetProcAddress(“wglCreatePbufferARB”);
Please let me know if I am wrong about this, because I spent a lot of
time on it and would like to find the problem.
thanks,
Jay Cralley