Ember

haefef

Feb 24th, 2014
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.16 KB | None | 0 0
  1. /*
  2. -----------------------------------------------------------------------------
  3. Filename: Window.hpp
  4. -----------------------------------------------------------------------------
  5.  
  6. -----------------------------------------------------------------------------
  7. */
  8.  
  9. // Declare Once
  10. #pragma once
  11. // Includes
  12. #include "Defines.hpp"
  13.  
  14. // Namespace ------------------------------------------------------------------------------
  15. namespace Little
  16. {
  17.     // Class definition -------------------------------------------------------------------
  18.     class Window : Aligned
  19.     {
  20.     private:
  21.         // Constructors
  22.         Window();
  23.         Window(const Window&) {};
  24.         ~Window() {};
  25.  
  26.         //Methods
  27.         bool Create(Description::Window);
  28.         void Shutdown();
  29.         //--//
  30.         bool Resize(Float, Float);
  31.         void Clear(Float, Float, Float, Float);
  32.         void Finish();
  33.  
  34.         // Methods
  35.         const Matrix& GetProjectionMatrix();
  36.         const Matrix& GetOrthoMatrix();
  37.         //--//
  38.         void GetVideoCardInfo(char*, Int&);
  39.  
  40.     private:
  41.         bool mVsyncEnabled;
  42.         bool mFullscreen;
  43.         UInt mWindowWidth, mWindowHeight;
  44.         Matrix mProjectionMatrix;
  45.         //--//
  46.         HINSTANCE mHINSTANCE;
  47.         WString mApplicationName;
  48.         HWND mHWND;
  49.         //--//
  50.         IDXGISwapChain* mSwapChain;
  51.         ID3D11Device* mDevice;
  52.         ID3D11DeviceContext* mDeviceContext;
  53.         ID3D11RenderTargetView* mRenderTargetView;
  54.         ID3D11Texture2D* mDepthStencilBuffer;
  55.         ID3D11DepthStencilState* mDepthStencilState;
  56.         ID3D11DepthStencilView* mDepthStencilView;
  57.         ID3D11RasterizerState* mRasterState;
  58.         UInt mVideoCardMemory;
  59.         char mVideoCardDescription[128];
  60.         //--//
  61.         friend class Engine;
  62.         //--//
  63.         friend class Mesh;
  64.         friend class Shader;
  65.     };
  66.  
  67.     // Global singleton module handles
  68.     typedef ID3D11Device Device;
  69.     typedef ID3D11DeviceContext DeviceContext;
  70.     namespace Handle
  71.     {
  72.         extern Little::Window* Window;
  73.         static Little::Device* Device;
  74.         static Little::DeviceContext* DeviceContext;
  75.     }
  76. }
Advertisement
Add Comment
Please, Sign In to add comment