llglimmediate.h

Go to the documentation of this file.
00001 
00037 #ifndef LL_LLGLIMMEDIATE_H
00038 #define LL_LLGLIMMEDIATE_H
00039 
00040 #include "stdtypes.h"
00041 #include "llgltypes.h"
00042 #include "llglheaders.h"
00043 #include "llvertexbuffer.h"
00044 
00045 class LLGLImmediate
00046 {
00047 public:
00048         LLGLImmediate();
00049 
00050         void translatef(const GLfloat& x, const GLfloat& y, const GLfloat& z);
00051         void pushMatrix();
00052         void popMatrix();
00053         void blendFunc(GLenum sfactor, GLenum dfactor);
00054         void flush();
00055 
00056         void begin(const GLuint& mode);
00057         void end();
00058         void vertex2i(const GLint& x, const GLint& y);
00059         void vertex2f(const GLfloat& x, const GLfloat& y);
00060         void vertex3f(const GLfloat& x, const GLfloat& y, const GLfloat& z);
00061         void vertex2fv(const GLfloat* v);
00062         void vertex3fv(const GLfloat* v);
00063         
00064         void texCoord2i(const GLint& x, const GLint& y);
00065         void texCoord2f(const GLfloat& x, const GLfloat& y);
00066         void texCoord2fv(const GLfloat* tc);
00067 
00068         void color4ub(const GLubyte& r, const GLubyte& g, const GLubyte& b, const GLubyte& a);
00069         void color4f(const GLfloat& r, const GLfloat& g, const GLfloat& b, const GLfloat& a);
00070         void color4fv(const GLfloat* c);
00071         void color3f(const GLfloat& r, const GLfloat& g, const GLfloat& b);
00072         void color3fv(const GLfloat* c);
00073         void color4ubv(const GLubyte* c);
00074         
00075         typedef struct Vertex
00076         {
00077                 GLfloat v[3];
00078                 GLubyte c[4];
00079                 GLfloat uv[2];
00080         };
00081 
00082 private:
00083         U32 mCount;
00084         U32 mMode;
00085         LLPointer<LLVertexBuffer> mBuffer;
00086         LLStrider<LLVector3> mVerticesp;
00087         LLStrider<LLVector2> mTexcoordsp;
00088         LLStrider<LLColor4U> mColorsp;
00089 };
00090 
00091 extern LLGLImmediate gGL;
00092 
00093 #endif

Generated on Fri May 16 08:32:49 2008 for SecondLife by  doxygen 1.5.5