BsWin32GLSupport.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. #pragma once
  2. #include "BsWin32Prerequisites.h"
  3. #include "BsGLSupport.h"
  4. #include "BsGLRenderSystem.h"
  5. namespace BansheeEngine
  6. {
  7. class BS_RSGL_EXPORT Win32GLSupport : public GLSupport
  8. {
  9. public:
  10. Win32GLSupport();
  11. /// @copydoc RenderSystem::_createRenderWindow
  12. virtual RenderWindowPtr newWindow(RENDER_WINDOW_DESC& desc, RenderWindowPtr parentWindow);
  13. /**
  14. * Start anything special
  15. */
  16. void start();
  17. /**
  18. * Stop anything special
  19. */
  20. void stop();
  21. /**
  22. * Get the address of a function
  23. */
  24. void* getProcAddress(const String& procname);
  25. /**
  26. * Initialize extensions
  27. */
  28. virtual void initializeExtensions();
  29. Win32Context* createContext(HDC hdc, HGLRC externalGlrc = 0);
  30. bool selectPixelFormat(HDC hdc, int colourDepth, int multisample, bool hwGamma);
  31. /**
  32. * @copydoc GLSupport::getVideoModeInfo
  33. */
  34. VideoModeInfoPtr getVideoModeInfo() const;
  35. private:
  36. // Allowed video modes
  37. Vector<DEVMODE> mDevModes;
  38. Win32Window *mInitialWindow;
  39. Vector<int> mMultisampleLevels;
  40. bool mHasPixelFormatARB;
  41. bool mHasMultisample;
  42. bool mHasHardwareGamma;
  43. bool mHasAdvancedContext;
  44. void initialiseWGL();
  45. static LRESULT CALLBACK dummyWndProc(HWND hwnd, UINT umsg, WPARAM wp, LPARAM lp);
  46. };
  47. }