For reasons I’m not very proud of, I called glViewport three times per frame. That was obviously not necessary, but what surprised me was that my profiler indicated glViewport consumed 5% of the elapsed time. Why is glViewport that expensive? It seems a bit out of proportion for just setting the device-to-window transformation…
Talking about the drivers guys. Passing in NULL as ‘attributes’ parameter to wglCreatePbuffer (which is fine according to the spec) still gives an access violation in NVOGLNT.dll in the 40.72 drivers.
I’ve already reported this here http://www.opengl.org/discussion_boards/ubb/Forum3/HTML/007527.html
but apparently nobody of you guys read it
Talking about the drivers guys. Passing in NULL as ‘attributes’ parameter to wglCreatePbuffer (which is fine according to the spec) still gives an access violation in NVOGLNT.dll in the 40.72 drivers.
I’ve already reported this here http://www.opengl.org/discussion_boards/ubb/Forum3/HTML/007527.html
but apparently nobody of you guys read it
Cheers.[/b]
Asgard,
Sorry I didn’t notice your earlier post.
Looking at the extension spec in the registry, I’m not sure how you came to the conclusion that passing in a NULL pointer for the <piAttribList> argument of wglCreatePbufferARB is valid.
<piAttribList> is a list of attributes {type, value} pairs
containing integer attribute values. All of the attributes in the
<piAttribList> are followed by the corresponding required value.
The list is terminated with a value of 0.
My reading of this is that you keep reading the contents of <piAttribList> until you find a zero. That’s exactly what the driver does.
It’s utterly trivial to “fix” this behavior by checking for NULL, but that doesn’t seem to be what the spec says. Is there something I’m missing?
[This message has been edited by pbrown (edited 10-07-2002).]
Modify wglCreatePbufferARB:
HPBUFFERARB wglCreatePbufferARB (HDC hDC, int iPixelFormat,
int iWidth, int iHeight, const int *piAttribList);
<snip>
<piAttribList> may be NULL or empty in which case all attributes assume
their default values as described below.