Subversion Repository Public Repository

Divide-Framework

This repository has no backups
This repository's network speed is throttled to 100KB/sec

Diff Revisions 167 vs 168 for /trunk/Source Code/Hardware/Video/Headers/RenderAPIWrapper.h

Diff revisions: vs.
  @@ -28,7 +28,7 @@
28 28 #include <boost/function.hpp>
29 29 #include "Utility/Headers/Vector.h"
30 30 #include "Core/Math/Headers/MathClasses.h"
31 - #if defined( __WIN32__ ) || defined( _WIN32 )
31 + #if defined( OS_WINDOWS )
32 32 # ifndef WIN32_LEAN_AND_MEAN
33 33 # define WIN32_LEAN_AND_MEAN
34 34 # endif
  @@ -93,7 +93,8 @@
93 93 ///FWD DECLARE TYPEDEFS
94 94 typedef Texture Texture2D;
95 95 typedef Texture TextureCubemap;
96 -
96 + template<class T> class Plane;
97 + typedef vectorImpl<Plane<F32> > PlaneList;
97 98 ///FWD DECLARE STRUCTS
98 99 class RenderStateBlockDescriptor;
99 100
  @@ -126,11 +127,8 @@
126 127 ///Clear buffers,shaders, etc.
127 128 virtual void flush() = 0;
128 129
129 - virtual void lookAt(const vec3<F32>& eye,
130 - const vec3<F32>& center,
131 - const vec3<F32>& up = vec3<F32>(0,1,0),
132 - const bool invertx = false,
133 - const bool inverty = false) = 0;
130 + virtual void lookAt(const mat4<F32>& viewMatrix, const vec3<F32>& viewDirection) = 0;
131 + virtual void lookAt(const vec3<F32>& eye, const vec3<F32>& target, const vec3<F32>& up) = 0;
134 132
135 133 virtual void idle() = 0;
136 134 virtual void getMatrix(const MATRIX_MODE& mode, mat4<F32>& mat) = 0;
  @@ -140,8 +138,9 @@
140 138 ///Change the resolution and reshape all graphics data
141 139 virtual void changeResolution(U16 w, U16 h) = 0;
142 140 ///Change the window's position
143 - virtual void setWindowPos(U16 w, U16 h) = 0;
144 -
141 + virtual void setWindowPos(U16 w, U16 h) const = 0;
142 + ///Platform specific cursor manipulation. Set's the cursor's location to the specified X and Y relative to the edge of the window
143 + virtual void setMousePosition(D32 x, D32 y) const = 0;
145 144 virtual FrameBufferObject* newFBO(const FBOType& type = FBO_2D_COLOR) = 0;
146 145 virtual VertexBufferObject* newVBO(const PrimitiveType& type = TRIANGLES) = 0;
147 146 virtual PixelBufferObject* newPBO(const PBOType& type = PBO_TEXTURE_2D) = 0;
  @@ -170,7 +169,9 @@
170 169 virtual void drawText(const std::string& text, const I32 width, const vec2<I32> position, const std::string& fontName, const F32 fontSize) = 0;
171 170
172 171 /*Object viewing*/
173 - virtual void renderInViewport(const vec4<I32>& rect, boost::function0<void> callback) = 0;
172 + virtual void renderInViewport(const vec4<U32>& rect, boost::function0<void> callback) = 0;
173 + virtual void setAnaglyphFrustum(F32 camIOD, bool rightFrustum = false) = 0;
174 + virtual void updateClipPlanes() = 0;
174 175 /*Object viewing*/
175 176
176 177 /*Primitives Rendering*/
  @@ -204,9 +205,9 @@
204 205
205 206 public: //RenderAPIWrapper global
206 207
207 - #if defined( __WIN32__ ) || defined( _WIN32 )
208 + #if defined( OS_WINDOWS )
208 209 virtual HWND getHWND() {return _hwnd;}
209 - #elif defined( __APPLE_CC__ ) // Apple OS X
210 + #elif defined( OS_APPLE ) // Apple OS X
210 211 ??
211 212 #else //Linux
212 213 virtual Display* getDisplay() {return _dpy;}
  @@ -221,10 +222,10 @@
221 222 RenderAPIVersion _apiVersionId;
222 223
223 224 protected:
224 - #if defined( __WIN32__ ) || defined( _WIN32 )
225 + #if defined( OS_WINDOWS )
225 226 HWND _hwnd;
226 227 HDC _hdc ;
227 - #elif defined( __APPLE_CC__ ) // Apple OS X
228 + #elif defined( OS_APPLE ) // Apple OS X
228 229 ??
229 230 #else //Linux
230 231 Display* _dpy;