Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
These files are the OpenGL ES render driver. You should be able to us…
Browse files Browse the repository at this point in the history
…e them on any platform that supports OpenGL ES -- not just iPhone. The driver is based off the OpenGL render driver.

There are a few differences between OpenGL and OpenGL ES that present difficulties for this driver:
- OpenGL ES does NOT support many pixel formats (for example, no GL_BGR).  Also, when using texture functions format and internalFormat must be the same -- this means 32 bit packed formats like SDL_PIXELFORMAT_BGR888 cannot be automatically converted to GL_RGB (which is 24bpp).
- OpenGL ES doesn't have GL_PACK_ROW_LENGTH, which means data must be reformatted before uploading changes to dirty rects.  This change has been added.
- OpenGL ES doesn't support paletted textures, though there is an extension.  I'm looking into this.

Some other notable differences:
- OpenGL ES has an extension called GL_OES_draw_texture which allows for quicker 2D sprite-type drawing.  I use this in GL_RenderCopy when it is available.  The iPhone supports the extension, but the iPhone Simulator does not (presently).
- No glBegin() / glEnd() and no GL_QUADS!  I'm using glDrawArrays with GL_TRIANGLE_STRIP instead!
  • Loading branch information
Holmes Futrell committed Jul 17, 2008
1 parent 16fa875 commit 0888314
Show file tree
Hide file tree
Showing 2 changed files with 869 additions and 0 deletions.

0 comments on commit 0888314

Please sign in to comment.