Ghost Context Refactor
[blender-staging.git] / source / gameengine / Rasterizer / RAS_ICanvas.h
index 337ea247ce3fd5c79766a8a1d8d0661f3c425256..d90cbea286e5d8d5524368e1be545932d5ee2189 100644 (file)
@@ -59,7 +59,7 @@ public:
        virtual 
        ~RAS_ICanvas(
        ) {
-       };
+       }
 
        virtual 
                void 
@@ -105,6 +105,18 @@ public:
                void 
        SwapBuffers(
        )=0;
+       
+       virtual
+               void
+       SetSwapInterval(
+               int interval
+       )=0;
+
+       virtual
+               bool
+       GetSwapInterval(
+               int& intervalOut
+       )=0;
  
        virtual 
                void 
@@ -133,25 +145,25 @@ public:
 
        virtual
                int
-       GetMouseX( int x
+       GetMouseX(int x
        )=0;
 
        virtual
                int
-       GetMouseY( int y
+       GetMouseY(int y
        )= 0;
 
        virtual
                float
-       GetMouseNormalizedX( int x
+       GetMouseNormalizedX(int x
        )=0;
 
        virtual
                float
-       GetMouseNormalizedY( int y
+       GetMouseNormalizedY(int y
        )= 0;
 
-       virtual 
+       virtual
                const RAS_Rect &
        GetDisplayArea(
        ) const = 0;
@@ -178,7 +190,26 @@ public:
        SetViewPort(
                int x1, int y1,
                int x2, int y2
-       ) = 0; 
+       ) = 0;
+
+       /**
+        * Update the Canvas' viewport (used when the viewport changes without using SetViewPort()
+        * eg: Shadow buffers and FBOs
+        */
+
+       virtual
+               void
+       UpdateViewPort(
+               int x1, int y1,
+               int x2, int y2
+       ) = 0;
+
+       /**
+        * Get the visible viewport
+        */
+       virtual
+               const int*
+       GetViewPort() = 0;
 
        virtual 
                void 
@@ -213,17 +244,25 @@ public:
                int height
        )=0;
 
+       virtual
+               void
+       SetFullScreen(
+               bool enable
+       )=0;
+
+       virtual
+               bool
+       GetFullScreen()=0;
+
                
        
 protected:
        RAS_MouseState m_mousestate;
-       
+
+
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:RAS_ICanvas"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:RAS_ICanvas")
 #endif
 };
 
-#endif //__RAS_ICANVAS_H__
-
+#endif  /* __RAS_ICANVAS_H__ */