View Full Version : FBO to VBO
michael84
07-19-2007, 09:23 AM
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
Reedbeta
07-19-2007, 10:31 AM
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?
michael84
07-23-2007, 08:03 AM
this tutorial : http://www.devmaster.net/forums/showthread.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....
Reedbeta
07-23-2007, 10:27 AM
well, come on then, what is the error?
michael84
07-24-2007, 02:23 AM
the error is
OpenGL ERROR: invalid operation(Label: read pixel vbo)
michael84
07-25-2007, 07:20 AM
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
Reedbeta
07-25-2007, 10:34 AM
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.
michael84
07-30-2007, 08:18 AM
ok thanks!
I didn't get this point before!
vBulletin, Copyright ©2000-2010, Jelsoft Enterprises Ltd.