MercuryOGL Class Reference

Open GL Display Driver. More...

#include <MercuryOGL.h>

Inheritance diagram for MercuryOGL:

Inheritance graph
[legend]
Collaboration diagram for MercuryOGL:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 MercuryOGL ()
virtual ~MercuryOGL ()
virtual bool MakeWindow (const char *title, int width, int height, int bits, bool fullscreenflag)
 Tell the display system to make its window.
virtual bool Init (const MString &name, unsigned int width, unsigned int height, unsigned short bpp, bool fullscreen)
virtual bool BeginFrame ()
virtual bool EndFrame ()
virtual void DrawParticleField (const MercuryParticleField *field)
virtual void DrawMesh (const MercuryMesh &mesh)
virtual void DrawSprite (const MercuryMesh &sprite)
virtual void GenerateVBO (MercuryMesh &mesh)
virtual void DestroyVBO (MercuryMesh &mesh)
virtual void SetMaterial (const MercuryMaterial *material)
 Set a material to draw with.
virtual void RendererInfo ()
 Resize window to a given height/width.
virtual void ClearZBuffer ()
 Flush the Zbuffer.
virtual void ClearFrameBuffer ()
virtual void DeleteTextures (int n, unsigned int *textureNames)
virtual void UpdateTextureData (MercuryTexture *texture, unsigned int &ID)
virtual void CreateCache (RawImageData *data, unsigned int &ID)
virtual void CreateCache (RawImageData *data, unsigned int &ID, bool isMipmap)
virtual void Viewport (int x, int y, int width, int height)
virtual void EnableTextures (MercuryMaterial *material)
virtual void EnableShaders (MercuryMaterial *material)
virtual void ErrorCheck ()
virtual void ReadFrameBuffer (RawImageData &image)
virtual void SendMatrixData (const MercuryMatrix &m)
virtual void SendProjectionMatrixData ()
virtual void StencilOp (STENCILOPS fail, STENCILOPS zfail, STENCILOPS zpass)
virtual void CullBackface (bool toggle)
virtual void StencilFunc (TFUNCT func, int ref, unsigned int zref)
virtual int CompileShader (MString vertStr, MString fragStr)
virtual void DestroyShaderProgram (int shaderID)
virtual void DefineClippingPlanes (const MVector< MQuaternion > &planes)
virtual void RenderTranslucentObject ()
virtual void RenderText (const MercuryText &text)
virtual MercuryGLState SetStates (MercuryGLState states)

Private Member Functions

void BindShader (int shaderID)
void ProcessTexture (MercuryTexture *texture)
int ConvertDrawType (DRAWTYPES drawtype)
virtual void ProcessLightsInternal (const MercuryLight *light[3], unsigned int count)
void CompileShader (unsigned int shaderDesc)
int ConvertStencilOp (STENCILOPS op) const
int ConvertTestFunction (TFUNCT funct) const
void SetUniformVariables (MercuryMaterial *material)
void TestCapabilities ()
void LoadImageData (RawImageData *data, bool isMipmap)

Private Attributes

map< int, MercuryOGLGLSLangObjectm_shaderObjMap
unsigned int m_arrayDrawType
int m_shaderProgramID
int m_NumEnabledLights
GLuint m_pixelFormat
bool active
bool isLockRendering
bool isRenderingToDynamicTexture
map< int, MercuryOGLFBOObjectm_fboMap
bool isRenderingToDynamicCubeMap
map< int, MercuryOGLFBOCubeObjectm_fboCubeMap
MercuryTexturem_pCurRenderTex

Detailed Description

Open GL Display Driver.

Definition at line 42 of file MercuryOGL.h.


Constructor & Destructor Documentation

MercuryOGL::MercuryOGL (  ) 

Definition at line 17 of file MercuryOGL.cpp.

MercuryOGL::~MercuryOGL (  )  [virtual]

Definition at line 23 of file MercuryOGL.cpp.


Member Function Documentation

bool MercuryOGL::MakeWindow ( const char *  title,
int  width,
int  height,
int  bits,
bool  fullscreenflag 
) [virtual]

Tell the display system to make its window.

Reimplemented from MercuryDisplay.

Definition at line 115 of file MercuryOGL.cpp.

bool MercuryOGL::Init ( const MString name,
unsigned int  width,
unsigned int  height,
unsigned short  bpp,
bool  fullscreen 
) [virtual]

Reimplemented from MercuryDisplay.

Definition at line 27 of file MercuryOGL.cpp.

