Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

Ogre::Win32GLSupport Class Reference

#include <OgreWin32GLSupport.h>

Inheritance diagram for Ogre::Win32GLSupport:

Ogre::GLSupport List of all members.

Public Member Functions

 Win32GLSupport ()
void addConfig ()
 Add any special config values to the system.

void setConfigOption (const String &name, const String &value)
String validateConfig ()
 Make sure all the extra options are valid.

virtual RenderWindowcreateWindow (bool autoCreateWindow, GLRenderSystem *renderSystem, const String &windowTitle="OGRE Render Window")
virtual RenderWindownewWindow (const String &name, unsigned int width, unsigned int height, bool fullScreen, const NameValuePairList *miscParams=0)
 
Remarks:
This method creates a new rendering window as specified by the paramteters. The rendering system could be responible for only a single window (e.g. in the case of a game), or could be in charge of multiple ones (in the case of a level editor). The option to create the window as a child of another is therefore given. This method will create an appropriate subclass of RenderWindow depending on the API and platform implementation.
After creation, this window can be retrieved using getRenderTarget().
Parameters:
name The name of the window. Used in other methods later like setRenderTarget and getRenderWindow.
width The width of the new window.
height The height of the new window.
fullScreen Specify true to make the window full screen without borders, title bar or menu bar.
miscParams A NameValuePairList describing the other parameters for the new rendering window. Options are case sensitive. Unrecognised parameters will be ignored silently. These values might be platform dependent, but these are present for all platorms unless indicated otherwise:
Key: "title" Description: The title of the window that will appear in the title bar Values: string Default: RenderTarget name

Key: "colourDepth" Description: Colour depth of the resulting rendering window; only applies if fullScreen is set. Values: 16 or 32 Default: desktop depth Notes: [W32 specific]

Key: "left" Description: screen x coordinate from left Values: positive integers Default: 'center window on screen' Notes: Ignored in case of full screen

Key: "top" Description: screen y coordinate from top Values: positive integers Default: 'center window on screen' Notes: Ignored in case of full screen

Key: "depthBuffer" [DX9 specific] Description: Use depth buffer Values: false or true Default: true

Key: "externalWindowHandle" [API specific] Description: External window handle, for embedding the OGRE context Values: positive integer for W32 (HWND handle) poslong:posint:poslong (display*:screen:windowHandle) or poslong:posint:poslong:poslong (display*:screen:windowHandle:XVisualInfo*) for GLX Default: 0 (None)

Key: "parentWindowHandle" [API specific] Description: Parent window handle, for embedding the OGRE context Values: positive integer for W32 (HWND handle) poslong:posint:poslong for GLX (display*:screen:windowHandle) Default: 0 (None)

Key: "FSAA" Description: Full screen antialiasing factor Values: 0,2,4,6,... Default: 0

Key: "displayFrequency" Description: Display frequency rate, for fullscreen mode Values: 60...? Default: Desktop vsync rate

Key: "vsync" Description: Synchronize buffer swaps to vsync Values: true, false Default: 0

Key: "border" Description: The type of window border (in windowed mode) Values: none, fixed, resize Default: resize

Key: "outerDimensions" Description: Whether the width/height is expressed as the size of the outer window, rather than the content area Values: true, false Default: false

virtual RenderTexturecreateRenderTexture (const String &name, unsigned int width, unsigned int height, TextureType texType=TEX_TYPE_2D, PixelFormat internalFormat=PF_X8R8G8B8, const NameValuePairList *miscParams=0)
 
Parameters:
name The name for the new render texture. Note that names must be unique.
width The requested width for the render texture. See Remarks for more info.
height The requested width for the render texture. See Remarks for more info.
texType The type of texture; defaults to TEX_TYPE_2D
internalFormat The internal format of the texture; defaults to PF_X8R8G8B8
miscParams A NameValuePairList describing the other parameters for the new rendering window. Unrecognised parameters will be ignored silently. These values might be platform dependent, but these are present for all platorms unless indicated otherwise:
Key: "FSAA" Description: Full screen antialiasing factor Values: 0,2,4,6,... Default: 0

Key: "depth" Description: Depth in case of render-to-texture TEX_3D Values: positive integers

Returns:
On succes, a pointer to a new platform-dependernt, RenderTexture-derived class is returned. On failiure, NULL is returned.
Remarks:
Because a render texture is basically a wrapper around a texture object, the width and height parameters of this method just hint the preferred size for the texture. Depending on the hardware driver or the underlying API, these values might change when the texture is created. The same applies to the internalFormat parameter.


void start ()
 Start anything special.

void stop ()
 Stop anything special.

void * getProcAddress (const String &procname)
 Get the address of a function.

