Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


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


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   -  Reputation: 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

Sponsor:

#2 Obelix   Members   -  Reputation: 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.



PARTNERS