Accelerated offscreen rendering

hi,

for our application we need a ping-pong rendering functionality - render into offscreen buffers (or anywhere else) and use the result as a texture again.

currently we bind textures, glsl shaders and render into framebuffer objects. but the performance is very poor so far, using

10.4.3
powerbook ati 9700

are FBOs accelerated?

if they are not, what is the fastest way to
realize a ping-pong rendering system?

  • pbuffers
  • glCopyTexImage2D

best regards,
hendrik

Yes, they’re accelerated.

Are you sure it’s not your GLSL ending up in software rendering mode? FBO’s have seemed fast enough to me…

Anyway, on the Mac you have four choices :-

CopyTexImage2D (10.0+)
-copyTexture:fromView: and friends (10.2+)
PBuffers (10.3+)
FBOs (10.4.3+)

FBOs /should/ be fastest, but it’s not inconceivable that PBuffers might be at the current time.

well we have poor performance, but not the desastrous performance an emulated gpu delivers.

i remember when i had to use software
fragment shaders ('03) the speed was
close to a halt. 320x240 simple 1-tex lookup
took ~ 1 second.

the poor performance we have is more like:
(clip means 320x240 Quicktime from memory)

1 clip:
24 fps
30 % cpu

2 clips:
12 fps
70 % cpu

3 clips:
3 - 6 fps
70% cpu

5 clips
2-5 fps
70% cpu

7 clips
0-2 fps
70% cpu

11 clips
1 fps
60% cpu

as you can see, the system never reaches 100%
cpu. there must be some pipeline bottleneck
or texture transfer problem?

best regards,
hendrik

Those numbers look a lot like your video rendering is syncrhonized to something – the fact that doubling the number of clips halves the frame-rate. How are you getting the video frames?

well, it turned out that we uploaded textures
using GL_TEXTURE_2D, but using GL_TEXTURE_RECT
is a LOT faster … fully accelerated.

the (not so …) funny point about
this is, that i removed GL_TEXTURE_RECT from
the code base a year ago, because
GL_TEXTURE_RECT and GLSL was not supported
under win32 and ati (last september) and now
we have to pull it back in again to get good
performance with ati in macs. sigh.

best regards,
hendrik

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.