#include <MercuryDisplay.h>
Inheritance diagram for MercuryDisplay:


Public Member Functions | |
| MercuryDisplay () | |
| virtual | ~MercuryDisplay () |
| void | CreateThread () |
| void | ThreadLoop () |
| DisplayDimensions | GetDimensions () const |
| DisplayDimensions | GetBasedDimensions () const |
| void | Resize (int width, int height) |
| void | LookAt (const MercuryPoint &eye, const MercuryPoint ¢er, const MercuryPoint &up) |
| void | LookAt (float eyeX, float eyeY, float eyeZ, float centerX, float centerY, float centerZ, float upX, float upY, float upZ) |
| void | LookAt (const MQuaternion &q, const MercuryPoint &eye) |
| void | AddLight (MercuryLight *light) |
| void | RemoveLight (MercuryLight *light) |
| void | TakeScreenShot () |
| MercuryPoint | GetLastCameraPosition () |
| Retrieve the last location of the camera. | |
| void | CloseNextCycle () |
| MercuryWindow * | GetWindow () |
| bool | Update (const float dTime) |
| Standard type of thing you're used to seeing for updating. | |
| const MercuryMatrix & | GetProjection () const |
| virtual bool | MakeWindow (const char *title, int width, int height, int bits, bool fullscreenflag) |
| Tell the display system to make its window. | |
| virtual bool | BeginFrame ()=0 |
| virtual bool | EndFrame ()=0 |
| virtual bool | AttachWindow (MercuryWindow *window) |
| virtual bool | Init (const MString &name, unsigned int width, unsigned int height, unsigned short bpp, bool fullscreen) |
| virtual void | RendererInfo ()=0 |
| Resize window to a given height/width. | |
| virtual void | DrawParticleField (const MercuryParticleField *field)=0 |
| virtual void | DrawMesh (const MercuryMesh &mesh)=0 |
| virtual void | RenderText (const MercuryText &text)=0 |
| virtual void | DrawSprite (const MercuryMesh &sprite)=0 |
| virtual void | GenerateVBO (MercuryMesh &mesh)=0 |
| virtual void | DestroyVBO (MercuryMesh &mesh)=0 |
| virtual void | SetMaterial (const MercuryMaterial *material)=0 |
| Set a material to draw with. | |
| void | ToggleUseMaterialColors (bool toggle) |
| virtual void | ClearZBuffer ()=0 |
| Flush the Zbuffer. | |
| virtual void | ClearFrameBuffer ()=0 |
| virtual void | DeleteTextures (int n, unsigned int *textureNames)=0 |
| virtual void | UpdateTextureData (MercuryTexture *texture, unsigned int &ID)=0 |
| virtual void | CreateCache (RawImageData *data, unsigned int &ID)=0 |
| bool | IsUseLighting () |
| virtual void | Viewport (int x, int y, int width, int height) |
| virtual void | SetProjection (const Projection &projection) |
| virtual void | SetView (const MercuryPoint &position, const MercuryMatrix &m, const LookAtInternals &lai) |
| MercuryMatrix & | GetView () |
| virtual void | EnableTextures (MercuryMaterial *material)=0 |
| virtual void | EnableShaders (MercuryMaterial *material)=0 |
| virtual void | ReadFrameBuffer (RawImageData &image)=0 |
| virtual void | ErrorCheck ()=0 |
| virtual void | SendMatrixData (const MercuryMatrix &m)=0 |
| virtual void | SendProjectionMatrixData ()=0 |
| virtual void | StencilOp (STENCILOPS fail, STENCILOPS zfail, STENCILOPS zpass)=0 |
| virtual void | CullBackface (bool toggle=true)=0 |
| virtual void | StencilFunc (TFUNCT func, int ref, unsigned int zref)=0 |
| void | Ortho (float left, float right, float bottom, float top, float zNear, float zFar) |
| void | Perspective (float fovy, float aspect, float znear, float zfar) |
| virtual int | CompileShader (MString vertStr, MString fragStr) |
| virtual void | DestroyShaderProgram (int shaderID) |
| bool | IsVisible (const MercuryPoint &pCenter, float fRadius, const MercuryMatrix &world) |
| virtual void | DefineClippingPlanes (const MVector< MQuaternion > &planes)=0 |
| void | ResetFrustumClippingPlanes () |
| void | AddTranslucentObject (MercuryObject *obj) |
| virtual void | RenderTranslucentObject ()=0 |
| const Capabilities & | GetCapabilities () const |
| void | FindLights (const MercuryMatrix &world, float radius) |
| virtual MercuryGLState | SetStates (MercuryGLState states) |
| void | EnableGLState (unsigned long mask) |
| void | DisableGLState (unsigned long mask) |
| void | PushGLState () |
| void | PopGLState () |
| const MercuryGLState & | GetGlobalState () const |
| void | EnqueueObject (const RenderPacket &rp) |
Static Public Member Functions | |
| static void * | ThreadCallback (void *display) |
Protected Member Functions | |
| int | Next3Lights (const MercuryLight *light[3], unsigned int &count) |
| void | SetupClippingPlanes (const MercuryPoint &position, MercuryPoint F, MercuryPoint u, MercuryPoint s) |
Protected Attributes | |
| const MercuryLight * | m_usedLights [3] |
| MVector< MercuryLight * > | m_foundLights |
| unsigned int | m_based_width |
| unsigned int | m_based_height |
| MercuryTimer | m_timer |
| unsigned int | m_framesDrawn |
| MercuryWindow * | m_window |
| unsigned int | m_verticesDrawn |
| bool | m_bLastHadFocus |
| bool | m_bCloseNextCycle |
| MercuryPoint | m_pLastCameraPos |
| bool | m_disableTextures |
| bool | m_useMaterialColors |
| MVector< MercuryLight * > | m_lights |
| MercuryPoint | m_nViewPlanes [6] |
| MercuryPoint | m_pNearPoint |
| MercuryPoint | m_pFarPoint |
| int | m_maxTextures |
| int | m_maxLights |
| int | m_maxDrawBuffers |
| int | m_maxVertexAttributes |
| int | m_maxTextureCoordinates |
| int | m_maxShaderVertUniformComponents |
| int | m_maxShaderFragUniformComponents |
| int | m_shaderLanngVersion |
| int | m_maxAnisotropy |
| MDeque< TranslucentPair > | m_translucentObjects |
| Capabilities | m_capabilities |
| int | m_VPx |
| int | m_VPy |
| int | m_VPwidth |
| int | m_VPheight |
| MercuryGLState | m_currentState |
| Projection | m_projection |
| MercuryMatrix | m_view |
Private Member Functions | |
| virtual void | ProcessLightsInternal (const MercuryLight *light[3], unsigned int count)=0 |
Private Attributes | |
| MercuryThread | m_thread |
| bool | m_initalized |
| MDeque< MercuryGLState > | m_globalState |
| MCQueue< RenderPacket > | m_renderObjects |
Classes | |
| struct | PickedLightInfo |
| struct | ProjectionTypeMatrix |
| struct | TranslucentPair |
Definition at line 85 of file MercuryDisplay.h.
| MercuryDisplay::MercuryDisplay | ( | ) |
| MercuryDisplay::~MercuryDisplay | ( | ) | [virtual] |
Definition at line 81 of file MercuryDisplay.cpp.
| void * MercuryDisplay::ThreadCallback | ( | void * | display | ) | [static] |
Definition at line 87 of file MercuryDisplay.cpp.
| void MercuryDisplay::CreateThread | ( | ) |
Definition at line 93 of file MercuryDisplay.cpp.
| void MercuryDisplay::ThreadLoop | ( | ) |
Definition at line 100 of file MercuryDisplay.cpp.
| DisplayDimensions MercuryDisplay::GetDimensions | ( | ) | const |
Definition at line 234 of file MercuryDisplay.cpp.
| DisplayDimensions MercuryDisplay::GetBasedDimensions | ( | ) | const |
Definition at line 242 of file MercuryDisplay.cpp.
| void MercuryDisplay::Resize | ( | int | width, | |
| int | height | |||
| ) |
| void MercuryDisplay::LookAt | ( | const MercuryPoint & | eye, | |
| const MercuryPoint & | center, | |||
| const MercuryPoint & | up | |||
| ) |
Definition at line 264 of file MercuryDisplay.cpp.
| void MercuryDisplay::LookAt | ( | float | eyeX, | |
| float | eyeY, | |||
| float | eyeZ, | |||
| float | centerX, | |||
| float | centerY, | |||
| float | centerZ, | |||
| float | upX, | |||
| float | upY, | |||
| float | upZ | |||
| ) |
Definition at line 250 of file MercuryDisplay.cpp.
| void MercuryDisplay::LookAt | ( | const MQuaternion & | q, | |
| const MercuryPoint & | eye | |||
| ) |
Definition at line 342 of file MercuryDisplay.cpp.
| void MercuryDisplay::AddLight | ( | MercuryLight * | light | ) |
Definition at line 383 of file MercuryDisplay.cpp.
| void MercuryDisplay::RemoveLight | ( | MercuryLight * | light | ) |
Definition at line 389 of file MercuryDisplay.cpp.
| void MercuryDisplay::TakeScreenShot | ( | ) |
Definition at line 399 of file MercuryDisplay.cpp.
| MercuryPoint MercuryDisplay::GetLastCameraPosition | ( | ) |
| void MercuryDisplay::CloseNextCycle | ( | ) | [inline] |
Definition at line 109 of file MercuryDisplay.h.
| MercuryWindow* MercuryDisplay::GetWindow | ( | ) | [inline] |
Definition at line 111 of file MercuryDisplay.h.
| bool MercuryDisplay::Update | ( | const float | dTime | ) |
Standard type of thing you're used to seeing for updating.
Definition at line 155 of file MercuryDisplay.cpp.
| const MercuryMatrix& MercuryDisplay::GetProjection | ( | ) | const [inline] |
Definition at line 116 of file MercuryDisplay.h.
| bool MercuryDisplay::MakeWindow | ( | const char * | title, | |
| int | width, | |||
| int | height, | |||
| int | bits, | |||
| bool | fullscreenflag | |||
| ) | [virtual] |
Tell the display system to make its window.
Reimplemented in MercuryDisplaySoftwareC, and MercuryOGL.
Definition at line 226 of file MercuryDisplay.cpp.
| virtual bool MercuryDisplay::BeginFrame | ( | ) | [pure virtual] |
Implemented in MercuryDisplaySoftwareC, and MercuryOGL.
| virtual bool MercuryDisplay::EndFrame | ( | ) | [pure virtual] |
Implemented in MercuryDisplaySoftwareC, and MercuryOGL.
| bool MercuryDisplay::AttachWindow | ( | MercuryWindow * | window | ) | [virtual] |
Definition at line 218 of file MercuryDisplay.cpp.
| bool MercuryDisplay::Init | ( | const MString & | name, | |
| unsigned int | width, | |||
| unsigned int | height, | |||
| unsigned short | bpp, | |||
| bool | fullscreen | |||
| ) | [virtual] |
| virtual void MercuryDisplay::RendererInfo | ( | ) | [pure virtual] |
| virtual void MercuryDisplay::DrawParticleField | ( | const MercuryParticleField * | field | ) | [pure virtual] |
Implemented in MercuryDisplaySoftwareC, and MercuryOGL.
| virtual void MercuryDisplay::DrawMesh | ( | const MercuryMesh & | mesh | ) | [pure virtual] |
Implemented in MercuryDisplaySoftwareC, and MercuryOGL.
| virtual void MercuryDisplay::RenderText | ( | const MercuryText & | text | ) | [pure virtual] |
Implemented in MercuryDisplaySoftwareC, and MercuryOGL.
| virtual void MercuryDisplay::DrawSprite | ( | const MercuryMesh & | sprite | ) | [pure virtual] |
Implemented in MercuryDisplaySoftwareC, and MercuryOGL.
| virtual void MercuryDisplay::GenerateVBO | ( | MercuryMesh & | mesh | ) | [pure virtual] |
Implemented in MercuryDisplaySoftwareC, and MercuryOGL.
| virtual void MercuryDisplay::DestroyVBO | ( | MercuryMesh & | mesh | ) | [pure virtual] |
Implemented in MercuryDisplaySoftwareC, and MercuryOGL.
| virtual void MercuryDisplay::SetMaterial | ( | const MercuryMaterial * | material | ) | [pure virtual] |
| void MercuryDisplay::ToggleUseMaterialColors | ( | bool | toggle | ) | [inline] |
Definition at line 137 of file MercuryDisplay.h.
| virtual void MercuryDisplay::ClearZBuffer | ( | ) | [pure virtual] |
| virtual void MercuryDisplay::ClearFrameBuffer | ( | ) | [pure virtual] |
Implemented in MercuryDisplaySoftwareC, and MercuryOGL.
| virtual void MercuryDisplay::DeleteTextures | ( | int | n, | |
| unsigned int * | textureNames | |||
| ) | [pure virtual] |
Implemented in MercuryDisplaySoftwareC, and MercuryOGL.
| virtual void MercuryDisplay::UpdateTextureData | ( | MercuryTexture * | texture, | |
| unsigned int & | ID | |||
| ) | [pure virtual] |
Implemented in MercuryDisplaySoftwareC, and MercuryOGL.
| virtual void MercuryDisplay::CreateCache | ( | RawImageData * | data, | |
| unsigned int & | ID | |||
| ) | [pure virtual] |
Implemented in MercuryDisplaySoftwareC, and MercuryOGL.
| bool MercuryDisplay::IsUseLighting | ( | ) | [inline] |
Definition at line 149 of file MercuryDisplay.h.
| void MercuryDisplay::Viewport | ( | int | x, | |
| int | y, | |||
| int | width, | |||
| int | height | |||
| ) | [virtual] |
| void MercuryDisplay::SetProjection | ( | const Projection & | projection | ) | [virtual] |
Definition at line 211 of file MercuryDisplay.cpp.
| void MercuryDisplay::SetView | ( | const MercuryPoint & | position, | |
| const MercuryMatrix & | m, | |||
| const LookAtInternals & | lai | |||
| ) | [virtual] |
Definition at line 539 of file MercuryDisplay.cpp.
| MercuryMatrix& MercuryDisplay::GetView | ( | ) | [inline] |
Definition at line 155 of file MercuryDisplay.h.
| virtual void MercuryDisplay::EnableTextures | ( | MercuryMaterial * | material | ) | [pure virtual] |
Implemented in MercuryDisplaySoftwareC, and MercuryOGL.
| virtual void MercuryDisplay::EnableShaders | ( | MercuryMaterial * | material | ) | [pure virtual] |
Implemented in MercuryDisplaySoftwareC, and MercuryOGL.
| virtual void MercuryDisplay::ReadFrameBuffer | ( | RawImageData & | image | ) | [pure virtual] |
Implemented in MercuryDisplaySoftwareC, and MercuryOGL.
| virtual void MercuryDisplay::ErrorCheck | ( | ) | [pure virtual] |
Implemented in MercuryDisplaySoftwareC, and MercuryOGL.
| virtual void MercuryDisplay::SendMatrixData | ( | const MercuryMatrix & | m | ) | [pure virtual] |
Implemented in MercuryDisplaySoftwareC, and MercuryOGL.
| virtual void MercuryDisplay::SendProjectionMatrixData | ( | ) | [pure virtual] |
Implemented in MercuryDisplaySoftwareC, and MercuryOGL.
| virtual void MercuryDisplay::StencilOp | ( | STENCILOPS | fail, | |
| STENCILOPS | zfail, | |||
| STENCILOPS | zpass | |||
| ) | [pure virtual] |
Implemented in MercuryDisplaySoftwareC, and MercuryOGL.
| virtual void MercuryDisplay::CullBackface | ( | bool | toggle = true |
) | [pure virtual] |
Implemented in MercuryDisplaySoftwareC, and MercuryOGL.
| virtual void MercuryDisplay::StencilFunc | ( | TFUNCT | func, | |
| int | ref, | |||
| unsigned int | zref | |||
| ) | [pure virtual] |
Implemented in MercuryDisplaySoftwareC, and MercuryOGL.
| void MercuryDisplay::Ortho | ( | float | left, | |
| float | right, | |||
| float | bottom, | |||
| float | top, | |||
| float | zNear, | |||
| float | zFar | |||
| ) |
| void MercuryDisplay::Perspective | ( | float | fovy, | |
| float | aspect, | |||
| float | znear, | |||
| float | zfar | |||
| ) |
| virtual void MercuryDisplay::DestroyShaderProgram | ( | int | shaderID | ) | [inline, virtual] |
| bool MercuryDisplay::IsVisible | ( | const MercuryPoint & | pCenter, | |
| float | fRadius, | |||
| const MercuryMatrix & | world | |||
| ) |
Definition at line 359 of file MercuryDisplay.cpp.
| virtual void MercuryDisplay::DefineClippingPlanes | ( | const MVector< MQuaternion > & | planes | ) | [pure virtual] |
Implemented in MercuryDisplaySoftwareC, and MercuryOGL.
| void MercuryDisplay::ResetFrustumClippingPlanes | ( | ) |
Definition at line 353 of file MercuryDisplay.cpp.
| void MercuryDisplay::AddTranslucentObject | ( | MercuryObject * | obj | ) |
Definition at line 434 of file MercuryDisplay.cpp.
| virtual void MercuryDisplay::RenderTranslucentObject | ( | ) | [pure virtual] |
Implemented in MercuryDisplaySoftwareC, and MercuryOGL.
| const Capabilities& MercuryDisplay::GetCapabilities | ( | ) | const [inline] |
Definition at line 184 of file MercuryDisplay.h.
| void MercuryDisplay::FindLights | ( | const MercuryMatrix & | world, | |
| float | radius | |||
| ) |
Definition at line 493 of file MercuryDisplay.cpp.
| MercuryGLState MercuryDisplay::SetStates | ( | MercuryGLState | states | ) | [virtual] |
| void MercuryDisplay::EnableGLState | ( | unsigned long | mask | ) | [inline] |
Definition at line 189 of file MercuryDisplay.h.
| void MercuryDisplay::DisableGLState | ( | unsigned long | mask | ) | [inline] |
Definition at line 190 of file MercuryDisplay.h.
| void MercuryDisplay::PushGLState | ( | ) | [inline] |
Definition at line 191 of file MercuryDisplay.h.
| void MercuryDisplay::PopGLState | ( | ) | [inline] |
Definition at line 192 of file MercuryDisplay.h.
| const MercuryGLState& MercuryDisplay::GetGlobalState | ( | ) | const [inline] |
Definition at line 193 of file MercuryDisplay.h.
| void MercuryDisplay::EnqueueObject | ( | const RenderPacket & | rp | ) |
Definition at line 546 of file MercuryDisplay.cpp.
| int MercuryDisplay::Next3Lights | ( | const MercuryLight * | light[3], | |
| unsigned int & | count | |||
| ) | [protected] |
Definition at line 516 of file MercuryDisplay.cpp.
| void MercuryDisplay::SetupClippingPlanes | ( | const MercuryPoint & | position, | |
| MercuryPoint | F, | |||
| MercuryPoint | u, | |||
| MercuryPoint | s | |||
| ) | [protected] |
Definition at line 303 of file MercuryDisplay.cpp.
| virtual void MercuryDisplay::ProcessLightsInternal | ( | const MercuryLight * | light[3], | |
| unsigned int | count | |||
| ) | [private, pure virtual] |
Implemented in MercuryDisplaySoftwareC, and MercuryOGL.
const MercuryLight* MercuryDisplay::m_usedLights[3] [protected] |
Definition at line 197 of file MercuryDisplay.h.
MVector< MercuryLight* > MercuryDisplay::m_foundLights [protected] |
Definition at line 198 of file MercuryDisplay.h.
unsigned int MercuryDisplay::m_based_width [protected] |
Definition at line 202 of file MercuryDisplay.h.
unsigned int MercuryDisplay::m_based_height [protected] |
Definition at line 203 of file MercuryDisplay.h.
MercuryTimer MercuryDisplay::m_timer [protected] |
Definition at line 205 of file MercuryDisplay.h.
unsigned int MercuryDisplay::m_framesDrawn [protected] |
Definition at line 206 of file MercuryDisplay.h.
MercuryWindow* MercuryDisplay::m_window [protected] |
Definition at line 207 of file MercuryDisplay.h.
unsigned int MercuryDisplay::m_verticesDrawn [protected] |
Definition at line 209 of file MercuryDisplay.h.
bool MercuryDisplay::m_bLastHadFocus [protected] |
Definition at line 211 of file MercuryDisplay.h.
bool MercuryDisplay::m_bCloseNextCycle [protected] |
Definition at line 212 of file MercuryDisplay.h.
MercuryPoint MercuryDisplay::m_pLastCameraPos [protected] |
Definition at line 213 of file MercuryDisplay.h.
bool MercuryDisplay::m_disableTextures [protected] |
Definition at line 215 of file MercuryDisplay.h.
bool MercuryDisplay::m_useMaterialColors [protected] |
Definition at line 216 of file MercuryDisplay.h.
MVector<MercuryLight*> MercuryDisplay::m_lights [protected] |
Definition at line 218 of file MercuryDisplay.h.
MercuryPoint MercuryDisplay::m_nViewPlanes[6] [protected] |
Definition at line 224 of file MercuryDisplay.h.
MercuryPoint MercuryDisplay::m_pNearPoint [protected] |
Definition at line 225 of file MercuryDisplay.h.
MercuryPoint MercuryDisplay::m_pFarPoint [protected] |
Definition at line 226 of file MercuryDisplay.h.
int MercuryDisplay::m_maxTextures [protected] |
Definition at line 228 of file MercuryDisplay.h.
int MercuryDisplay::m_maxLights [protected] |
Definition at line 229 of file MercuryDisplay.h.
int MercuryDisplay::m_maxDrawBuffers [protected] |
Definition at line 230 of file MercuryDisplay.h.
int MercuryDisplay::m_maxVertexAttributes [protected] |
Definition at line 231 of file MercuryDisplay.h.
int MercuryDisplay::m_maxTextureCoordinates [protected] |
Definition at line 232 of file MercuryDisplay.h.
int MercuryDisplay::m_maxShaderVertUniformComponents [protected] |
Definition at line 233 of file MercuryDisplay.h.
int MercuryDisplay::m_maxShaderFragUniformComponents [protected] |
Definition at line 234 of file MercuryDisplay.h.
int MercuryDisplay::m_shaderLanngVersion [protected] |
Definition at line 235 of file MercuryDisplay.h.
int MercuryDisplay::m_maxAnisotropy [protected] |
Definition at line 236 of file MercuryDisplay.h.
MDeque<TranslucentPair> MercuryDisplay::m_translucentObjects [protected] |
Definition at line 245 of file MercuryDisplay.h.
Capabilities MercuryDisplay::m_capabilities [protected] |
Definition at line 247 of file MercuryDisplay.h.
int MercuryDisplay::m_VPx [protected] |
Definition at line 249 of file MercuryDisplay.h.
int MercuryDisplay::m_VPy [protected] |
Definition at line 249 of file MercuryDisplay.h.
int MercuryDisplay::m_VPwidth [protected] |
Definition at line 250 of file MercuryDisplay.h.
int MercuryDisplay::m_VPheight [protected] |
Definition at line 250 of file MercuryDisplay.h.
MercuryGLState MercuryDisplay::m_currentState [protected] |
Definition at line 251 of file MercuryDisplay.h.
Projection MercuryDisplay::m_projection [protected] |
Definition at line 253 of file MercuryDisplay.h.
MercuryMatrix MercuryDisplay::m_view [protected] |
Definition at line 254 of file MercuryDisplay.h.
MercuryThread MercuryDisplay::m_thread [private] |
Definition at line 256 of file MercuryDisplay.h.
bool MercuryDisplay::m_initalized [private] |
Definition at line 257 of file MercuryDisplay.h.
MDeque<MercuryGLState> MercuryDisplay::m_globalState [private] |
Definition at line 273 of file MercuryDisplay.h.
MCQueue< RenderPacket > MercuryDisplay::m_renderObjects [private] |
Definition at line 274 of file MercuryDisplay.h.