virtual void initialiseExtensions ()
 Initialise extensions.

virtual void initialiseCapabilities (RenderSystemCapabilities &caps)
 Initialise support specific capabilities.

bool selectPixelFormat (HDC hdc, int colourDepth, int multisample=0)
virtual ConfigOptionMapgetConfigOptions (void)
const StringgetGLVendor (void) const
 get vendor information

const StringgetGLVersion (void) const
 get version information

bool checkMinGLVersion (const String &v) const
 compare GL version numbers

virtual bool checkExtension (const String &ext) const
 Check if an extension is available.


Protected Attributes

ConfigOptionMap mOptions
std::set< StringextensionList

Private Member Functions

void refreshConfig ()
void initialiseWGL ()

Static Private Member Functions

LRESULT CALLBACK dummyWndProc (HWND hwnd, UINT umsg, WPARAM wp, LPARAM lp)

Private Attributes

std::vector< DEVMODE > mDevModes
Win32WindowmInitialWindow
std::vector< int > mFSAALevels
bool mHasPixelFormatARB

Constructor & Destructor Documentation

Ogre::Win32GLSupport::Win32GLSupport  ) 
 


Member Function Documentation

void Ogre::Win32GLSupport::addConfig  )  [virtual]
 

Add any special config values to the system.

Must have a "Full Screen" value that is a bool and a "Video Mode" value that is a string in the form of wxhxb

Implements Ogre::GLSupport.

virtual bool Ogre::GLSupport::checkExtension const String ext  )  const [virtual, inherited]
 

Check if an extension is available.

Reimplemented in Ogre::GTKGLSupport.

bool Ogre::GLSupport::checkMinGLVersion const String v  )  const [inherited]
 

compare GL version numbers

Reimplemented in Ogre::GTKGLSupport.

virtual RenderTexture* Ogre::Win32GLSupport::createRenderTexture const String name,
unsigned int  width,
unsigned int  height,
TextureType  texType = TEX_TYPE_2D,
PixelFormat  internalFormat = PF_X8R8G8B8,
const NameValuePairList miscParams = 0
[virtual]
 

Parameters:
name The name for the new render texture. Note that names must be unique.
width The requested width for the render texture. See Remarks for more info.
height The requested width for the render texture. See Remarks for more info.
texType The type of texture; defaults to TEX_TYPE_2D
internalFormat The internal format of the texture; defaults to PF_X8R8G8B8
miscParams A NameValuePairList describing the other parameters for the new rendering window. Unrecognised parameters will be ignored silently. These values might be platform dependent, but these are present for all platorms unless indicated otherwise:
Key: "FSAA" Description: Full screen antialiasing factor Values: 0,2,4,6,... Default: 0

Key: "depth" Description: Depth in case of render-to-texture TEX_3D Values: positive integers

Returns:
On succes, a pointer to a new platform-dependernt, RenderTexture-derived class is returned. On failiure, NULL is returned.
Remarks:
Because a render texture is basically a wrapper around a texture object, the width and height parameters of this method just hint the preferred size for the texture. Depending on the hardware driver or the underlying API, these values might change when the texture is created. The same applies to the internalFormat parameter.

Reimplemented from Ogre::GLSupport.

virtual RenderWindow* Ogre::Win32GLSupport::createWindow bool  autoCreateWindow,
GLRenderSystem renderSystem,
const String windowTitle = "OGRE Render Window"
[virtual]
 

Implements Ogre::GLSupport.

LRESULT CALLBACK Ogre::Win32GLSupport::dummyWndProc HWND  hwnd,
UINT  umsg,
WPARAM  wp,
LPARAM  lp
[static, private]
 

virtual ConfigOptionMap& Ogre::GLSupport::getConfigOptions void   )  [virtual, inherited]
 

const String& Ogre::GLSupport::getGLVendor void   )  const [inherited]
 

get vendor information

Definition at line 59 of file OgreGLSupport.h.

References Ogre::GLSupport::mVendor, and Ogre::String.

const String& Ogre::GLSupport::getGLVersion void   )  const [inherited]
 

get version information

Definition at line 67 of file OgreGLSupport.h.

References Ogre::String.

void* Ogre::Win32GLSupport::getProcAddress const String procname  )  [virtual]
 

Get the address of a function.

Implements Ogre::GLSupport.

virtual void Ogre::Win32GLSupport::initialiseCapabilities RenderSystemCapabilities caps  )  [virtual]
 

Initialise support specific capabilities.

Reimplemented from Ogre::GLSupport.

virtual void Ogre::Win32GLSupport::initialiseExtensions  )  [virtual]
 

Initialise extensions.

