Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

In an iOS app I am writing I am now culling all the GL 1 crap from my GL 2 code. Can I safely remove glEnable?

share|improve this question
1  
glEnable() is usually used with parameters - see khronos.org/opengles/documentation/opengles1_0/html/… - could you please tell us what you plan to use/are using glenable() for? –  sarahm Dec 6 '11 at 23:22
    
@sarahm, this is from the GLES 1.0 specs; the 2.0 version is at khronos.org/opengles/sdk/docs/man/xhtml/glEnable.xml –  Sam Hocevar Dec 7 '11 at 0:18
    
Sorry, didn't notice I was quoting the old spec. Thank you. –  sarahm Dec 7 '11 at 0:23

1 Answer 1

up vote 11 down vote accepted

glEnable and glDisable are still present in GLES 2, but a lot of boolean states are deprecated or even removed (for instance, GL_TEXTURE_2D or GL_ALPHA_TEST).

According to the manual page, the following boolean states can still be enabled or disabled using these functions:

  • GL_BLEND
  • GL_CULL_FACE
  • GL_DEPTH_TEST
  • GL_DITHER
  • GL_POLYGON_OFFSET_FILL
  • GL_SAMPLE_ALPHA_TO_COVERAGE
  • GL_SAMPLE_COVERAGE
  • GL_SCISSOR_TEST
  • GL_STENCIL_TEST
share|improve this answer
    
Thanks very much Sam. –  dugla Dec 7 '11 at 16:07

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.