bool MercuryOGL::BeginFrame (  )  [virtual]

Implements MercuryDisplay.

Definition at line 135 of file MercuryOGL.cpp.

bool MercuryOGL::EndFrame (  )  [virtual]

Implements MercuryDisplay.

Definition at line 141 of file MercuryOGL.cpp.

void MercuryOGL::DrawParticleField ( const MercuryParticleField field  )  [virtual]

Implements MercuryDisplay.

Definition at line 418 of file MercuryOGL.cpp.

void MercuryOGL::DrawMesh ( const MercuryMesh mesh  )  [virtual]

Implements MercuryDisplay.

Definition at line 151 of file MercuryOGL.cpp.

void MercuryOGL::DrawSprite ( const MercuryMesh sprite  )  [virtual]

Implements MercuryDisplay.

Definition at line 1212 of file MercuryOGL.cpp.

void MercuryOGL::GenerateVBO ( MercuryMesh mesh  )  [virtual]

Implements MercuryDisplay.

Definition at line 244 of file MercuryOGL.cpp.

void MercuryOGL::DestroyVBO ( MercuryMesh mesh  )  [virtual]

Implements MercuryDisplay.

Definition at line 285 of file MercuryOGL.cpp.

void MercuryOGL::SetMaterial ( const MercuryMaterial material  )  [virtual]

Set a material to draw with.

Implements MercuryDisplay.

Definition at line 434 of file MercuryOGL.cpp.

void MercuryOGL::RendererInfo (  )  [virtual]

Resize window to a given height/width.

Implements MercuryDisplay.

Definition at line 107 of file MercuryOGL.cpp.

virtual void MercuryOGL::ClearZBuffer (  )  [inline, virtual]

Flush the Zbuffer.

Implements MercuryDisplay.

Definition at line 60 of file MercuryOGL.h.

virtual void MercuryOGL::ClearFrameBuffer (  )  [inline, virtual]

Implements MercuryDisplay.

Definition at line 61 of file MercuryOGL.h.

void MercuryOGL::DeleteTextures ( int  n,
unsigned int *  textureNames 
) [virtual]

Implements MercuryDisplay.

Definition at line 673 of file MercuryOGL.cpp.

virtual void MercuryOGL::UpdateTextureData ( MercuryTexture texture,
unsigned int &  ID 
) [inline, virtual]

Implements MercuryDisplay.

Definition at line 66 of file MercuryOGL.h.

void MercuryOGL::CreateCache ( RawImageData data,
unsigned int &  ID 
) [virtual]

Implements MercuryDisplay.

Definition at line 709 of file MercuryOGL.cpp.

void MercuryOGL::CreateCache ( RawImageData data,
unsigned int &  ID,
bool  isMipmap 
) [virtual]

Definition at line 714 of file MercuryOGL.cpp.

virtual void MercuryOGL::Viewport ( int  x,
int  y,
int  width,
int  height 
) [inline, virtual]

Reimplemented from MercuryDisplay.

Definition at line 70 of file MercuryOGL.h.

void MercuryOGL::EnableTextures ( MercuryMaterial material  )  [virtual]

Implements MercuryDisplay.

Definition at line 524 of file MercuryOGL.cpp.

void MercuryOGL::EnableShaders ( MercuryMaterial material  )  [virtual]

Implements MercuryDisplay.

Definition at line 509 of file MercuryOGL.cpp.

void MercuryOGL::ErrorCheck (  )  [virtual]

Implements MercuryDisplay.

Definition at line 952 of file MercuryOGL.cpp.

void MercuryOGL::ReadFrameBuffer ( RawImageData image  )  [virtual]

Implements MercuryDisplay.

Definition at line 960 of file MercuryOGL.cpp.

void MercuryOGL::SendMatrixData ( const MercuryMatrix m  )  [virtual]

Implements MercuryDisplay.

Definition at line 971 of file MercuryOGL.cpp.

void MercuryOGL::SendProjectionMatrixData (  )  [virtual]

Implements MercuryDisplay.

Definition at line 982 of file MercuryOGL.cpp.

void MercuryOGL::StencilOp ( STENCILOPS  fail,
STENCILOPS  zfail,
STENCILOPS  zpass 
) [virtual]

Implements MercuryDisplay.

Definition at line 1011 of file MercuryOGL.cpp.

void MercuryOGL::CullBackface ( bool  toggle  )  [virtual]

Implements MercuryDisplay.

Definition at line 1038 of file MercuryOGL.cpp.