Reimplemented from Ogre::GLSupport.

void Ogre::Win32GLSupport::initialiseWGL  )  [private]
 

virtual RenderWindow* Ogre::Win32GLSupport::newWindow const String name,
unsigned int  width,
unsigned int  height,
bool  fullScreen,
const NameValuePairList miscParams = 0
[virtual]
 

Remarks:
This method creates a new rendering window as specified by the paramteters. The rendering system could be responible for only a single window (e.g. in the case of a game), or could be in charge of multiple ones (in the case of a level editor). The option to create the window as a child of another is therefore given. This method will create an appropriate subclass of RenderWindow depending on the API and platform implementation.
After creation, this window can be retrieved using getRenderTarget().
Parameters:
name The name of the window. Used in other methods later like setRenderTarget and getRenderWindow.
width The width of the new window.
height The height of the new window.
fullScreen Specify true to make the window full screen without borders, title bar or menu bar.
miscParams A NameValuePairList describing the other parameters for the new rendering window. Options are case sensitive. Unrecognised parameters will be ignored silently. These values might be platform dependent, but these are present for all platorms unless indicated otherwise:
Key: "title" Description: The title of the window that will appear in the title bar Values: string Default: RenderTarget name

Key: "colourDepth" Description: Colour depth of the resulting rendering window; only applies if fullScreen is set. Values: 16 or 32 Default: desktop depth Notes: [W32 specific]

Key: "left" Description: screen x coordinate from left Values: positive integers Default: 'center window on screen' Notes: Ignored in case of full screen

Key: "top" Description: screen y coordinate from top Values: positive integers Default: 'center window on screen' Notes: Ignored in case of full screen

Key: "depthBuffer" [DX9 specific] Description: Use depth buffer Values: false or true Default: true

Key: "externalWindowHandle" [API specific] Description: External window handle, for embedding the OGRE context Values: positive integer for W32 (HWND handle) poslong:posint:poslong (display*:screen:windowHandle) or poslong:posint:poslong:poslong (display*:screen:windowHandle:XVisualInfo*) for GLX Default: 0 (None)

Key: "parentWindowHandle" [API specific] Description: Parent window handle, for embedding the OGRE context Values: positive integer for W32 (HWND handle) poslong:posint:poslong for GLX (display*:screen:windowHandle) Default: 0 (None)

Key: "FSAA" Description: Full screen antialiasing factor Values: 0,2,4,6,... Default: 0

Key: "displayFrequency" Description: Display frequency rate, for fullscreen mode Values: 60...? Default: Desktop vsync rate

Key: "vsync" Description: Synchronize buffer swaps to vsync Values: true, false Default: 0

Key: "border" Description: The type of window border (in windowed mode) Values: none, fixed, resize Default: resize

Key: "outerDimensions" Description: Whether the width/height is expressed as the size of the outer window, rather than the content area Values: true, false Default: false

Implements Ogre::GLSupport.

void Ogre::Win32GLSupport::refreshConfig  )  [private]
 

bool Ogre::Win32GLSupport::selectPixelFormat HDC  hdc,
int  colourDepth,
int  multisample = 0
 

void Ogre::Win32GLSupport::setConfigOption const String name,
const String value
[virtual]
 

Reimplemented from Ogre::GLSupport.

void Ogre::Win32GLSupport::start  )  [virtual]
 

Start anything special.

Implements Ogre::GLSupport.

void Ogre::Win32GLSupport::stop  )  [virtual]
 

Stop anything special.

Implements Ogre::GLSupport.

String Ogre::Win32GLSupport::validateConfig  )  [virtual]
 

Make sure all the extra options are valid.

Implements Ogre::GLSupport.


Member Data Documentation

std::set<String> Ogre::GLSupport::extensionList [protected, inherited]
 

Definition at line 101 of file OgreGLSupport.h.

std::vector<DEVMODE> Ogre::Win32GLSupport::mDevModes [private]
 

Definition at line 67 of file OgreWin32GLSupport.h.

std::vector<int> Ogre::Win32GLSupport::mFSAALevels [private]
 

Definition at line 69 of file OgreWin32GLSupport.h.

bool Ogre::Win32GLSupport::mHasPixelFormatARB [private]
 

Definition at line 70 of file OgreWin32GLSupport.h.

Win32Window* Ogre::Win32GLSupport::mInitialWindow [private]
 

Definition at line 68 of file OgreWin32GLSupport.h.

ConfigOptionMap Ogre::GLSupport::mOptions [protected, inherited]
 

Definition at line 98 of file OgreGLSupport.h.


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

Copyright © 2000-2005 by The OGRE Team
Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
Last modified Sun Feb 12 13:10:56 2006