Cinder  0.8.6
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
dx.h
Go to the documentation of this file.
1 // The copyright in this software is being made available under the BSD License, included below.
2 // This software may be subject to other third party and contributor rights, including patent rights,
3 // and no such rights are granted under this license.
4 //
5 // Copyright (c) 2013, Microsoft Open Technologies, Inc.
6 // All rights reserved.
7 //
8 // Redistribution and use in source and binary forms, with or without modification,
9 // are permitted provided that the following conditions are met:
10 //
11 // - Redistributions of source code must retain the above copyright notice,
12 // this list of conditions and the following disclaimer.
13 // - Redistributions in binary form must reproduce the above copyright notice,
14 // this list of conditions and the following disclaimer in the documentation
15 // and/or other materials provided with the distribution.
16 // - Neither the name of Microsoft Open Technologies, Inc. nor the names of its contributors
17 // may be used to endorse or promote products derived from this software
18 // without specific prior written permission.
19 //
20 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES,
21 // INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
22 // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
23 // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
24 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
26 // OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
27 // EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 
29 
30 #pragma once
31 
32 #include "cinder/Cinder.h"
33 
34 #include "cinder/gl/GLee.h"
35 
36 #include "cinder/Exception.h"
37 #include "cinder/Quaternion.h"
38 #include "cinder/Matrix.h"
39 #include "cinder/Vector.h"
40 #include "cinder/Color.h"
41 #include "cinder/Rect.h"
42 #include "cinder/Font.h"
43 #include "cinder/PolyLine.h"
44 #include "cinder/AxisAlignedBox.h"
45 
46 #include <windows.h>
47 #undef min
48 #undef max
49 
50 #if defined( CINDER_WINRT )
51  #include "cinder/dx/gldx.h"
52 #else
53  #include <gl/gl.h>
54 #endif
55 
56 // forward declarations
57 namespace cinder {
58  class Camera; class TriMesh2d; class TriMesh; class Sphere;
59  namespace dx {
60  class VboMesh;
61  class Texture;
62  typedef std::shared_ptr<Texture> TextureRef;
63  class Light;
64  }
65  namespace app {
66  class AppImplMswRendererDx;
67  }
68 } // namespace cinder
69 
70 namespace cinder { namespace dx {
71 
72 //#if defined( CINDER_MSW )
73 app::AppImplMswRendererDx *getDxRenderer();
74 //#endif
75 
77 bool isExtensionAvailable( const std::string &extName );
78 
80 void clear( const ColorA &color = ColorA::black(), bool clearDepthBuffer = true );
81 
83 void enableVerticalSync( bool enable = true );
85 inline void disableVerticalSync() { enableVerticalSync( false ); }
88 
90 void setMatrices( const Camera &cam );
92 void setModelView( const Camera &cam );
94 void setModelView( const Matrix44f &m );
96 void setProjection( const Camera &cam );
98 void pushModelView();
100 void popModelView();
102 void pushModelView( const Camera &cam );
104 void pushProjection( const Camera &cam );
106 void pushMatrices();
108 void popMatrices();
110 void multModelView( const Matrix44f &mtx );
112 void multProjection( const Matrix44f &mtx );
117 
119 void setMatricesWindowPersp( int screenWidth, int screenHeight, float fovDegrees = 60.0f, float nearPlane = 1.0f, float farPlane = 1000.0f, bool originUpperLeft = true );
121 inline void setMatricesWindowPersp( const Vec2i &screenSize, float fovDegrees = 60.0f, float nearPlane = 1.0f, float farPlane = 1000.0f, bool originUpperLeft = true )
122  { setMatricesWindowPersp( screenSize.x, screenSize.y, fovDegrees, nearPlane, farPlane ); }
124 void setMatricesWindow( int screenWidth, int screenHeight, bool originUpperLeft = true );
126 inline void setMatricesWindow( const Vec2i &screenSize, bool originUpperLeft = true ) { setMatricesWindow( screenSize.x, screenSize.y, originUpperLeft ); }
127 
129 Area getViewport();
131 void setViewport( const Area &area );
132 
134 void translate( const Vec2f &pos );
136 inline void translate( float x, float y ) { translate( Vec2f( x, y ) ); }
138 void translate( const Vec3f &pos );
140 inline void translate( float x, float y, float z ) { translate( Vec3f( x, y, z ) ); }
141 
143 void scale( const Vec3f &scl );
145 inline void scale( const Vec2f &scl ) { scale( Vec3f( scl.x, scl.y, 1 ) ); }
147 inline void scale( float x, float y ) { scale( Vec3f( x, y, 1 ) ); }
149 inline void scale( float x, float y, float z ) { scale( Vec3f( x, y, z ) ); }
150 
152 void rotate( const Vec3f &xyz );
154 void rotate( const Quatf &quat );
156 inline void rotate( float degrees ) { rotate( Vec3f( 0, 0, degrees ) ); }
157 
158 #if ! defined( CINDER_GLES )
159 void begin( GLenum mode );
162 void end();
164 void vertex( const Vec2f &v );
166 void vertex( float x, float y );
168 void vertex( const Vec3f &v );
170 void vertex( float x, float y, float z );
172 void texCoord( float x, float y );
174 void texCoord( const Vec2f &v );
176 void texCoord( float x, float y, float z );
178 void texCoord( const Vec3f &v );
179 #endif // ! defined( CINDER_GLES )
180 void color( float r, float g, float b );
183 void color( float r, float g, float b, float a );
185 void color( const Color8u &c );
187 void color( const ColorA8u &c );
189 void color( const Color &c );
191 void color( const ColorA &c );
193 void normal( float x, float y, float z );
195 void normal( const Vec3f &v );
196 
198 inline void enable( GLenum state ) { throw (std::string(__FUNCTION__) + " not implemented yet").c_str(); /*glEnable( state );*/ }
200 inline void disable( GLenum state ) { throw (std::string(__FUNCTION__) + " not implemented yet").c_str(); /*glDisable( state );*/ }
201 
203 void enableAlphaBlending( bool premultiplied = false );
205 void disableAlphaBlending();
208 
211 void enableAlphaTest( float value = 0.5f, int func = GL_GREATER );
213 void disableAlphaTest();
214 
215 #if ! defined( CINDER_GLES )
216 void enableWireframe();
219 void disableWireframe();
220 #endif // ! defined( CINDER_GLES )
221 
223 void disableDepthRead();
225 void disableDepthWrite();
227 void enableDepthRead( bool enable = true );
229 void enableDepthWrite( bool enable = true );
231 void enableLighting();
233 void disableLighting();
235 void setLight(const Light &light);
236 
238 void drawLine( const Vec2f &start, const Vec2f &end );
240 void drawLine( const Vec3f &start, const Vec3f &end );
242 void drawCube( const Vec3f &center, const Vec3f &size );
244 void drawColorCube( const Vec3f &center, const Vec3f &size );
246 void drawStrokedCube( const Vec3f &center, const Vec3f &size );
248 inline void drawStrokedCube( const AxisAlignedBox3f &aab ) { drawStrokedCube( aab.getCenter(), aab.getSize() ); }
250 void drawSphere( const Vec3f &center, float radius, int segments = 12 );
252 void draw( const class Sphere &sphere, int segments = 12 );
254 void drawSolidCircle( const Vec2f &center, float radius, int numSegments = 0 );
256 void drawStrokedCircle( const Vec2f &center, float radius, int numSegments = 0 );
258 void drawSolidEllipse( const Vec2f &center, float radiusX, float radiusY, int numSegments = 0 );
260 void drawStrokedEllipse( const Vec2f &center, float radiusX, float radiusY, int numSegments = 0 );
262 void drawSolidRect( const Rectf &rect, bool textureRectangle = false );
264 void drawStrokedRect( const Rectf &rect );
265 void drawSolidRoundedRect( const Rectf &r, float cornerRadius, int numSegmentsPerCorner = 0 );
266 void drawStrokedRoundedRect( const Rectf &r, float cornerRadius, int numSegmentsPerCorner = 0 );
269 void drawSolidTriangle( const Vec2f &pt1, const Vec2f &pt2, const Vec2f &pt3 );
270 void drawSolidTriangle( const Vec2f pts[3] );
272 void drawSolidTriangle( const Vec2f &pt1, const Vec2f &pt2, const Vec2f &pt3, const Vec2f &texPt1, const Vec2f &texPt2, const Vec2f &texPt3 );
273 void drawSolidTriangle( const Vec2f pts[3], const Vec2f texCoord[3] );
275 void drawStrokedTriangle( const Vec2f &pt1, const Vec2f &pt2, const Vec2f &pt3 );
276 void drawStrokedTriangle( const Vec2f pts[3] );
277 void drawCoordinateFrame( float axisLength = 1.0f, float headLength = 0.2f, float headRadius = 0.05f );
279 void drawVector( const Vec3f &start, const Vec3f &end, float headLength = 0.2f, float headRadius = 0.05f );
281 void drawFrustum( const Camera &cam );
283 void drawTorus( float outterRadius, float innerRadius, int longitudeSegments = 12, int latitudeSegments = 12 );
285 void drawCylinder( float baseRadius, float topRadius, float height, int slices = 12, int stacks = 1 );
287 void draw( const class PolyLine<Vec2f> &polyLine );
289 void draw( const class PolyLine<Vec3f> &polyLine );
291 void draw( const class Path2d &path2d, float approximationScale = 1.0f );
293 void draw( const class Shape2d &shape2d, float approximationScale = 1.0f );
294 
296 void drawSolid( const class Path2d &path2d, float approximationScale = 1.0f );
298 void drawSolid( const class Shape2d &shape2d, float approximationScale = 1.0f );
300 void drawSolid( const PolyLine2f &polyLine );
301 
303 void draw( const TriMesh2d &mesh );
305 void drawRange( const TriMesh2d &mesh, size_t startTriangle, size_t triangleCount );
307 void draw( const TriMesh &mesh );
309 void drawRange( const TriMesh &mesh, size_t startTriangle, size_t triangleCount );
311 
312 void draw( const VboMesh &vbo );
314 void drawRange( const VboMesh &vbo, size_t startIndex, size_t indexCount, int vertexStart = -1, int vertexEnd = -1 );
316 void drawArrays( const VboMesh &vbo, GLint first, GLsizei count );
318 
319 void drawBillboard( const Vec3f &pos, const Vec2f &scale, float rotationDegrees, const Vec3f &bbRight, const Vec3f &bbUp );
321 void draw( const TextureRef &texture );
323 void draw( const TextureRef &texture, const Vec2f &pos );
325 void draw( const TextureRef &texture, const Rectf &rect );
327 void draw( const TextureRef &texture, const Area &srcArea, const Rectf &destRect );
329 void draw( const TextureRef &texture, const std::vector<float> &verts, const std::vector<float> &texCoords, const std::vector<ColorA8u> &vertColors, const std::vector<uint32_t> &indices );
331 void batchTextureBegin();
333 void batchTextureEnd();
334 
336 void drawString( const std::string &str, const Vec2f &pos, const ColorA &color = ColorA( 1, 1, 1, 1 ), Font font = Font() );
338 void drawStringCentered( const std::string &str, const Vec2f &pos, const ColorA &color = ColorA( 1, 1, 1, 1 ), Font font = Font() );
340 void drawStringRight( const std::string &str, const Vec2f &pos, const ColorA &color = ColorA( 1, 1, 1, 1 ), Font font = Font() );
341 
342 class Exception : public cinder::Exception {
343 };
344 
346 };
347 
349 public:
350  virtual const char *what() const { return "Drawing more vertices than the vertex buffer supports"; }
351 };
352 
353 } } // namespace cinder::dx
void drawStrokedTriangle(const Vec2f &pt1, const Vec2f &pt2, const Vec2f &pt3)
Renders a stroked triangle.
Definition: dx.cpp:1812
GLdouble GLdouble GLdouble r
Definition: GLee.h:1474
void enableDepthRead(bool enable=true)
Enables reading from the depth buffer when enable, enabling z-testing.
Definition: dx.cpp:974
GLenum GLint GLint y
Definition: GLee.h:987
GLenum mode
Definition: GLee.h:3042
void drawCube(const Vec3f &center, const Vec3f &size)
Renders a solid cube centered at center of size size. Normals and created texture coordinates are gen...
Definition: dx.cpp:1209
void drawColorCube(const Vec3f &center, const Vec3f &size)
Renders a solid cube centered at center of size size. Each face is assigned a unique color...
Definition: dx.cpp:1214
void drawSphere(const Vec3f &center, float radius, int segments=12)
Renders a solid sphere centered at center of radius radius. segments defines how many segments the sp...
Definition: dx.cpp:1242
void enable(GLenum state)
Enables the OpenGL State state. Equivalent to calling to glEnable( state );.
Definition: dx.h:198
void drawTorus(float outterRadius, float innerRadius, int longitudeSegments=12, int latitudeSegments=12)
Draws a torus at the origin, with an outter radius outterRadius and an inner radius innerRadius...
Definition: dx.cpp:2064
GLuint start
Definition: GLee.h:963
void setMatrices(const Camera &cam)
Sets the MODELVIEW and PROJECTION matrices to reflect the values of cam. Leaves the MatrixMode as MOD...
Definition: dx.cpp:315
void drawSolidRect(const Rectf &rect, bool textureRectangle=false)
Renders a solid rectangle. Texture coordinates in the range [0,1] are generated unless textureRectang...
Definition: dx.cpp:1532
void batchTextureEnd()
Draws all the batched textures.
Definition: dx.cpp:2967
void disableAlphaTest()
Disables alpha testing.
Definition: dx.cpp:914
Vec2< float > Vec2f
Definition: Vector.h:1314
Definition: Area.h:37
GLenum GLenum GLuint texture
Definition: GLee.h:5383
GLsizei const GLchar ** string
Definition: GLee.h:2427
app::AppImplMswRendererDx * getDxRenderer()
Definition: dx.cpp:80
void drawVector(const Vec3f &start, const Vec3f &end, float headLength=0.2f, float headRadius=0.05f)
Draws a vector starting at start and ending at end. An arrowhead is drawn at the end of radius headRa...
Definition: dx.cpp:1866
void multProjection(const Matrix44f &mtx)
Multiplies the current PROJECTION matrix with mtx. Leaves the MatrixMode as MODELVIEW.
Definition: dx.cpp:400
#define GL_GREATER
Definition: gldx.h:79
void disableVerticalSync()
Disables wait for vertical sync.
Definition: dx.h:85
void pushModelView()
Pushes the MODELVIEW matrix onto its stack, preserving the current values. Leaves the MatrixMode as M...
Definition: dx.cpp:321
void drawCylinder(float baseRadius, float topRadius, float height, int slices=12, int stacks=1)
Draws a open-ended cylinder, with base radius baseRadius and top radius topRadius, with height height, subdivided into slices and stacks. Normals and texture coordinates in the range [0,1] are generated.
Definition: dx.cpp:2153
T x
Definition: Vector.h:71
void scale(const Vec3f &scl)
Produces a scale by scale in the current matrix.
Definition: dx.cpp:556
std::shared_ptr< Texture > TextureRef
Definition: dx.h:61
void drawRange(const TriMesh2d &mesh, size_t startTriangle, size_t triangleCount)
Draws a range of triangles starting with triangle # startTriangle and a count of triangleCount from c...
Definition: dx.cpp:2450
void normal(float x, float y, float z)
Sets the current normal.
Definition: dx.cpp:848
void drawString(const std::string &str, const Vec2f &pos, const ColorA &color=ColorA(1, 1, 1, 1), Font font=Font())
Draws a string str with its lower left corner located at pos. Optional font and color affect the styl...
Definition: dx.cpp:3024
void vertex(const Vec2f &v)
Definition: dx.cpp:749
void clear(const ColorA &color=ColorA::black(), bool clearDepthBuffer=true)
Clears the OpenGL color buffer using color and optionally clears the depth buffer when clearDepthBuff...
Definition: dx.cpp:202
void drawStringCentered(const std::string &str, const Vec2f &pos, const ColorA &color=ColorA(1, 1, 1, 1), Font font=Font())
Draws a string str with the horizontal center of its baseline located at pos. Optional font and color...
Definition: dx.cpp:3029
void drawStrokedRect(const Rectf &rect)
Renders a stroked rectangle.
Definition: dx.cpp:1572
void enableDepthWrite(bool enable=true)
Enables writing to the depth buffer when enable.
Definition: dx.cpp:989
Definition: Camera.h:36
void enableLighting()
Enables lighting.
Definition: dx.cpp:1009
Area getViewport()
Returns the current OpenGL Viewport as an Area.
Definition: dx.cpp:512
Definition: Vector.h:68
void drawStrokedCircle(const Vec2f &center, float radius, int numSegments=0)
Renders a stroked circle using a line loop. The default value of zero for numSegments automatically d...
Definition: dx.cpp:1395
void drawStrokedEllipse(const Vec2f &center, float radiusX, float radiusY, int numSegments=0)
Renders a stroked circle using a line loop. The default value of zero for numSegments automatically d...
Definition: dx.cpp:1490
Vec3< float > Vec3f
Definition: Vector.h:1317
void setMatricesWindowPersp(int screenWidth, int screenHeight, float fovDegrees=60.0f, float nearPlane=1.0f, float farPlane=1000.0f, bool originUpperLeft=true)
Sets the viepwort and MODELVIEW and PROJECTION matrices to be a perspective projection with the upper...
Definition: dx.cpp:432
void drawArrays(const VboMesh &vbo, GLint first, GLsizei count)
Draws a range of elements from a cinder::gl::VboMesh vbo.
Definition: dx.cpp:2764
void enableAdditiveBlending()
Enables alpha blending and selects a BlendFunc for additive blending.
Definition: dx.cpp:888
ColorAT< float > ColorA
Definition: Color.h:408
Vec3f getCenter() const
Definition: AxisAlignedBox.h:39
GLint * first
Definition: GLee.h:1725
GLuint GLuint GLsizei GLenum const GLvoid * indices
Definition: GLee.h:963
GLboolean GLboolean g
Definition: GLee.h:2964
GLenum GLsizei GLsizei height
Definition: GLee.h:1029
Definition: dx.h:342
Vec3f getSize() const
Definition: AxisAlignedBox.h:40
Represents an instance of a font at a point size. Implicitly shared object.
Definition: Font.h:63
void drawSolidRoundedRect(const Rectf &r, float cornerRadius, int numSegmentsPerCorner=0)
Definition: dx.cpp:1603
void multModelView(const Matrix44f &mtx)
Multiplies the current MODELVIEW matrix with mtx. Leaves the MatrixMode as MODELVIEW.
Definition: dx.cpp:390
Definition: DxLight.h:40
GLenum GLint x
Definition: GLee.h:987
Matrix44f getProjection()
Returns the value of the current PROJECTION matrix as a Matrix44f.
Definition: dx.cpp:421
GLuint GLuint GLsizei count
Definition: GLee.h:963
void enableWireframe()
Definition: dx.cpp:923
Definition: Sphere.h:32
void enableAlphaBlending(bool premultiplied=false)
Enables alpha blending. Selects a BlendFunc that is appropriate for premultiplied-alpha when premulti...
Definition: dx.cpp:858
int GLsizei
Definition: gldx.h:52
Represents an OpenGL Texture. Implicitly shared object.
Definition: DxTexture.h:59
void pushMatrices()
Pushes the MODELVIEW and PROJECTION matrices onto their stacks, preserving the current values...
Definition: dx.cpp:364
void drawFrustum(const Camera &cam)
Draws a wireframe representation of the frustum defined by cam.
Definition: dx.cpp:1962
const GLdouble * v
Definition: GLee.h:1384
void disableDepthRead()
Disables reading from the depth buffer, disabling z-testing.
Definition: dx.cpp:964
void drawStringRight(const std::string &str, const Vec2f &pos, const ColorA &color=ColorA(1, 1, 1, 1), Font font=Font())
Draws a right-justified string str with the center of its located at pos. Optional font and color aff...
Definition: dx.cpp:3034
GLdouble GLdouble z
Definition: GLee.h:1911
GLboolean GLboolean GLboolean b
Definition: GLee.h:2964
void batchTextureBegin()
Sets the render state to batch texture draw calls until the end for optimal performance.
Definition: dx.cpp:2962
void drawSolid(const class Path2d &path2d, float approximationScale=1.0f)
Draws a solid (filled) Path2d path2d using approximation scale approximationScale. 1.0 corresponds to screenspace, 2.0 is double screen resolution, etc. Performance warning: This routine tesselates the polygon into triangles. Consider using Triangulator directly.
T y
Definition: Vector.h:71
GLsizei const GLfloat * value
Definition: GLee.h:2487
GLuint GLuint end
Definition: GLee.h:963
void begin(GLenum mode)
Definition: dx.cpp:588
void rotate(const Vec3f &xyz)
Produces a rotation around the X-axis by xyz.x degrees, the Y-axis by xyz.y degrees and the Z-axis by...
Definition: dx.cpp:563
void popMatrices()
Pops the MODELVIEW and PROJECTION matrices off their stacks, restoring the values saved with the prev...
Definition: dx.cpp:377
void draw(const class Sphere &sphere, int segments=12)
Renders a solid sphere. segments defines how many segments the sphere is subdivided into...
Definition: dx.cpp:1340
void color(float r, float g, float b)
Sets the current color and the alpha value to 1.0.
Definition: dx.cpp:810
const GLubyte * c
Definition: GLee.h:8491
bool isVerticalSyncEnabled()
Returns whether vertical sync is enabled for the current context.
Definition: dx.cpp:243
void disableWireframe()
Definition: dx.cpp:943
Definition: Path2d.h:35
void drawBillboard(const Vec3f &pos, const Vec2f &scale, float rotationDegrees, const Vec3f &bbRight, const Vec3f &bbUp)
Draws a textured quad of size scale that is aligned with the vectors bbRight and bbUp at pos...
Definition: dx.cpp:2824
void setMatricesWindow(int screenWidth, int screenHeight, bool originUpperLeft=true)
Sets the viewport and MODELVIEW and PROJECTION matrices to orthographic with the upper-left corner at...
Definition: dx.cpp:469
GLboolean GLboolean GLboolean GLboolean a
Definition: GLee.h:2964
int int int * dx
Definition: GLee.h:17162
void enableVerticalSync(bool enable=true)
Enables or disables wait for vertical sync.
Definition: dx.cpp:223
void setModelView(const Camera &cam)
Sets the MODELVIEW matrix to reflect the values of cam. Leaves the MatrixMode as MODELVIEW.
Definition: dx.cpp:267
void disableAlphaBlending()
Disables alpha blending.
Definition: dx.cpp:876
int GLint
Definition: gldx.h:51
bool isExtensionAvailable(const std::string &extName)
Returns whether a particular OpenGL extension is available. Caches results.
Definition: gl.cpp:192
void popModelView()
Pops the MODELVIEW matrix off of its stack, restoring the values saved with the previous push...
Definition: dx.cpp:331
Definition: Exception.h:32
void setProjection(const Camera &cam)
Sets the PROJECTION matrix to reflect the values of cam. Leaves the MatrixMode as PROJECTION...
Definition: dx.cpp:287
void enableAlphaTest(float value=0.5f, int func=GL_GREATER)
Enables alpha testing and sets the AlphaFunc to test for values which are func than value...
Definition: dx.cpp:903
void setViewport(const Area &area)
Sets the current OpenGL Viewport to area.
Definition: dx.cpp:532
void drawSolidEllipse(const Vec2f &center, float radiusX, float radiusY, int numSegments=0)
Renders a solid ellipse using triangle fans. The default value of zero for numSegments automatically ...
Definition: dx.cpp:1439
const GLfloat * m
Definition: GLee.h:13493
static ColorAT< float > black()
Definition: Color.h:351
Definition: AxisAlignedBox.h:31
GLenum GLenum GLenum GLenum GLenum scale
Definition: GLee.h:8937
void end()
Definition: dx.cpp:596
Definition: TriMesh.h:167
void drawSolidCircle(const Vec2f &center, float radius, int numSegments=0)
Renders a solid circle using triangle fans. The default value of zero for numSegments automatically d...
Definition: dx.cpp:1345
void drawLine(const Vec2f &start, const Vec2f &end)
Draws a line from start to end.
Definition: dx.cpp:1050
void translate(const Vec2f &pos)
Produces a translation by pos in the current matrix.
Definition: dx.cpp:542
void disable(GLenum state)
Disables the OpenGL State state. Equivalent to calling to glDisable( state );.
Definition: dx.h:200
Matrix44f getModelView()
Returns the value of the current MODELVIEW matrix as a Matrix44f.
Definition: dx.cpp:410
GLclampf f
Definition: GLee.h:15307
Definition: Shape2d.h:34
virtual const char * what() const
Definition: dx.h:350
GLsizeiptr size
Definition: GLee.h:2089
void disableLighting()
Disables lighting.
Definition: dx.cpp:1014
void texCoord(float x, float y)
Definition: dx.cpp:782
void drawSolidTriangle(const Vec2f &pt1, const Vec2f &pt2, const Vec2f &pt3)
Definition: dx.cpp:1752
unsigned int GLenum
Definition: gldx.h:46
void pushProjection(const Camera &cam)
Pushes the PROJECTION matrix onto its stack, preserving the current values, and then sets the matrix ...
Definition: dx.cpp:353
void drawStrokedCube(const Vec3f &center, const Vec3f &size)
Renders a stroked cube centered at center of size size.
Definition: dx.cpp:1219
void drawCoordinateFrame(float axisLength=1.0f, float headLength=0.2f, float headRadius=0.05f)
Definition: dx.cpp:1841
Definition: TriMesh.h:66
void drawStrokedRoundedRect(const Rectf &r, float cornerRadius, int numSegmentsPerCorner=0)
Definition: dx.cpp:1692
void setLight(const Light &light)
Sets a light internally using the properties of light. Up to eight unique lights may exist in this mo...
Definition: dx.cpp:1019
void disableDepthWrite()
Disables writing to the depth buffer.
Definition: dx.cpp:999
GLuint color
Definition: GLee.h:3198