Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

kerosin::OpenGLServer Class Reference

#include <openglserver.h>

Inheritance diagram for kerosin::OpenGLServer:

Inheritance graph
[legend]
Collaboration diagram for kerosin::OpenGLServer:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 OpenGLServer ()
 ~OpenGLServer ()
boost::shared_ptr< GLExtensionReg > GetExtensionReg () const
void Quit ()
 if this is called, the application will 'want to quit'
bool WantsToQuit () const
 true if somebody called 'Quit'
void Update ()
 pump SDL event loop
void SwapBuffers () const
 swap opengl buffer
unsigned int LoadARBProgram (GLenum target, const char *fileName)
 vertex and fragment program loading
unsigned int LoadARBVertexProgram (const char *fileName)
 vertex and fragment program loading
unsigned int LoadARBFragmentProgram (const char *fileName)
 vertex and fragment program loading
bool SupportsFancyLighting () const
void ToggleFancyLighting ()
int AllocLight ()
 returns the next availble GL light constant or -1 if no more lights are available
void PutLight (int l)
 marks the GL light constant as available

Protected Types

typedef std::set< int > TLightSet
 set of OpenGL light constants

Protected Member Functions

virtual bool ConstructInternal ()
 set up opengl viewport

Protected Attributes

boost::shared_ptr< GLExtensionReg > mExtensionReg
 this contains information on all available extensions
bool mWantsToQuit
 a flag, which can be used to control the shutdown of the display window and the application
boost::shared_ptr< MapHoldermHolder
 cache of loaded vertex and fragment programs (assumes that path names to the programs are unique)
bool mSupportsFancyLighting
 flag whether the OpenGL-driver can do fancy lighting or not
TLightSet mAvailableLights
 the set of available OpenGL light constants

Detailed Description

Definition at line 42 of file openglserver.h.


Member Typedef Documentation

typedef std::set<int> kerosin::OpenGLServer::TLightSet [protected]
 

set of OpenGL light constants

Definition at line 56 of file openglserver.h.


Constructor & Destructor Documentation

OpenGLServer::OpenGLServer  ) 
 

Definition at line 50 of file openglserver.cpp.

OpenGLServer::~OpenGLServer  ) 
 

Definition at line 55 of file openglserver.cpp.


Member Function Documentation

int OpenGLServer::AllocLight  ) 
 

returns the next availble GL light constant or -1 if no more lights are available

Definition at line 316 of file openglserver.cpp.

References mAvailableLights.

bool OpenGLServer::ConstructInternal  )  [protected, virtual]
 

set up opengl viewport

Set up the OpenGL viewport, initialize extension registry

Reimplemented from zeitgeist::Object.

Definition at line 178 of file openglserver.cpp.

References zeitgeist::Object::GetLog(), zeitgeist::Object::GetScript(), mAvailableLights, mExtensionReg, and mSupportsFancyLighting.

Here is the call graph for this function:

boost::shared_ptr< GLExtensionReg > OpenGLServer::GetExtensionReg  )  const
 

Definition at line 60 of file openglserver.cpp.

References mExtensionReg.

unsigned int OpenGLServer::LoadARBFragmentProgram const char *  fileName  ) 
 

vertex and fragment program loading

Definition at line 163 of file openglserver.cpp.

unsigned int OpenGLServer::LoadARBProgram GLenum  target,
const char *  fileName
 

vertex and fragment program loading

Definition at line 91 of file openglserver.cpp.

References zeitgeist::Object::GetCore(), mExtensionReg, mHolder, salt::RFile::Read(), and salt::RFile::Size().

Referenced by LoadARBVertexProgram().

Here is the call graph for this function:

unsigned int OpenGLServer::LoadARBVertexProgram const char *  fileName  ) 
 

vertex and fragment program loading

Definition at line 152 of file openglserver.cpp.

References LoadARBProgram(), and mExtensionReg.

Here is the call graph for this function:

void OpenGLServer::PutLight int  l  ) 
 

marks the GL light constant as available

Definition at line 331 of file openglserver.cpp.

References mAvailableLights.

void OpenGLServer::Quit  ) 
 

if this is called, the application will 'want to quit'

Definition at line 65 of file openglserver.cpp.

References mWantsToQuit.

bool kerosin::OpenGLServer::SupportsFancyLighting  )  const [inline]
 

Definition at line 87 of file openglserver.h.

void OpenGLServer::SwapBuffers  )  const
 

swap opengl buffer

Definition at line 86 of file openglserver.cpp.

void OpenGLServer::ToggleFancyLighting  ) 
 

Definition at line 307 of file openglserver.cpp.

References mSupportsFancyLighting.

void OpenGLServer::Update  ) 
 

pump SDL event loop

Definition at line 75 of file openglserver.cpp.

bool OpenGLServer::WantsToQuit  )  const
 

true if somebody called 'Quit'

Definition at line 70 of file openglserver.cpp.

References mWantsToQuit.


Member Data Documentation

TLightSet kerosin::OpenGLServer::mAvailableLights [protected]
 

the set of available OpenGL light constants

Definition at line 119 of file openglserver.h.

Referenced by AllocLight(), ConstructInternal(), and PutLight().

boost::shared_ptr<GLExtensionReg> kerosin::OpenGLServer::mExtensionReg [protected]
 

this contains information on all available extensions

Definition at line 107 of file openglserver.h.

Referenced by ConstructInternal(), GetExtensionReg(), LoadARBProgram(), and LoadARBVertexProgram().

boost::shared_ptr< MapHolder > kerosin::OpenGLServer::mHolder [protected]
 

cache of loaded vertex and fragment programs (assumes that path names to the programs are unique)

Definition at line 113 of file openglserver.h.

Referenced by LoadARBProgram().

bool kerosin::OpenGLServer::mSupportsFancyLighting [protected]
 

flag whether the OpenGL-driver can do fancy lighting or not

Definition at line 116 of file openglserver.h.

Referenced by ConstructInternal(), and ToggleFancyLighting().

bool kerosin::OpenGLServer::mWantsToQuit [protected]
 

a flag, which can be used to control the shutdown of the display window and the application

Definition at line 110 of file openglserver.h.

Referenced by Quit(), and WantsToQuit().


The documentation for this class was generated from the following files:
Generated on Thu Apr 6 15:43:16 2006 for rcssserver3d by  doxygen 1.4.4