#if defined(JAMBUILD)
#else
#include "../../include/Mudbox/mudbox.h"
#include "../../include/Mudbox/MudBoxGL.h"
#endif
{
public:
ImmediateModeRenderer( void );
~ImmediateModeRenderer( void );
virtual void Serialize(
Stream & );
virtual void Initialize( void );
virtual void SetMesh(
Mesh *pMesh );
virtual void Render(
bool bSkipMaterials = false,
);
virtual unsigned int RenderData(
const Selector *pSelector,
unsigned int iStart,
const Camera *pCamera );
virtual void DecodeData( unsigned int iData, unsigned int &iFaceIndex, unsigned int &iVertexIndex );
virtual void OnVertexPositionChange( unsigned int iVertexIndex, unsigned int iFaceIndex );
virtual void OnVertexStateChange( unsigned int iVertexIndex, unsigned int iFaceIndex );
virtual void OnMeshChange( MeshRenderer::MeshChange eChange = MeshRenderer::changeTopology );
virtual void SetLODLevel( float fLevel );
virtual float LODLevel( void ) const;
virtual void SetWireFrameMode( bool bMode );
virtual bool WireFrameMode( void ) const;
virtual void SetColorMode( bool bMode );
virtual bool ColorMode( void ) const;
virtual void SetVertexColor(
Color cVertexColor );
virtual Color VertexColor(
void )
const;
virtual void SetWireLevel( unsigned int iLevel );
virtual unsigned int WireLevel( void ) const;
virtual void SetTextureCoordinateMode( bool bMode );
virtual bool TextureCoordinateMode( void ) const;
virtual void SetTangentMode( bool bMode );
virtual bool TangentMode( void ) const;
virtual bool ReadyForClientRender() { return true;}
virtual void SetFacetedMode( bool bMode );
virtual bool FacetedMode( void ) const;
private:
void renderTriangle(
unsigned int index);
void renderTriangleNormals();
void renderQuad(unsigned int index);
void renderQuadNormals();
float m_fPointSize;
float m_fLineWidth;
bool m_bTCMode;
bool m_bFacetedMode;
bool m_bWireframeMode;
GLint m_iRedBits, m_iGreenBits, m_iBlueBits;
};