Open Source Tomb Raider Engine
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

WindowSDL.h 983B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /*!
  2. * \file include/WindowSDL.h
  3. * \brief SDL windowing implementation
  4. *
  5. * \author xythobuz
  6. */
  7. #ifndef _WINDOW_SDL_H_
  8. #define _WINDOW_SDL_H_
  9. #include "SDL.h"
  10. #include "SDL_ttf.h"
  11. #include "Window.h"
  12. /*!
  13. * \brief SDL windowing implementation
  14. */
  15. class WindowSDL : public Window {
  16. public:
  17. /*!
  18. * \brief Constructs an object of WindowSDL
  19. */
  20. WindowSDL();
  21. /*!
  22. * \brief Deconstructs an object of WindowSDL
  23. */
  24. virtual ~WindowSDL();
  25. virtual void setSize(unsigned int width, unsigned int height);
  26. virtual void setFullscreen(bool fullscreen);
  27. virtual void setMousegrab(bool grab);
  28. virtual int initialize();
  29. virtual void eventHandling();
  30. virtual void setTextInput(bool on);
  31. virtual void delay(clock_t ms);
  32. virtual void swapBuffersGL();
  33. private:
  34. SDL_Window *mWindow; //!< This is the pointer to the SDL surface
  35. SDL_GLContext mGLContext; //!< The OpenGL Context
  36. bool mTextInput;
  37. };
  38. #endif