Jump to content

View more

Image of the Day

Boxes as reward for our ranking mode. ヾ(☆▽☆)
#indiedev #gamedev #gameart #screenshotsaturday https://t.co/ALF1InmM7K
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

The problem with glCullFace() and specifying vertices....

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
1 reply to this topic

#1 Gammastrahler   Members   

150
Like
Likes
Like

Posted 22 June 2001 - 11:53 AM

hi, i´m a little bit confused about this: to speed up rendering, i use glCullFace(GL_BACK). OK. So my polys are all counter-clockwised (glFrontFace(GL_CCW). But when i want to draw a quad backface, for instance, i must swap vertex 0 and 3, or the primitive won´t be drawn. this is generally no problem, but it is inconvenient for me when i need to do some math. for example, my code to calc normals do not work properly for backface polys. i have considered to hold a specific option for every poly when it´s created, whether it is facing front or back and then either call glCullFace(GL_FRONT) or glCullFace(GL_BACK). But this seems still to inconvenient. i search for a solution which can test whether a polygon is facing back or front, even if i specify my points in the same order, and then calculate the proper normals... i hope you understand and can help me... thanks & greets gammastrahler

#2 Obelix   Members   

122
Like
Likes
Like

Posted 22 June 2001 - 12:48 PM

quote:
Original post by Gammastrahler
to speed up rendering, i use glCullFace(GL_BACK). OK. So my polys are all counter-clockwised (glFrontFace(GL_CCW).

But when i want to draw a quad backface, for instance, i must swap vertex 0 and 3, or the primitive won´t be



If I understand the problem right can you disable culling or use glCullFace(GL_FRONT).






Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.