Cafu Engine
SingleOpenGLWindowT Class Referenceabstract
Inheritance diagram for SingleOpenGLWindowT:

Public Member Functions

virtual ~SingleOpenGLWindowT ()
 Virtual destructor, so that deleting this class through derived-class pointers works right. More...
 
virtual const char * Open (const std::string &Title_, unsigned int Width_, unsigned int Height_, char BPP_, bool FullScreen_)=0
 This functions opens a new OpenGL window. More...
 
virtual bool HandleWindowMessages ()=0
 Retrieves the messages of the window message queue, and deals with them. More...
 
virtual void PostQuitMessage ()=0
 Indicates that HandleWindowMessages() should return true anytime soon. More...
 
virtual unsigned int GetSystemFontDisplayList (int FontHeight, const char *FontName)=0
 Returns the first of 256 OpenGL display list handles of an ASCII font character set. More...
 
virtual void SwapBuffers ()=0
 Swaps the front- and back-buffers. More...
 
virtual uint32_t * GetFrameBuffer (unsigned int &Width_, unsigned int &Height_)=0
 Returns a pointer to a copy of the current (back-)frame-buffer, and the width and height of the buffer. More...
 
virtual void Close ()=0
 Well, this closes and destroys the window. More...
 
virtual int GetNextKeyboardEvent (CaKeyboardEventT &KeyboardEvent)=0
 This function retrieves the next keyboard event, and stores it in 'KeyboardEvent'. More...
 
virtual int GetNextMouseEvent (CaMouseEventT &MouseEvent)=0
 This function retrieves the next mouse event, and stores it in 'MouseEvent'. More...
 
virtual const std::string & GetTitle ()=0
 
virtual unsigned int GetWidth ()=0
 
virtual unsigned int GetHeight ()=0
 
virtual char GetBPP ()=0
 
virtual bool GetFullScreen ()=0
 
virtual bool GetIsMinimized ()=0
 Ist das Fenster in der Taskbar (minimiert)? More...
 
virtual bool * GetKeyboardState ()=0
 < The function 'GetNextKeyboardEvent()' stores all keyboard events in this array. More...
 
virtual char GetMouseButtonState ()=0
 

Constructor & Destructor Documentation

virtual SingleOpenGLWindowT::~SingleOpenGLWindowT ( )
inlinevirtual

Virtual destructor, so that deleting this class through derived-class pointers works right.

Member Function Documentation

virtual void SingleOpenGLWindowT::Close ( )
pure virtual

Well, this closes and destroys the window.

Implemented in SingleOpenGLWindowImplT.

virtual uint32_t* SingleOpenGLWindowT::GetFrameBuffer ( unsigned int &  Width_,
unsigned int &  Height_ 
)
pure virtual

Returns a pointer to a copy of the current (back-)frame-buffer, and the width and height of the buffer.

The returned pointer memory is statically allocated and the caller must not free it.

Implemented in SingleOpenGLWindowImplT.

virtual bool SingleOpenGLWindowT::GetIsMinimized ( )
pure virtual

Ist das Fenster in der Taskbar (minimiert)?

Implemented in SingleOpenGLWindowImplT.

virtual bool* SingleOpenGLWindowT::GetKeyboardState ( )
pure virtual

< The function 'GetNextKeyboardEvent()' stores all keyboard events in this array.

It can therefore be used to obtain the current state of the keyboard. Note that the state is current only after 'GetNextKeyboardEvent()' has been called until 0 was returned (i.e. the event queue is empty). The only purpuse of this array is to relieve the application from the book-keeping. The function 'GetNextMouseEvent()' stores all mouse button events in this 'char'. It can therefore be used to obtain the current state of the mouse buttons. Mouse button 'i' is pressed iff bit 'i' is set, and released otherwise. Note that the state is current only after 'GetNextMouseEvent()' has been called until 0 was returned (i.e. the event queue is empty). The only purpuse of this 'char' is to relieve the application from the book-keeping.

Implemented in SingleOpenGLWindowImplT.

virtual int SingleOpenGLWindowT::GetNextKeyboardEvent ( CaKeyboardEventT KeyboardEvent)
pure virtual

This function retrieves the next keyboard event, and stores it in 'KeyboardEvent'.

Return values: -1 - An error occured, no events read. 'KeyboardEvent' is not touched. 0 - The event queue is empty, no events read. 'KeyboardEvent' is not touched. 1 - One event successfully read and stored in 'KeyboardEvent'. 2 - Same as 1, but events were lost due to buffer overflow.

Implemented in SingleOpenGLWindowImplT.

virtual int SingleOpenGLWindowT::GetNextMouseEvent ( CaMouseEventT MouseEvent)
pure virtual

This function retrieves the next mouse event, and stores it in 'MouseEvent'.

Return values: -1 - An error occured, no events read. 'MouseEvent' is not touched. 0 - The event queue is empty, no events read. 'MouseEvent' is not touched. 1 - One event successfully read and stored in 'MouseEvent'. 2 - Same as 1, but events were lost due to buffer overflow.

Implemented in SingleOpenGLWindowImplT.

virtual unsigned int SingleOpenGLWindowT::GetSystemFontDisplayList ( int  FontHeight,
const char *  FontName 
)
pure virtual

Returns the first of 256 OpenGL display list handles of an ASCII font character set.

Implemented in SingleOpenGLWindowImplT.

virtual bool SingleOpenGLWindowT::HandleWindowMessages ( )
pure virtual

Retrieves the messages of the window message queue, and deals with them.

Returns 'true' on receipt of a program quit message, 'false' otherwise.

Implemented in SingleOpenGLWindowImplT.

virtual const char* SingleOpenGLWindowT::Open ( const std::string &  Title_,
unsigned int  Width_,
unsigned int  Height_,
char  BPP_,
bool  FullScreen_ 
)
pure virtual

This functions opens a new OpenGL window.

Only one window can be open at one time. Returns 'NULL' on success, or a string with the reason for the failure. The global variables are initialized on success, and undefined otherwise. Notes: a) An 8 BPP stencil buffer is always requested. b) The far clip plane is always located at infinity, in order to facilitate stencil shadows (and arbitrary large levels :-).

Implemented in SingleOpenGLWindowImplT.

virtual void SingleOpenGLWindowT::PostQuitMessage ( )
pure virtual

Indicates that HandleWindowMessages() should return true anytime soon.

Implemented in SingleOpenGLWindowImplT.

virtual void SingleOpenGLWindowT::SwapBuffers ( )
pure virtual

Swaps the front- and back-buffers.

Implemented in SingleOpenGLWindowImplT.


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