is it possible to have vertex normals or even face normals using triangle strips nt

Where’s the ‘crappy post’ button?

would this work? assuming all like verticies all share the same texture coordinates. and have averaged normals

glBegin(GL_TRIANGLE_STRIP)

//first triangle

glNormal()
glTexCoord()
glVertex()
glNormal()
glTexCoord()
glVertex()
glNormal()
glTexCoord()
glVertex()
glNormal()

//second triangle

glNormal()
glNormal()
glNormal()
glTexCoord()
glVertex()

//3rd triangle

glNormal()
glNormal()
glNormal()
glTexCoord()
glVertex()

//4th triangle

glNormal()
glNormal()
glNormal()
glTexCoord()
glVertex()

//5th triangle

glNormal()
glNormal()
glNormal()
glTexCoord()
glVertex()…

thats the only solution i can imagine. and it is so implausable i don’t even feel like trying it.

[This message has been edited by wildeyedboyfromfreecloud (edited 03-17-2002).]

not to be rude but this is getting rediculous. if you do not know the difference between GL_TRIANGLES and GL_TRIANGLE_STRIP… then please don’t comment. no offense. its not like it matters if you know or not. but obviously you can’t very well answer my question if you don’t.
same goes with GL_TRIANGLE_FAN. i hear that ROAM algorithms can be further optimized with this. but i’m not sure how you would implement normals. hm i don’t know. i will just try using the same normals from my previous vertecies and see what it looks like. may be good enough.

>glNormal()
glNormal()
glNormal()
glTexCoord()
glVertex()<<

mate u do obviously need to read the red book. (buy it i still use it even now 4 years after i brought it nearly every day)
anyways with vertex arrays + tri_strips having face normals is NOT possible (for obvious reasons) having vertex normals is

You cannot specify separate normals for the triangles in a triangle strip. Think of a triangle strip as a bunch of {normal/texcoord/vertex}-bundles. So, each new vertex you specify goes with exactly one normal. If you need different normals for the vertices, you can’t use a triangle strip (e.g., in the case of hard edges). You can’t triangle strip a lit cube, for example…

Michael

thanks. thats why i posed it as a simple question. yeah i wish i had a copy of the red book. but i wish i had a lot of things. but i have priorities. and then their is reality. circumstances are not always perferct know what i mean. maybe someday. but i get by.

also if someone would have said origionally that it is not possible. i would have been satisfied. what about shadow maps. i honestly don’t know what those really are. haven’t looked into them.

also in my humble opionion it would be pleasant if this boards denizens were a tad less condescending. and no i did not imagine for a second that formulation would work zed. and i gather the red book is just a bunch of common sense for the most part.

[This message has been edited by wildeyedboyfromfreecloud (edited 03-17-2002).]

this is getting ridiculous

You are ridiculous posting these kind of questions in the advanced forum (yes, your question about back face culling was as inadequate as this one for the advanced forum).

And everybody has priorities. Having your own does not give you the right to consider contributors being at your service.

no comment

you dont have a copy of the red book?
everyone has…
its online, on the web, for free

where? i dont tell you, i dont have time to do so…

and learn what a ****in statemachine is, its soooooooo easy

and why asking simple questions in the advanced board all the time?

He was given a link to the online red book by gorg near the beginning of this ridiculous thread.
I don’t know, I must be getting old.

you know this is probably why i’m not terribly fond of people. who knows? crowded places give me the creaps. i need a sabatical from this board. sayanora minasan

talk amongst yourselves.
no hard feelings

wildeyed…

Hopefully you found the answer in this thread. It’s in there (barely), though I notice not one single person gave you a useful, simple reply.

Zen was the most useful by giving you this code:
glBegin(GL_TRIANGLE_STRIPS);
glNormal3f( nx,ny,nz );
glVertex3f( x, y, z );
.
.
.
glEnd();

To make the pattern more obvious, you do it this way:
glBegin(GL_TRIANGLE_STRIPS);
glNormal3f( nx,ny,nz );
glVertex3f( x, y, z );
glNormal3f( nx,ny,nz );
glVertex3f( x, y, z );
glNormal3f( nx,ny,nz );
glVertex3f( x, y, z );
glNormal3f( nx,ny,nz );
glVertex3f( x, y, z );
.
.
.
glEnd();

Now when OpenGL reuses 2 vertices from the strip, along with a 3rd vertex you just sent it to draw a triangle, it will also reuse the 2 normals (and 2 sets of tex coords) that were associated with those vertices. You don’t have to worry about resending those normals.

Now, if you actually want two different normals for one vertex (for example, two adjacent faces of a cube), you can’t use a single tri-strip. You will need to use multiple tri-strips, one to draw each face.

I hope that’s clear enough. If not, tell me and I will try again … happily I might add.

