Counter Strike : Global Offensive Source Code
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.

68 lines
1.6 KiB

  1. //=========== (C) Copyright 1999 Valve, L.L.C. All rights reserved. ===========
  2. //
  3. // The copyright to the contents herein is the property of Valve, L.L.C.
  4. // The contents may be used and/or copied only with the written permission of
  5. // Valve, L.L.C., or in accordance with the terms and conditions stipulated in
  6. // the agreement/contract under which the contents have been supplied.
  7. //
  8. // $Header: $
  9. // $NoKeywords: $
  10. //
  11. // Used for material system apps
  12. //=============================================================================
  13. #ifndef MATSYSAPP_H
  14. #define MATSYSAPP_H
  15. #ifdef _WIN32
  16. #pragma once
  17. #endif
  18. #include "appframework/tier2app.h"
  19. //-----------------------------------------------------------------------------
  20. // The application object
  21. //-----------------------------------------------------------------------------
  22. class CMatSysApp : public CTier2SteamApp
  23. {
  24. typedef CTier2SteamApp BaseClass;
  25. public:
  26. CMatSysApp();
  27. // Methods of IApplication
  28. virtual bool Create();
  29. virtual bool PreInit();
  30. virtual void PostShutdown();
  31. virtual void Destroy();
  32. // Returns the window handle (HWND in Win32)
  33. void* GetAppWindow();
  34. // Gets the window size
  35. int GetWindowWidth() const;
  36. int GetWindowHeight() const;
  37. protected:
  38. void AppPumpMessages();
  39. // Sets the video mode
  40. bool SetVideoMode( );
  41. // Sets up the game path
  42. bool SetupSearchPaths( const char *pStartingDir, bool bOnlyUseStartingDir, bool bIsTool );
  43. private:
  44. // Returns the app name
  45. virtual const char *GetAppName() = 0;
  46. virtual bool AppUsesReadPixels() { return false; }
  47. void *m_HWnd;
  48. int m_nWidth;
  49. int m_nHeight;
  50. };
  51. #endif // MATSYSAPP_H