Main Page | Modules | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

CP_StSetAglContext Class Reference
[UI]

A stack based class for setting and restoring an AglContext. More...

Inheritance diagram for CP_StSetAglContext:

CP_NoCopy List of all members.

Public Member Functions

Constructor / Destructor
 CP_StSetAglContext (AGLContext inContext)
 Constructor.
 ~CP_StSetAglContext () throw ()
 Destructor.

Private Attributes

AGLContext fSavedAGLContext

Detailed Description

This class is designed to be used as a stack based class to set and restore an OpenGL AglContext for drawing into.

                void MyOpenGLDrawing()
                {
                    CP_StSetAglContext          savedAGLContext( fAGLContext );
                
                        Draw the OpenGL content here
                                    
                    glFlush();
                }

In the above example, the current context will be set to fAGLContext, and when the routine ends, the AglContext will be restored to what ever it was when the above function was entered.


Constructor & Destructor Documentation

CP_StSetAglContext::CP_StSetAglContext AGLContext  inContext  ) 
 

Constructor.

Parameters:
inContext AGLContext to set as the current context.
Exceptions:
none 

CP_StSetAglContext::~CP_StSetAglContext  )  throw ()
 

Destructor.

Exceptions:
none 


Member Data Documentation

AGLContext CP_StSetAglContext::fSavedAGLContext [private]
 


The documentation for this class was generated from the following files:
Generated on Sat Sep 17 20:02:17 2005 for CPLAT by  doxygen 1.4.0