-
Advanced Member
Frequent Contributor
What does the glEnable and glDisable code look like?
This was asked at gamedev.net so I thought I'd ask it here because of the nvidia crew who posts here often.
Ever since I started OpenGL I've heard you should make your own state wrapping code. Is calling enable or diable so expensive that you should write code to remember if it's enabled already?
For example, enabling and disabling lights. You do this once per frame. Is the function call THAT heavy, or are the people who say that being really paranoid about losing even just a little time on a function call.
Personally I just call glEnable or glDisable whenever it's needed. Spider3D is modular so if someone uses their own state recorder it would be broken by anything that Spider3D does and vise-versa.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules