Skip to main content
gamedev.net
🔒 Locked

render to texture question

Started by timmie Feb 20, 2005 at 5:00 PM 2 replies 450+ views
Original Post
timmie
timmie
Is it possible to use the WGL_ARB_render_texture extension to render to a texture that is used in the current scene? Just seems like it shouldn't work, since you'd be sampling the texture while you're writing to it, but I'd rather use the extension than glCopyTexSubImage2D for performance reasons and so the textures can be larger than the current screen size. http://timmie.squabble.org/screenshots/zdoomgl_70.jpg (works alright using glCopyTexSubImage2D) Can you double buffer a pbuffer?
_the_phantom_
_the_phantom_
yes, you can request a double buffered pbuffer (infact, I think you can request a double buffered pbuffer and upto 9 AUX buffers as well)

and no, you cant render to a texture and read from it as a texture source at the same time, at best it will be undefined, at worse Bad Things Will Happen (tm).

Keep in mind, that in its current state you dont really render to a texture, you render to a pbuffer and then for all intents and purposes alias a pbuffer to a texture ID to access it like a texture and frankly there isnt a sane way todo it.

btw, atm a glCopyTexSubImage2D call might be faster than using a pbuffer, as using a pbuffer requires a context switch which are expensive. Now, the new framebuffer object extension should remove that overhead nicely once one of the IHVs writes a driver which contains it [wink], but for now unless you need a framebuffer large than your window I'd stick with copying a texture.
Ademan555
Ademan555
We should start a petition for ATI and nvidia to make them damned framebuffer_object's :-p

-Dan
When General Patton died after World War 2 he went to the gates of Heaven to talk to St. Peter. The first thing he asked is if there were any Marines in heaven. St. Peter told him no, Marines are too rowdy for heaven. He then asked why Patton wanted to know. Patton told him he was sick of the Marines overshadowing the Army because they did more with less and were all hard-core sons of bitches. St. Peter reassured him there were no Marines so Patton went into Heaven. As he was checking out hi
_the_phantom_
_the_phantom_
heh, well they are working on them, however NV wont release until they have them working and fully tested and ATI have a kinda pipeline going on with drivers as they are all WHQL certified, so when something comes out even if they wrote it right away you'd have a lead time of a couple of months before you get it.

Current thinking is that March would be the best bet for a driver release from at least ATI or NV, so its a case of wait and hope really [smile]

Topic Locked

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

Sign in to reply to this topic.