Surface Normals

Help
Zeus
2005-08-23
2013-04-17
  • Zeus

    Zeus - 2005-08-23

    Hi,

    Is there any way to use surface normals while using the glDrawElements function.

    When using glDrawElements, vertex normals are used instead of surface normals.

    glNormal can be used but this requires a call to glDrawArrays for every triangle instead of one single call to glDrawElements.

    Thanks,
    Grant

     
    • Hans-Martin Will

      With the present API, you would simply replicate the surface normals into each triangle vertex. While seemingly an inefficiency, it's actually faster this way when the API is implemented in hardware. You convert your model from a triangle soup into a set of triangle strips to make up for this.

      - HM

       

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks