Jump to content


FBO to VBO


7 replies to this topic

#1 michael84

    New Member

  • Members
  • Pip
  • 6 posts

Posted 19 July 2007 - 03:23 PM

I'd like to dysplay 4 point via the VBO
I have my coordinate in the FBO.

I try the tutorial "render to vertex buffer" but I don't understand how does he manage to bind the data..for me it doesn't work

if someone has an example to send me.let me know!!

cheers,
Michael

#2 Reedbeta

    DevMaster Staff

  • Administrators
  • 4979 posts
  • LocationBellevue, WA

Posted 19 July 2007 - 04:31 PM

what tutorial are you talking about? link please... and please be more specific about how it "doesn't work". what happens? have you checked the glGetError output after each GL call?
reedbeta.com - developer blog, OpenGL demos, and other projects

#3 michael84

    New Member

  • Members
  • Pip
  • 6 posts

Posted 23 July 2007 - 02:03 PM

this tutorial : http://www.devmaster...read.php?t=7457
it is a tutorial from this forum.

I have an error in the glreadpixel
glReadPixels(0, 0, texSize, texSize, GL_RGBA, GL_FLOAT, 0);
checkGLErrors("read pixel vbo");

in the step4 of the tutorial (FBO to PBO), maybe because I use another time glReadPixel to use the data from the FBO to calculate other thing....

#4 Reedbeta

    DevMaster Staff

  • Administrators
  • 4979 posts
  • LocationBellevue, WA

Posted 23 July 2007 - 04:27 PM

well, come on then, what is the error?
reedbeta.com - developer blog, OpenGL demos, and other projects

#5 michael84

    New Member

  • Members
  • Pip
  • 6 posts

Posted 24 July 2007 - 08:23 AM

the error is
OpenGL ERROR: invalid operation(Label: read pixel vbo)

#6 michael84

    New Member

  • Members
  • Pip
  • 6 posts

Posted 25 July 2007 - 01:20 PM

with
glReadPixels(0, 0, texSize, 1, GL_RGBA, GL_FLOAT, 0);

I have no error but I think it is not right because i have 4 point to read
texSize equal 4

#7 Reedbeta

    DevMaster Staff

  • Administrators
  • 4979 posts
  • LocationBellevue, WA

Posted 25 July 2007 - 04:34 PM

Those two parameters are the width and height of the image to read. If you only want to read 4 pixels, you'll use either a 4x1 image or a 1x4 image. If you use a 4x4 image, you'll be reading 16 pixels.
reedbeta.com - developer blog, OpenGL demos, and other projects

#8 michael84

    New Member

  • Members
  • Pip
  • 6 posts

Posted 30 July 2007 - 02:18 PM

ok thanks!
I didn't get this point before!





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users