OGRE  2.0
Object-Oriented Graphics Rendering Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
include/Win32/OgreWin32GLSupport.h
Go to the documentation of this file.
1 /*
2  -----------------------------------------------------------------------------
3  This source file is part of OGRE
4  (Object-oriented Graphics Rendering Engine)
5  For the latest info, see http://www.ogre3d.org/
6 
7  Copyright (c) 2000-2014 Torus Knot Software Ltd
8 
9  Permission is hereby granted, free of charge, to any person obtaining a copy
10  of this software and associated documentation files (the "Software"), to deal
11  in the Software without restriction, including without limitation the rights
12  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13  copies of the Software, and to permit persons to whom the Software is
14  furnished to do so, subject to the following conditions:
15 
16  The above copyright notice and this permission notice shall be included in
17  all copies or substantial portions of the Software.
18 
19  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25  THE SOFTWARE.
26  -----------------------------------------------------------------------------
27  */
28 #ifndef __OgreWin32GLSupport_H__
29 #define __OgreWin32GLSupport_H__
30 
31 #include "OgreWin32Prerequisites.h"
32 #include "OgreGLSupport.h"
33 #include "OgreGLRenderSystem.h"
34 
35 namespace Ogre
36 {
37 
39  {
40  public:
47  void addConfig();
48 
49  void setConfigOption(const String &name, const String &value);
50 
54  String validateConfig();
55 
56  virtual RenderWindow* createWindow(bool autoCreateWindow, GLRenderSystem* renderSystem, const String& windowTitle = "OGRE Render Window");
57 
59  virtual RenderWindow* newWindow(const String &name, unsigned int width, unsigned int height,
60  bool fullScreen, const NameValuePairList *miscParams = 0);
61 
62 
66  void start();
70  void stop();
71 
75  void* getProcAddress(const String& procname);
76 
80  virtual void initialiseExtensions();
81 
82 
83  bool selectPixelFormat(HDC hdc, int colourDepth, int multisample, bool hwGamma);
84 
85  virtual bool supportsPBuffers();
86  virtual GLPBuffer *createPBuffer(PixelComponentType format, size_t width, size_t height);
87  virtual unsigned int getDisplayMonitorCount() const;
88  private:
89  // Allowed video modes
96 
98  {
99  HMONITOR hMonitor;
100  MONITORINFOEX monitorInfoEx;
101  };
102 
104  typedef DisplayMonitorInfoList::iterator DisplayMonitorInfoIterator;
105 
107 
108  void refreshConfig();
109  void initialiseWGL();
110  static LRESULT CALLBACK dummyWndProc(HWND hwnd, UINT umsg, WPARAM wp, LPARAM lp);
111  static BOOL CALLBACK sCreateMonitorsInfoEnumProc(HMONITOR hMonitor, HDC hdcMonitor,
112  LPRECT lprcMonitor, LPARAM dwData);
113  };
114 
115 }
116 
117 #endif
Manages the target rendering window.
map< String, String >::type NameValuePairList
Name / value parameter pair (first = name, second = value)
Definition: OgreCommon.h:580
DisplayMonitorInfoList::iterator DisplayMonitorInfoIterator
#define _OgreGLExport
PixelComponentType
Pixel component format.
DisplayMonitorInfoList mMonitorInfoList
An off-screen rendering context.
Definition: OgreGLPBuffer.h:38
vector< DisplayMonitorInfo >::type DisplayMonitorInfoList
_StringBase String
Definition: OgreCommon.h:53
Implementation of GL as a rendering system.