CmWin32GLSupport.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. #ifndef __OgreWin32GLSupport_H__
  2. #define __OgreWin32GLSupport_H__
  3. #include "CmWin32Prerequisites.h"
  4. #include "CmGLSupport.h"
  5. #include "CmGLRenderSystem.h"
  6. namespace CamelotFramework
  7. {
  8. class CM_RSGL_EXPORT Win32GLSupport : public GLSupport
  9. {
  10. public:
  11. Win32GLSupport();
  12. /// @copydoc RenderSystem::_createRenderWindow
  13. virtual RenderWindowPtr newWindow(RENDER_WINDOW_DESC& desc, RenderWindowPtr parentWindow);
  14. /**
  15. * Start anything special
  16. */
  17. void start();
  18. /**
  19. * Stop anything special
  20. */
  21. void stop();
  22. /**
  23. * Get the address of a function
  24. */
  25. void* getProcAddress(const String& procname);
  26. /**
  27. * Initialise extensions
  28. */
  29. virtual void initialiseExtensions();
  30. bool selectPixelFormat(HDC hdc, int colourDepth, int multisample, bool hwGamma);
  31. virtual bool supportsPBuffers();
  32. virtual unsigned int getDisplayMonitorCount() const;
  33. private:
  34. // Allowed video modes
  35. Vector<DEVMODE>::type mDevModes;
  36. Win32Window *mInitialWindow;
  37. Vector<int>::type mFSAALevels;
  38. bool mHasPixelFormatARB;
  39. bool mHasMultisample;
  40. bool mHasHardwareGamma;
  41. struct DisplayMonitorInfo
  42. {
  43. HMONITOR hMonitor;
  44. MONITORINFOEX monitorInfoEx;
  45. };
  46. typedef Vector<DisplayMonitorInfo>::type DisplayMonitorInfoList;
  47. typedef DisplayMonitorInfoList::iterator DisplayMonitorInfoIterator;
  48. DisplayMonitorInfoList mMonitorInfoList;
  49. void initialiseWGL();
  50. static LRESULT CALLBACK dummyWndProc(HWND hwnd, UINT umsg, WPARAM wp, LPARAM lp);
  51. static BOOL CALLBACK sCreateMonitorsInfoEnumProc(HMONITOR hMonitor, HDC hdcMonitor,
  52. LPRECT lprcMonitor, LPARAM dwData);
  53. };
  54. }
  55. #endif