Sign in to follow this  
Sumo

2 pixel buffers?

Recommended Posts

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...

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Another method is to use the Framebuffer type. This is what I've used in the past for RTT.

The functions are gl*FramebufferEXT()

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this