Probably easy glDrawElements question for you

First of all let say it this report of greeting toward the whole of you!

GOOD DAY!!

I cannot find French-Candian (OR OTHER) forum useful:

Articles use glDrawElements, they be loaded, and however the structure coordinates, the summits etc… are another number???

I experienced that openGL it wants that I have all blocks of data the same size. How is it which is possible that I can furnish the data, so that I can use myself it over glDrawElements?

It would be really useful, if you could give me the connections to the instruction courses or a certain sample code.

I now make this publication with the apologies regarding the suspicious agreement of my language that I speak now toward your ears (although you are reading it, because you could not hear me, but if you do indeed hear me, you can ignore in this case, please this report to hear regarding me )

i must say i would like to help you. however, i haven’t got a clue what you are asking, although i very much like the way you said it anyhow.

could you maybe explain “summit” in other words?

I is lucky that you wrote this mast and at least my mast is now recognized! Although I am not safe now, how to communiate this!

OK ONE. Summit: I want to say the points of the triangles. Each triangle has three points. Do they cover? Deeply thanks for my language still!

i’m still not sure i understand - but if i understand right, you mean you have say 200 vertex positions, but say 320 unique normals and texture coordinates, because some vertices are used in different triangles?
is that it?
if so, you have to duplicate the vertex positions for those vertices, so you have for each vertex, one position, one normal, one texture coordinate (or whatever it is you need).
so you will have to change your “summits” (if you mean indices) for some triangles to use the new, duplicated, vertex positions so they get the right normals and texcoords.

am i on the right track?

you mean your lists of positions, normals, colors etc are different sizes, yes?

I think I understand what you are trying to ask for…

You are wanting to use the glDrawElements routine to draw some triangles but it is asking you for same size information?

If this is the case then I assume the problem is to do with you not setting up the required arrays for the different elements of the triange such as Color, Normals and texture coordinates.

I haven’t used this command myself but on locating information on it at :
http://www.3dlabs.com/support/developer/GLmanpages/gldrawelements.htm

It sounds like an interesting item to work with.

You may also want to look at http://www.movesinstitute.org/~mcdowell/mv4202/notes/lect14.pdf which seems to have some sample code you may be able to use.

Tina

They struck that nail of the head. This is what the English word I think. The way that you are correct.

Now you can say a good code to me to make this. The example code would help me much!

For your information am I beginning with a certain document, like ASE.

Thanks!

There’s no law that says it’s illegal to write in other languages.

SVP, Pose ta question en francais.

V-man

I suppose what you are asking is how to specify the arrays of data (vertices, textcoords, normals, etc.) to use before calling glDrawElements.

First, you enable the arrays you want to use :

glEnableClientState(GL_VERTEX_ARRAY);
glEnableClientState(GL_COLOR_ARRAY);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
glEnableClientState(GL_NORMAL_ARRAY);

Then, you specify pointers to the data you want to use :

glVertexPointer(3, GL_FLOAT, 0, vertices); glColorPointer(4, GL_UNSIGNED_BYTE, 0, colors);
glTexCoordPointer(2, GL_FLOAT, 0, textcoords);
glNormalPointer(3, GL_FLOAT, 0, normals);

where vertices, colors, textcoords and normals are pointers to your data.

Finally you call GlDrawElements :

glDrawElements(GL_TRIANGLES, num_indexes, GL_UNSIGNED_INT, indexes);

If you are looking for an OpenGL forum in french, you can try : http://www.linuxgraphic.org/

If I didn’t understand your question, you can try in french, it’s my mother tongue.

Yeah, ask in French, because you do not make a lot of sense in English… :slight_smile:

Y’a beaucoup de Francais sur ce board?

Y.

Y’a beaucoup de Francais sur ce board?
Quelques uns semble-t-il :wink:

Look here, I think you’ll find everythings you need…
http://www.opengl.org/developers/documentation/Specs/glspec1.1/node1.html

Sincerly yours,

PS : this is a joke : “If you don’t reach your goal with this doc, do not try to code with OpenGL…!”. :wink:

I thank you everything to submit to me your suggestions to answer the question that I had said you that I just made a day ago.

I am likewise very lucky to experience that I am to be understood my seizure of the English for “Joe average” now rather well!

My English professor will be fast, in order to congratulate mine antics from donkey on thanks to this forum! It is the very inclination of the success set and the framing clip.