void MercuryOGL::StencilFunc ( TFUNCT  func,
int  ref,
unsigned int  zref 
) [virtual]

Implements MercuryDisplay.

Definition at line 1046 of file MercuryOGL.cpp.

int MercuryOGL::CompileShader ( MString  vertStr,
MString  fragStr 
) [virtual]

Reimplemented from MercuryDisplay.

Definition at line 313 of file MercuryOGL.cpp.

void MercuryOGL::DestroyShaderProgram ( int  shaderID  )  [virtual]

Reimplemented from MercuryDisplay.

Definition at line 380 of file MercuryOGL.cpp.

void MercuryOGL::DefineClippingPlanes ( const MVector< MQuaternion > &  planes  )  [virtual]

Implements MercuryDisplay.

Definition at line 1075 of file MercuryOGL.cpp.

void MercuryOGL::RenderTranslucentObject (  )  [virtual]

Implements MercuryDisplay.

Definition at line 1114 of file MercuryOGL.cpp.

void MercuryOGL::RenderText ( const MercuryText text  )  [virtual]

Implements MercuryDisplay.

Definition at line 1148 of file MercuryOGL.cpp.

MercuryGLState MercuryOGL::SetStates ( MercuryGLState  states  )  [virtual]

Reimplemented from MercuryDisplay.

Definition at line 1234 of file MercuryOGL.cpp.

void MercuryOGL::BindShader ( int  shaderID  )  [private]

Definition at line 1324 of file MercuryOGL.cpp.

void MercuryOGL::ProcessTexture ( MercuryTexture texture  )  [private]

Definition at line 588 of file MercuryOGL.cpp.

int MercuryOGL::ConvertDrawType ( DRAWTYPES  drawtype  )  [private]

Definition at line 994 of file MercuryOGL.cpp.

void MercuryOGL::ProcessLightsInternal ( const MercuryLight light[3],
unsigned int  count 
) [private, virtual]

Implements MercuryDisplay.

Definition at line 869 of file MercuryOGL.cpp.

void MercuryOGL::CompileShader ( unsigned int  shaderDesc  )  [private]

Definition at line 399 of file MercuryOGL.cpp.

int MercuryOGL::ConvertStencilOp ( STENCILOPS  op  )  const [private]

Definition at line 1018 of file MercuryOGL.cpp.

int MercuryOGL::ConvertTestFunction ( TFUNCT  funct  )  const [private]

Definition at line 1051 of file MercuryOGL.cpp.

void MercuryOGL::SetUniformVariables ( MercuryMaterial material  )  [private]

Definition at line 454 of file MercuryOGL.cpp.

void MercuryOGL::TestCapabilities (  )  [private]

Definition at line 1129 of file MercuryOGL.cpp.

void MercuryOGL::LoadImageData ( RawImageData data,
bool  isMipmap 
) [private]

Definition at line 723 of file MercuryOGL.cpp.


Member Data Documentation

map<int, MercuryOGLGLSLangObject> MercuryOGL::m_shaderObjMap [private]

Definition at line 109 of file MercuryOGL.h.

unsigned int MercuryOGL::m_arrayDrawType [private]

Definition at line 111 of file MercuryOGL.h.

int MercuryOGL::m_shaderProgramID [private]

Definition at line 112 of file MercuryOGL.h.

int MercuryOGL::m_NumEnabledLights [private]

Definition at line 113 of file MercuryOGL.h.

GLuint MercuryOGL::m_pixelFormat [private]

Definition at line 114 of file MercuryOGL.h.

bool MercuryOGL::active [private]

Definition at line 115 of file MercuryOGL.h.

bool MercuryOGL::isLockRendering [private]

Definition at line 117 of file MercuryOGL.h.

bool MercuryOGL::isRenderingToDynamicTexture [private]

Definition at line 119 of file MercuryOGL.h.

map<int, MercuryOGLFBOObject> MercuryOGL::m_fboMap [private]

Definition at line 120 of file MercuryOGL.h.

bool MercuryOGL::isRenderingToDynamicCubeMap [private]

Definition at line 122 of file MercuryOGL.h.

map<int, MercuryOGLFBOCubeObject> MercuryOGL::m_fboCubeMap [private]

Definition at line 123 of file MercuryOGL.h.

MercuryTexture* MercuryOGL::m_pCurRenderTex [private]

Definition at line 125 of file MercuryOGL.h.


The documentation for this class was generated from the following files:
Hosted by SourceForge.net Logo