It’s too bad you didn’t pose this question a year or two ago. Back then, this forum was frequented by mostly very pleasant people. Over the last 3 or 6 months though, the quality and friendliness of the people and replies seems to have dropped through the floor. It seems everyone here (well, at least the vocal ones) would rather play “Advanced OpenGL topic”-police and stroke each other, than to actually HELP someone. That’s a shame. Afterall, they spend far more time typing a hateful reply than they would pressing the down-arrow key to scroll to the next question.

I do understand their frustration … there have been many “non-advanced” questions posed here lately. But there is a right way to respond (nicely, patiently pointing people in the right direction) and a wrong way to respond (what you got, which sadly now seems to be the norm on this board). The mailing list for wxWindows (wxwindows.org) could be used as an example of how to politely handle beginner questions.

I would like to suggest perhaps an “Intermediate OpenGL questions” forum, to go with the Beginner and Advanced forums. Maybe that would help alleviate some problems? What was that moderator’s email address again? I no longer have it, but I would happily suggest it.

If you have any more OpenGL questions, go ahead and email me directly (see profile). I may not have all the answers for you, but at least I won’t be a jackass about it.

You may also want to try asking at openglforums.com (I believe it is new). I’m hoping the attitude there will be significantly more adult than it is here.

Good luck with your coding!

Brett

Oh, nice tip about the Red Book being online Gorg!

I never would have guessed it would be available electronically. My own copy is getting worn out almost beyond use.

about the lovely online redbook
nearly everyone of us started somehow with nehes tutorials, or at least have seen them.
on his page are tons of nice links to helpful opengl-pages, one of those links is called RED BOOK, one BLUE BOOK
guess where they href to?

about the not friendly post of mine above
sorry for not beeing friendly. its just annoying to see such a tone in this forum right from the beginning…

and, not bad ment, wildeyedboyfromfreecloud, but most of the questions don’t sound very advanced, not important if they are for you or not. and your tone is sort of arogant, too. this sounds like a newby wanna sound big… wich is, as you know yourself, not accepted anymore in the advanced forums in opengl.org

but i see the problem myself as this post is getting bigger and bigger… if i get some more “motivation” i’ll write tutorialpages about the most asked questions in this ****in forum…

it was so cool before nvidia had such nice extensions and everyone moved here in opengl is now much too mainstream

Originally posted by painterb:
[b]Oh, nice tip about the Red Book being online Gorg!

I never would have guessed it would be available electronically. My own copy is getting worn out almost beyond use.[/b]

Yes it is nice. The blue book is also online by the way.

Gorg,

Is the red book for OpenGL 1.2 online by any chance?

Painterb said:-

though I notice not one single person gave you a useful, simple reply.

Err…I believe the number of useful replies is in double figures for this thread.
I was bored this evening, so I’ve read 'em all…sound advice was delivered with a cautionary rhetoric, all trying to steer this guy into doing some research into the subject of opengl.
Is that unreasonable?

Please, explain to me about the flowers - how do they know when to grow?
Books?! You’re saying people have written books on the subject?!! Wow. But once again, please tell me about the flowers, how do they know when to grow? Don’t shout, I’m only asking about the flowers…

It’s like talking to a mental patient.

Mind you, it’s entertaining enough, when you’ve nothing better to do - but it will annoy me the next big deadline I get.

This guy, wildeyedboy…, is going to ignore your suggestions about posting in the beginners forum (he is doing it from his first post). He is also ignoring your links or suggestions about the red book, nehe tutorials or similars. He just want you to write the code so he has nothing to think.
This question can be answered by most of the beginners programmers.
The only suggestion I can do about him is to ignore his questions.

Originally posted by ecarter:
[b]Gorg,

Is the red book for OpenGL 1.2 online by any chance?[/b]

I don’t think so.

what is this, a gentleman lurks in your midst. i will have to take you up on that painter. i’m not much for adressing crowds. too many people in one place… there’s bound to be something not good afoot. purely in defense of myself. i’ve glossed over much of the topics on this board just to see if i might catch some good ideas. and i must admit i didn’t see a single one that seemed more beginner or more advanced to me. and the majority were what i can only describe as well below the cognitive level of this query which by the way originated as an offshot question of whether or not opengl supports any type of method of supplying normal data to triangle strips. which is logical to think that it might. i mean somewhere the origional verts have to be reiterated. so it wouldn’t be a far cry to supplement normal data somewhere. and i wouldn’t be surprised if it is possible. and none of the self ordained advanced crowd are unaware of. i could as well add that seemingly only 15% of your crue seemed to be able to discern the difference between GL_TRIANGLE_STRIPS and GL_TRIANGLES. but i fear i’m being ugly. so i digress. my sincerest apologies for any transgressions. i place the blame entirely upon my ignorance.
i gave up pleasing everyone a long time ago.
ciao

michael