Pbuffer speed

Started by Funkapotamus, December 07, 2004, 05:41:56

Previous topic - Next topic

Funkapotamus

Referring to this post:  http://lwjgl.org/forum/viewtopic.php?t=748&highlight=pbuffer

From my own experiences as well, the PBuffer demo runs very slow as I am a Radeon user.  Are all pbuffer instances this slow on ATI hardware?

I'm writing shaders that require manipulation of the entire pre-rendered screen.  Pbuffers would be ideal for this, as I could use the pbuffer as the environment map.  However, it makes no sense to use pbuffers when they run so slow.  Is there any way to fix this?  I don't want to resort to glTexSubImage2D()- it was because of this method that I decided to swich to pbuffers in the first place!

spasi

Quote from: "Funkapotamus"Are all pbuffer instances this slow on ATI hardware?

In Marathon we render a 1024x1024 (at least) shadow map each frame (depth-only pbuffer + copy-to-texture on ATIs, render-to-texture on NVs) @ >100 fps.

Chman

Works well here (ATI 9800Pro with lastest beta drivers)...

Chman

Funkapotamus

Beta drivers eh?  Well, I suppose then I could implement PBuffers.  By the time my game is finished, the beta drivers won't be beta anymore!  Hell, with all the shader effects I'm implementing this thing won't be able to be played on anything under Radeon 9600 anyway!

Speaking of high requirements.  I ran accross a nifty little game the other day called Facewound (www.facewound.com) - It's got some nifty effects gonig on.  Can't wait to see it released!

Warning on the website:  Vulgar Language

Chman

Quote from: "Funkapotamus"Beta drivers eh?
PBuffers were working great on current (not beta) drivers too... Whcih drivers are you using?

Chman

Funkapotamus

9800 Pro, most current drivers.  WinXP.

I'm referring to this demo: http://www.lwjgl.org/jnlp/lwjgl-demo.php/test.opengl.PbufferTest

This person here had problems too: http://lwjgl.org/forum/viewtopic.php?t=748&highlight=pbuffer

Unfortunatly, all I have to learn about pbuffers is what I know from the demo.  You two must be using pbuffers differently.  What keeps yours working?

spasi

Quote from: "Funkapotamus"You two must be using pbuffers differently.  What keeps yours working?

This is what I'm doing:

final RenderTexture renderTexture;

if ( isPOT(this.width) && isPOT(this.height) )
	renderTexture = new RenderTexture(false, false, true, false, RenderTexture.RENDER_TEXTURE_2D, 0);
else
	renderTexture = new RenderTexture(false, false, true, true, RenderTexture.RENDER_TEXTURE_RECTANGLE, 0);

pBuffer = new Pbuffer(this.width, this.height, new PixelFormat(0, 0, depth, 0, 0), renderTexture);


For ATIs, there's only the last line, with null in place of renderTexture. Then, makeCurrent() calls and stuff, nothing special.