Hi i have another newbie question
This is the case,
I calculate vertexes of a 3d object , than draw it using GL_GUADS.
After this drawing everything seems ok.
You can think of 3d object like plastic glass (or a cylinder with one side is open). But glass is drawn as not standing but lying on side, so there is opening on the right side.
than i draw polygon at opening of glass with different color.
so now it look like cylinder with one opening part different color.
Than i start to rotate this all 3d cylinder on y-axis.
i suppose to see a cylinder rotating on y axis, and when the polygon with different color (opening part of glass) is drawn at the back,
i should not see it , because other side of glass should be in front of it.
at drawing method, first i draw 3d object , after that i draw polygon.
So as far as i get, regardless of coordinates of shapes, openGL draws shapes with the order that you draw in your code. (i first code to draw 3d object than polygon with different color, so according to code, openGL draws 3d object , and last polygon, so polygon can always be seen , regardless of coordinates)
There is certainly a way to accomplish this, but i dont know it.
So, how can i draw multiple shapes and see that in the way that , they are drawn by their coordinates, not in the order of drawing code.
Thank you very much…