View Full Version : how to send attribute arrays
09-01-2005, 05:02 AM
Browsing the net I found glEnableVertexAttribArrayARB but that's not really what I need.. From what I've understood and tested it's used jointly with vertex arrays.
But what I need is to send, vertex per vertex, an array such as:
attribute vec3 TexCoords;
How can I send that from C++ ?
09-01-2005, 06:29 AM
GLSL doesn't support attribute arrays.
See issue 75 in the GLSL specs.
What you need is four vertex arrays with texture coordinates in your application and four attributes in the vertex shader sourcing them.
09-01-2005, 06:41 AM
Thanks.. so bad I have to decompose it.
09-01-2005, 07:26 AM
uhm.. im not sure, but try:
attribute mat4 MyMatrix;yooyo
09-01-2005, 08:22 AM
Still needs four (now continuous!) attribute arrays on OpenGL API side, because OpenGL attribs are maximum vec4.
If you're concerned about decomposing into different memory locations on app side, that's not a problem. Vertex arrays have a stride parameter, so you can interleave the data in memory.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.