OpenSceneGraph  3.0.1
Public Types | Public Member Functions | Protected Types | Protected Attributes
osg::GLBeginEndAdapter Class Reference

A class adapting OpenGL 1.0 glBegin()/glEnd() style code to vertex array based code. More...

List of all members.

Public Types

enum  MatrixMode { APPLY_LOCAL_MATRICES_TO_VERTICES, APPLY_LOCAL_MATRICES_TO_MODELVIEW }

Public Member Functions

 GLBeginEndAdapter (State *state=0)
void setState (State *state)
StategetState ()
const StategetState () const
void setMatrixMode (MatrixMode mode)
MatrixMode setMatrixMode () const
void PushMatrix ()
void PopMatrix ()
void LoadIdentity ()
void LoadMatrixd (const GLdouble *m)
void MultMatrixd (const GLdouble *m)
void Translatef (GLfloat x, GLfloat y, GLfloat z)
void Scalef (GLfloat x, GLfloat y, GLfloat z)
void Rotatef (GLfloat angle, GLfloat x, GLfloat y, GLfloat z)
void Translated (GLdouble x, GLdouble y, GLdouble z)
void Scaled (GLdouble x, GLdouble y, GLdouble z)
void Rotated (GLdouble angle, GLdouble x, GLdouble y, GLdouble z)
void Vertex3f (GLfloat x, GLfloat y, GLfloat z)
void Vertex3fv (const GLfloat *v)
void Color4f (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
void Color4fv (const GLfloat *c)
void Color4ubv (const GLubyte *c)
void Normal3f (GLfloat x, GLfloat y, GLfloat z)
void Normal3fv (const GLfloat *n)
void TexCoord1f (GLfloat x)
void TexCoord1fv (const GLfloat *tc)
void TexCoord2f (GLfloat x, GLfloat y)
void TexCoord2fv (const GLfloat *tc)
void TexCoord3f (GLfloat x, GLfloat y, GLfloat z)
void TexCoord3fv (const GLfloat *tc)
void TexCoord4f (GLfloat x, GLfloat y, GLfloat z, GLfloat w)
void TexCoord4fv (const GLfloat *tc)
void MultiTexCoord1f (GLenum target, GLfloat x)
void MultiTexCoord1fv (GLenum target, const GLfloat *tc)
void MultiTexCoord2f (GLenum target, GLfloat x, GLfloat y)
void MultiTexCoord2fv (GLenum target, const GLfloat *tc)
void MultiTexCoord3f (GLenum target, GLfloat x, GLfloat y, GLfloat z)
void MultiTexCoord3fv (GLenum target, const GLfloat *tc)
void MultiTexCoord4f (GLenum target, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
void MultiTexCoord4fv (GLenum target, const GLfloat *tc)
void VertexAttrib1f (GLuint unit, GLfloat x)
void VertexAttrib1fv (GLuint unit, const GLfloat *tc)
void VertexAttrib2f (GLuint unit, GLfloat x, GLfloat y)
void VertexAttrib2fv (GLuint unit, const GLfloat *tc)
void VertexAttrib3f (GLuint unit, GLfloat x, GLfloat y, GLfloat z)
void VertexAttrib3fv (GLuint unit, const GLfloat *tc)
void VertexAttrib4f (GLuint unit, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
void VertexAttrib4fv (GLuint unit, const GLfloat *tc)
void Begin (GLenum mode)
void End ()

Protected Types

typedef std::list< MatrixdMatrixStack
typedef std::vector< bool > AssignedList
typedef std::vector< osg::Vec4fVertexList
typedef std::vector
< osg::ref_ptr< Vec4Array > > 
VertexArrayList

Protected Attributes

State_state
MatrixMode _mode
MatrixStack _matrixStack
bool _normalAssigned
osg::Vec3f _normal
bool _colorAssigned
osg::Vec4f _color
osg::Vec3f _overallNormal
osg::Vec4f _overallColor
AssignedList _texCoordAssignedList
VertexList _texCoordList
AssignedList _vertexAttribAssignedList
VertexList _vertexAttribList
GLenum _primitiveMode
osg::ref_ptr< osg::Vec3Array_vertices
osg::ref_ptr< osg::Vec3Array_normals
osg::ref_ptr< osg::Vec4Array_colors
VertexArrayList _texCoordsList
VertexArrayList _vertexAttribsList

Detailed Description

A class adapting OpenGL 1.0 glBegin()/glEnd() style code to vertex array based code.


Member Typedef Documentation

typedef std::vector<bool> osg::GLBeginEndAdapter::AssignedList [protected]
typedef std::list<Matrixd> osg::GLBeginEndAdapter::MatrixStack [protected]
typedef std::vector< osg::ref_ptr<Vec4Array> > osg::GLBeginEndAdapter::VertexArrayList [protected]
typedef std::vector<osg::Vec4f> osg::GLBeginEndAdapter::VertexList [protected]

Member Enumeration Documentation

Enumerator:
APPLY_LOCAL_MATRICES_TO_VERTICES 
APPLY_LOCAL_MATRICES_TO_MODELVIEW 

Constructor & Destructor Documentation

osg::GLBeginEndAdapter::GLBeginEndAdapter ( State state = 0)

Member Function Documentation

void osg::GLBeginEndAdapter::Begin ( GLenum  mode)
void osg::GLBeginEndAdapter::Color4f ( GLfloat  red,
GLfloat  green,
GLfloat  blue,
GLfloat  alpha 
) [inline]
void osg::GLBeginEndAdapter::Color4fv ( const GLfloat *  c) [inline]
void osg::GLBeginEndAdapter::Color4ubv ( const GLubyte *  c) [inline]
void osg::GLBeginEndAdapter::End ( )
State* osg::GLBeginEndAdapter::getState ( ) [inline]
const State* osg::GLBeginEndAdapter::getState ( ) const [inline]
void osg::GLBeginEndAdapter::LoadIdentity ( )
void osg::GLBeginEndAdapter::LoadMatrixd ( const GLdouble m)
void osg::GLBeginEndAdapter::MultiTexCoord1f ( GLenum  target,
GLfloat  x 
) [inline]
void osg::GLBeginEndAdapter::MultiTexCoord1fv ( GLenum  target,
const GLfloat *  tc 
) [inline]
void osg::GLBeginEndAdapter::MultiTexCoord2f ( GLenum  target,
GLfloat  x,
GLfloat  y 
) [inline]
void osg::GLBeginEndAdapter::MultiTexCoord2fv ( GLenum  target,
const GLfloat *  tc 
) [inline]
void osg::GLBeginEndAdapter::MultiTexCoord3f ( GLenum  target,
GLfloat  x,
GLfloat  y,
GLfloat  z 
) [inline]
void osg::GLBeginEndAdapter::MultiTexCoord3fv ( GLenum  target,
const GLfloat *  tc 
) [inline]
void osg::GLBeginEndAdapter::MultiTexCoord4f ( GLenum  target,
GLfloat  x,
GLfloat  y,
GLfloat  z,
GLfloat  w 
)
void osg::GLBeginEndAdapter::MultiTexCoord4fv ( GLenum  target,
const GLfloat *  tc 
) [inline]
void osg::GLBeginEndAdapter::MultMatrixd ( const GLdouble m)
void osg::GLBeginEndAdapter::Normal3f ( GLfloat  x,
GLfloat  y,
GLfloat  z 
) [inline]
void osg::GLBeginEndAdapter::Normal3fv ( const GLfloat *  n) [inline]
void osg::GLBeginEndAdapter::PopMatrix ( )
void osg::GLBeginEndAdapter::PushMatrix ( )
void osg::GLBeginEndAdapter::Rotated ( GLdouble  angle,
GLdouble  x,
GLdouble  y,
GLdouble  z 
)
void osg::GLBeginEndAdapter::Rotatef ( GLfloat  angle,
GLfloat  x,
GLfloat  y,
GLfloat  z 
) [inline]
void osg::GLBeginEndAdapter::Scaled ( GLdouble  x,
GLdouble  y,
GLdouble  z 
)
void osg::GLBeginEndAdapter::Scalef ( GLfloat  x,
GLfloat  y,
GLfloat  z 
) [inline]
void osg::GLBeginEndAdapter::setMatrixMode ( MatrixMode  mode) [inline]
MatrixMode osg::GLBeginEndAdapter::setMatrixMode ( ) const [inline]
void osg::GLBeginEndAdapter::setState ( State state) [inline]
void osg::GLBeginEndAdapter::TexCoord1f ( GLfloat  x) [inline]

References GL_TEXTURE0.

void osg::GLBeginEndAdapter::TexCoord1fv ( const GLfloat *  tc) [inline]

References GL_TEXTURE0.

void osg::GLBeginEndAdapter::TexCoord2f ( GLfloat  x,
GLfloat  y 
) [inline]

References GL_TEXTURE0.

void osg::GLBeginEndAdapter::TexCoord2fv ( const GLfloat *  tc) [inline]

References GL_TEXTURE0.

void osg::GLBeginEndAdapter::TexCoord3f ( GLfloat  x,
GLfloat  y,
GLfloat  z 
) [inline]

References GL_TEXTURE0.

void osg::GLBeginEndAdapter::TexCoord3fv ( const GLfloat *  tc) [inline]

References GL_TEXTURE0.

void osg::GLBeginEndAdapter::TexCoord4f ( GLfloat  x,
GLfloat  y,
GLfloat  z,
GLfloat  w 
) [inline]

References GL_TEXTURE0.

void osg::GLBeginEndAdapter::TexCoord4fv ( const GLfloat *  tc) [inline]

References GL_TEXTURE0.

void osg::GLBeginEndAdapter::Translated ( GLdouble  x,
GLdouble  y,
GLdouble  z 
)
void osg::GLBeginEndAdapter::Translatef ( GLfloat  x,
GLfloat  y,
GLfloat  z 
) [inline]
void osg::GLBeginEndAdapter::Vertex3f ( GLfloat  x,
GLfloat  y,
GLfloat  z 
)
void osg::GLBeginEndAdapter::Vertex3fv ( const GLfloat *  v) [inline]
void osg::GLBeginEndAdapter::VertexAttrib1f ( GLuint  unit,
GLfloat  x 
) [inline]
void osg::GLBeginEndAdapter::VertexAttrib1fv ( GLuint  unit,
const GLfloat *  tc 
) [inline]
void osg::GLBeginEndAdapter::VertexAttrib2f ( GLuint  unit,
GLfloat  x,
GLfloat  y 
) [inline]
void osg::GLBeginEndAdapter::VertexAttrib2fv ( GLuint  unit,
const GLfloat *  tc 
) [inline]
void osg::GLBeginEndAdapter::VertexAttrib3f ( GLuint  unit,
GLfloat  x,
GLfloat  y,
GLfloat  z 
) [inline]
void osg::GLBeginEndAdapter::VertexAttrib3fv ( GLuint  unit,
const GLfloat *  tc 
) [inline]
void osg::GLBeginEndAdapter::VertexAttrib4f ( GLuint  unit,
GLfloat  x,
GLfloat  y,
GLfloat  z,
GLfloat  w 
)
void osg::GLBeginEndAdapter::VertexAttrib4fv ( GLuint  unit,
const GLfloat *  tc 
) [inline]

Member Data Documentation


The documentation for this class was generated from the following file:

osg logo
Generated at Mon Oct 3 2011 12:39:42 for the OpenSceneGraph by doxygen 1.7.5.