I have organized the vbo data to be loaded into a textureBufferObject according to an internal indexing system... [0] is number of lights, [1] is index into first light data, [2] is index into next light data if there is a next light; index into the first light data points to position.x, index into the first light data + 1 points to position.y etc. The tbo is working fine thanks to Dark Photon http://www.opengl.org/discussion_boa...example-needed. But I find the tbo requires to be indexes as an array of vec4 (floats in my case) rather than a flat single array as the tbo specs suggest. That is, to access tbo[4] I have to use. I do not see any setting in the initialization that might flatten the tbo:Code :float f=texelFetch(tbo, 1)[0];
//DCode :int size=dat.length * GL_FLOAT.sizeof; glGenBuffers(1, &tbo); assert(tbo>0); glBindBuffer(GL_TEXTURE_BUFFER, tbo); glBufferData(GL_TEXTURE_BUFFER, size, null, GL_STATIC_DRAW); glBufferSubData(GL_TEXTURE_BUFFER, 0, size, dat.ptr); glGenTextures(1, &lMap); assert(lMap > 0); glActiveTexture(GL_TEXTURE6); glBindTexture(GL_TEXTURE_BUFFER, lMap); glTexBuffer(GL_TEXTURE_BUFFER, GL_RGBA32F, tbo);
Does anyone have any thoughts on how best to proceed in the situation?![]()



