Skip to main content
GameDev.net gamedev.net
🔒 Locked

WGL_ARB_buffer_region

Started by Krohm May 17, 2003 at 6:27 AM 0 replies 900+ views
Original Post
Krohm
Krohm
I am having some trouble with the extension you see above. Does someone ever played with it? Basically, here''s what I am doing per frame: 1- Set viewport, set projection. 2- Clear depth, clear color (blue). 3- Draw something (actually it''s a test so here''s a white tri). 4- Save this to buffer region ''before''. 5- Set viewport, set projection. 6- Clear depth, clear color (green). 7- Draw something (black tri). 8- Restore buffer ''before''. This works fine. The white tri on blue background gets displayed correctly so, first test ok. Now, between (7) and (8), I add a new thing (a). What I am doing now is: 1- Set viewport, set projection. 2- Clear depth, clear color (blue). 3- Draw something (actually it''s a test so here''s a white tri). 4- Save this to buffer region ''before''. 5- Set viewport, set projection. 6- Clear depth, clear color (green). 7- Draw something (black tri). a- Save this buffer region ''new''. 8- Restore buffer ''before''. This does not work at all. The window pops up, but the OS closes it automatically before I can see something. The whole process takes up to a second or so. Already checked window error codes. None. I figured out I can do 1-2-3-4-5-6-7-a and get it running or 1-2-3-4-5-6-7-8, but I cannot use both (8) and (a). I thought it may be a memory allocation problem but looks like this is not the case however, I made another test and now, looks like something is really going bad. The algo was now: 1-2-3-4-5-6-7-8 After (8), the buffer region ''before'' is no more used up to the next frame, in which it will be recreated. So, I tried to free up the buffer memory by doing wglSaveBufferRegionARB(before, 0, 0, 0, 0). This result in a window popping up for a sec, displaying the white tri on blue background and then closing automatically. Here, my error-checking routines are unable to tell me something interesting, but looks like everything is fine up to SaveBuffer ''before'' (4). So, all in all, it''s a big mess. I need buffer regions to make ''backup'' of backbuffer. Doing this using readpixels/drawpixels resulted way too slow... Anyone got an idea? Here''s relevant hw/sw info: AthlonXP ''Palomino'', 256MB RAM, Soltek SL75DRV5, GeForce4 Ti, , win2k (unpatched), running 43.45 NV driver.
Previously "Krohm"

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.