Writing a basic shader for large input files
- by Zoltan Varadi
I started writing a shader for my iOS app and instead of starting from scratch i used this tutorial here:
http://www.raywenderlich.com/3664/opengl-es-2-0-for-iphone-tutorial
I wrote an import function, first to import wavefront .obj models. My problem is that with I can't handle larger inputs (with a simple cube it was working). I realized that the indices array is an array of GLubyte values, which is unsigned char, so as a result i cant have more than 256 indexes. I modified it to GLuint, but then only get a blank screen.
What else needs to me modified?
p.s.: the source can be downloaded from here: http://d1xzuxjlafny7l.cloudfront.net/downloads/HelloOpenGL.zip