2 pixel buffers?

Started by
6 comments, last by taby 18 years ago
Hi, I have a problem with the speed of my second pixel buffer. I have ran a simple test that involves drawing a simple cube to the pixel buffer then displaying the contents of the buffer on the screen on a windows buffer. The first buffer was nice and smooth but as soon as I switched to rendering to a second buffer it slowed down big time. All I did was change the code to tell it to render to pixel buffer B instead of A. Can OGL handle 2 PBs OK? Or is there something wrong with my code or hardware or something? Thanks! Just as a note, the pixel buffers are 1440x1440 each(!). I have tried making the size a power of 2 (1024x1024) and it is smooth but would the performance drop be from the conversion of non power of 2 textures or the size of the PB? It seems to handle 1 1440x1440 PB fine...
Advertisement
I'm not exactly sure what you mean with pixel buffer...?
"Game Maker For Life, probably never professional thou." =)
A pixel buffer as in the one used to render to a texture type. I have it sort of fixed now by making it small and power of 2 but I'm still interested in if using 2 pixel buffers (along with the frame buffer) is good enough for interactive frame rates?
Quote:Original post by Sumo
A pixel buffer as in the one used to render to a texture type. I have it sort of fixed now by making it small and power of 2 but I'm still interested in if using 2 pixel buffers (along with the frame buffer) is good enough for interactive frame rates?


I remember some playing around i did, increasing the pixel buffer size made a large effect on the fps.

512 i found was reliable, nice rendered and fast. Ofcourse you want your pixel buffer to be half your screen buffer.
----------------------------

http://djoubert.co.uk
Pixel buffer half of my screen buffer?? So if I had a screen resolution of 1024x768 I would want a pixel buffer of 512x512 even if I wanted to cover the whole screen with my pixel buffer texture? I have a couple of buffers at 1024x1024 at the moment. That lets me cover the whole screen in perfect resolution (1 pixel in PB mapped to 1 pixel in screen buffer). Is this a waste?
I haven't used OpenGL much, and so I don't know if this is relevant. But, if you have both buffers allocated at the same time, are you sure BOTH buffers have been allocated to video memory? If the system decided it didn't have enough video ram to accomodate both buffers, and decided to allocate the second in regular memory instead, that would account for a significant reduction in speed. Beyond that, I probably can't be of any help, but you may try posting some code in order to clarify exactly what you're doing.
I *think* when you create PBs under OGL you create them in VRAM. If there is no memory then it'll bail out. I'm not too sure either. I was thinking that it was doing what you were saying and it could well be, but I do have 128Mbs of VRAM. I don't even have many textures loaded either. a 32bit 1024x1024 buffer is only 4Mbs.
Another method is to use the Framebuffer type. This is what I've used in the past for RTT.

The functions are gl*FramebufferEXT()

This topic is closed to new replies.

Advertisement