Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

accessing a vertex buffer (buffer array) in a fragment shader

Is it possible to access a vertex buffer in a fragment shader using a sampler1D in Opengl 3.0>? I think I read about it in the past, but I can't find anything about it. I can render the data to a texture, but it wouldn't be very elegant code, if a more explicit way is available.

like image 744
xernobyl Avatar asked May 02 '11 03:05

xernobyl


1 Answers

Yes, this is called Texture Buffer Object (TBOs), it's available as a Core OpenGL feature in 3.3 (i think) or as an ARB extension, for more information check the extension specification:

http://www.opengl.org/registry/specs/ARB/texture_buffer_object.txt

like image 193
Dr. Snoopy Avatar answered Sep 24 '22 00:09

Dr. Snoopy