need help in multitexturing using opengl shading language (solved)
Quote:Original post by Ademan555
hrm, thats what i thought, so how would you set the attributes then for his shader? because wouldnt attribute0 be position? and such? so youd have to know which attribute his floats were being assigned to.
You ask OGL where a certain attribute is via the GLSL C API, I'm pretty sure that you can also tell OGL what attribute to put into what position pre-linking.
So, in this case you'd ask where "texturesin1" is and then assign a value to that location
Quote:Original post by fazekaim
GL_MAX_VERTEX_ATTRIBS_ARB:32
I excedeed the 32 attributes? How?
What vertex streams do you have active?
As you've used 9 that I can see (the 4 texturesin, the 4 texture coords and the gl_Vertex) just from that shader, however given that you've got 32 I'd be impressed if you've run out, it might be a driver bug, in which case contacting someone at ATI might be a plan...
Well, seeing those kindw of numbers for a 9600 makes me want to migrate to glsl :-D, sooo..... i gotta ask, this is the extension for glsl functionality right? http://oss.sgi.com/projects/ogl-sample/registry/ARB/shader_objects.txt
edit: UGH, so many new functions... is there a way to create a static lib for an existing dll? its about time someone made a lib for it and made glext into a bunch of import functions (wrong term probably) ie: extern "C" { FUNCS };
thanks
-Dan
[Edited by - Ademan555 on January 1, 2005 6:07:45 PM]
edit: UGH, so many new functions... is there a way to create a static lib for an existing dll? its about time someone made a lib for it and made glext into a bunch of import functions (wrong term probably) ie: extern "C" { FUNCS };
thanks
-Dan
[Edited by - Ademan555 on January 1, 2005 6:07:45 PM]
Quote:What vertex streams do you have active?
As you've used 9 that I can see (the 4 texturesin, the 4 texture coords and the gl_Vertex) just from that shader, however given that you've got 32 I'd be impressed if you've run out, it might be a driver bug, in which case contacting someone at ATI might be a plan...
im not 100% sure but if its anythjing like varying its the number of components that counts
eg 1 texture coord prolly counts as 4
(this caught me out before with varying stuff)
Quote:Original post by Ademan555
edit: UGH, so many new functions... is there a way to create a static lib for an existing dll? its about time someone made a lib for it and made glext into a bunch of import functions (wrong term probably) ie: extern "C" { FUNCS };
Thats what stuff like GLee is for, check the forum FAQ.
Quote:Original post by zedzeek
im not 100% sure but if its anythjing like varying its the number of components that counts
eg 1 texture coord prolly counts as 4
(this caught me out before with varying stuff)
I did consider that, but given how the Orange book shows things lineing up that doesnt make sense, as it has gl_Vertex as one attribute for example, which is 4 floats.
However, given his problems and your point about varying it could well be the issue as 9*4 gives 36floats used up, above the limit which would explain the error
>>I did consider that, but given how the Orange book shows things lineing up that doesnt make sense, as it has gl_Vertex as one attribute for example, which is 4 floats.<<
i looked at the gl spec last night, and im now pretty sure u were correct, ie the size of each attribute is not important (unlike the varying variables) also it states an app must support at least 16attributes
i looked at the gl spec last night, and im now pretty sure u were correct, ie the size of each attribute is not important (unlike the varying variables) also it states an app must support at least 16attributes
didnt think i was going crazy [wink]
Which doesnt explain why it doesnt work as he's only use up 9 attributes o.O
Maybe I'll remember to ask ATI devrel about it at some point...
Which doesnt explain why it doesnt work as he's only use up 9 attributes o.O
Maybe I'll remember to ask ATI devrel about it at some point...
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement