Using OpenGL drawing operations in an object-oriented setting?

Posted by Lion Kabob on Stack Overflow See other posts from Stack Overflow or by Lion Kabob
Published on 2010-04-15T07:19:35Z Indexed on 2010/04/15 7:23 UTC
Read the original article Hit count: 382

I've been plowing through basic shaders and whatnot for an application I'm writing, and I've been having trouble figuring out a high-level organization for the drawing calls.

I'm thinking of having a singleton class which implements a number of basic drawing operations, taking data from "user" classes and passing that to the appropriate opengl calls.

I'm wondering how people do this when writing their own applications, as the internet is chock full of basic "Your first shader" tutorials, but very little on suggested organization of drawing code.

My particular environment is targeted at iPad/OpenGL ES 2.0, but I think the question stands for most environments.

© Stack Overflow or respective owner

Related posts about opengl

Related posts about opengl-es