PDA

View Full Version : WGL_ARB_buffer_region problem



Obli
05-20-2003, 09:22 AM
Finally the opengl.org server is up again. I posted this on other forums without getting replies so, I really can't wait to see how it goes in the beginner's forum and I decided to post directly here.

I am having a problem with WGL_ARB_buffer_region. I am doing a simple experiment before integrating the thing in a larger project, here's what's happening.
1- Set viewport and projection.
2- Clear depth and color (blue).
3- Draw a white triangle which fills half screen.
4- Save this to buffer region 'before'.

5- Set viewport and projection again (different).
6- Clear depth and color (green).
7- Draw a black triangle.
8- Restore buffer 'before'.

This works nicely. I get the white triangle on blue background. This is essentially the extension's conformance test.
Now, I add another 'pass' between (7) and (8) which is saving the black triangle on green background in a buffer region called 'new'. I'll refer to this as (a).

Algo:
1-2-3-4-5-6-7
(a) Save to 'new'
8

This causes the window to pop up and close automatically before I can see something. The window is displayed for a second or so.
I checked for error codes but looks like everything is going ok.

I figured out I can also do I figured out I can do 1-2-3-4-5-6-7-a and get the window correcltly (which however, displays the black triangle on green background).

An interesting fact is that if I do I 1-2-3-4-5-6-7-a and then try to free up the buffer memory by doing wglSaveBufferRegionARB(before, 0, 0, 0, 0) (which is specified to just release memory) the window pops up for a sec, displays the white triangle on blue background and then closes.
My error checking routines are not able to tell me something interesting but looks like everything is fine up to "SaveBuffer(before)". Looks like this call is **badly** failing.

In case someone thinks hw/sw details are necessay (bug), here's the most relevant info:
AthlonXP 1800+, VIA-KT333 based mobo, GeForce4Ti 128MB, unpatched win2000, 43.45 NV driver.
Other informations will be given if you feel this is necessary, but I feel it won't.

Is there something I am doing wrong? Could it be a bug? Suggestions? I am really worried by this since I can't do it w/o buffer regions... read/drawPixels is way too slow.

Adrian
05-20-2003, 09:48 AM
This may be unrelated but I have a problem with readpixels opening and closing the window if I call it thousands of times per frame. It only happens if FSAA is on. Can you just check to see if you get the problem with FSAA off (if it isn't already). I asked some others here if they could reproduce the problem with the same software but they were unable to. This made me think it might be hardware dependent. Interestingly I have similar hardware to you (XP2000+VIA motherboard+TI4600)

abartosz
05-20-2003, 01:19 PM
I had some problems with buffer region too,
but In my case there was problem with window resizing. When I have resized my window, application crashed.

The solution was easy- one guy from NVidia tech. support said, that this will be fixed in new drivers :-)

so maybe this will solve your problems too :-)

Obli
05-21-2003, 08:46 AM
Uhm. I finally got some time to check if it works with FSAA off and vsync on by default. No way, it's simply not working.

Is this the case we mail nVidia to make sure they fix it in the next driver release? We are not sure they'll do but at least we'll know they are facing the problem.

[This message has been edited by Obli (edited 05-22-2003).]