Classes | |
class | DrawingTooManyVerticesException |
class | Exception |
class | ExceptionUnknownTarget |
class | HlslDuplicateCBufferExc |
class | HlslNullProgramExc |
class | HlslProg |
Represents a DirectX HLSL shader. Implicitly shared object. More... | |
class | HlslProgCompileExc |
class | Light |
class | RenderTarget |
Represents an DirectX RenderTarget object. More... | |
class | RenderTargetException |
class | RenderTargetExceptionInvalidSpecification |
class | SurfaceConstraintsGLTexture |
class | Texture |
Represents an OpenGL Texture. Implicitly shared object. More... | |
class | TextureDataExc |
class | TextureFont |
class | Vbo |
class | VboExc |
class | VboFailedMapExc |
class | VboFailedUnmapExc |
class | VboInvalidTargetExc |
class | VboMesh |
Typedefs | |
typedef std::shared_ptr< Texture > | TextureRef |
typedef std::shared_ptr < RenderTarget > | RenderTargetRef |
typedef std::shared_ptr< class TextureFont > | TextureFontRef |
typedef std::shared_ptr< HlslProg > | HlslProgRef |
typedef app::AppImplMswRendererDx::FixedVertex | FixedVertex |
typedef app::AppImplMswRendererDx::LightData | LightData |
Functions | |
app::AppImplMswRendererDx * | getDxRenderer () |
bool | isExtensionAvailable (const std::string &extName) |
Returns whether a particular OpenGL extension is available. Caches results. More... | |
void | clear (const ColorA &color=ColorA::black(), bool clearDepthBuffer=true) |
Clears the OpenGL color buffer using color and optionally clears the depth buffer when clearDepthBuffer. More... | |
void | enableVerticalSync (bool enable=true) |
Enables or disables wait for vertical sync. More... | |
void | disableVerticalSync () |
Disables wait for vertical sync. More... | |
bool | isVerticalSyncEnabled () |
Returns whether vertical sync is enabled for the current context. More... | |
void | setMatrices (const Camera &cam) |
Sets the MODELVIEW and PROJECTION matrices to reflect the values of cam. Leaves the MatrixMode as MODELVIEW . More... | |
void | setModelView (const Camera &cam) |
Sets the MODELVIEW matrix to reflect the values of cam. Leaves the MatrixMode as MODELVIEW . More... | |
void | setModelView (const Matrix44f &m) |
Sets the MODELVIEW matrix to reflect the values of m. Leaves the MatrixMode as MODELVIEW . More... | |
void | setProjection (const Camera &cam) |
Sets the PROJECTION matrix to reflect the values of cam. Leaves the MatrixMode as PROJECTION . More... | |
void | pushModelView () |
Pushes the MODELVIEW matrix onto its stack, preserving the current values. Leaves the MatrixMode as MODELVIEW . More... | |
void | popModelView () |
Pops the MODELVIEW matrix off of its stack, restoring the values saved with the previous push. Leaves the MatrixMode as MODELVIEW . More... | |
void | pushModelView (const Camera &cam) |
Pushes the MODELVIEW matrix onto its stack, preserving the current values, and then sets the matrix to reflect cam. Leaves the MatrixMode as MODELVIEW . More... | |
void | pushProjection (const Camera &cam) |
Pushes the PROJECTION matrix onto its stack, preserving the current values, and then sets the matrix to reflect cam. Leaves the MatrixMode as PROJECTION . More... | |
void | pushMatrices () |
Pushes the MODELVIEW and PROJECTION matrices onto their stacks, preserving the current values. Leaves the MatrixMode as MODELVIEW . More... | |
void | popMatrices () |
Pops the MODELVIEW and PROJECTION matrices off their stacks, restoring the values saved with the previous push. Leaves the MatrixMode as MODELVIEW . More... | |
void | multModelView (const Matrix44f &mtx) |
Multiplies the current MODELVIEW matrix with mtx. Leaves the MatrixMode as MODELVIEW . More... | |
void | multProjection (const Matrix44f &mtx) |
Multiplies the current PROJECTION matrix with mtx. Leaves the MatrixMode as MODELVIEW . More... | |
Matrix44f | getModelView () |
Returns the value of the current MODELVIEW matrix as a Matrix44f. More... | |
Matrix44f | getProjection () |
Returns the value of the current PROJECTION matrix as a Matrix44f. More... | |
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-left corner at [0,0] and the lower-right at [screenWidth,screenHeight], but flipped vertically if not originUpperLeft. More... | |
void | setMatricesWindowPersp (const Vec2i &screenSize, float fovDegrees=60.0f, float nearPlane=1.0f, float farPlane=1000.0f, bool originUpperLeft=true) |
Sets the viewport and MODELVIEW and PROJECTION matrices to be a perspective projection with the upper-left corner at [0,0] and the lower-right at [screenWidth,screenHeight], but flipped vertically if not originUpperLeft. More... | |
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 [0,0] and the lower-right at [screenWidth,screenHeight] if originUpperLeft is true . Otherwise the origin is in the lower right. More... | |
void | setMatricesWindow (const Vec2i &screenSize, bool originUpperLeft=true) |
Sets the viewport and the MODELVIEW and PROJECTION matrices to orthographic with the upper-left corner at [0,0] and the lower-right at [size.x,size.y] if originUpperLeft is true . Otherwise the origin is in the lower right. More... | |
Area | getViewport () |
Returns the current OpenGL Viewport as an Area. More... | |
void | setViewport (const Area &area) |
Sets the current OpenGL Viewport to area. More... | |
void | translate (const Vec2f &pos) |
Produces a translation by pos in the current matrix. More... | |
void | translate (float x, float y) |
Produces a translation by x and y in the current matrix. More... | |
void | translate (const Vec3f &pos) |
Produces a translation by pos in the current matrix. More... | |
void | translate (float x, float y, float z) |
Produces a translation by x, y and z in the current matrix. More... | |
void | scale (const Vec3f &scl) |
Produces a scale by scale in the current matrix. More... | |
void | scale (const Vec2f &scl) |
Produces a scale by scl in the current matrix. More... | |
void | scale (float x, float y) |
Produces a scale by x and y in the current matrix. More... | |
void | scale (float x, float y, float z) |
Produces a scale by x, y and z in the current matrix. More... | |
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 xyz.z degrees in the current matrix. Processed in X-Y-Z order. More... | |
void | rotate (const Quatf &quat) |
Produces a rotation by the quaternion quat in the current matrix. More... | |
void | rotate (float degrees) |
Produces a 2D rotation, the equivalent of a rotation around the Z axis by degrees. More... | |
void | color (float r, float g, float b) |
Sets the current color and the alpha value to 1.0. More... | |
void | color (float r, float g, float b, float a) |
Sets the current color and alpha value. More... | |
void | color (const Color8u &c) |
Sets the current color, and the alpha value to 1.0. More... | |
void | color (const ColorA8u &c) |
Sets the current color and alpha value. More... | |
void | color (const Color &c) |
Sets the current color, and the alpha value to 1.0. More... | |
void | color (const ColorA &c) |
Sets the current color and alpha value. More... | |
void | normal (float x, float y, float z) |
Sets the current normal. More... | |
void | normal (const Vec3f &v) |
Sets the current normal. More... | |
void | enable (GLenum state) |
Enables the OpenGL State state. Equivalent to calling to glEnable( state );. More... | |
void | disable (GLenum state) |
Disables the OpenGL State state. Equivalent to calling to glDisable( state );. More... | |
void | enableAlphaBlending (bool premultiplied=false) |
Enables alpha blending. Selects a BlendFunc that is appropriate for premultiplied-alpha when premultiplied. More... | |
void | disableAlphaBlending () |
Disables alpha blending. More... | |
void | enableAdditiveBlending () |
Enables alpha blending and selects a BlendFunc for additive blending. More... | |
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, which should be in the range [0, 1.0]. Possible values for func include GL_NEVER, GL_LESS, GL_EQUAL, GL_LEQUAL, GL_GREATER, GL_NOTEQUAL, GL_GEQUAL and GL_ALWAYS . More... | |
void | disableAlphaTest () |
Disables alpha testing. More... | |
void | disableDepthRead () |
Disables reading from the depth buffer, disabling z-testing. More... | |
void | disableDepthWrite () |
Disables writing to the depth buffer. More... | |
void | enableDepthRead (bool enable=true) |
Enables reading from the depth buffer when enable, enabling z-testing. More... | |
void | enableDepthWrite (bool enable=true) |
Enables writing to the depth buffer when enable. More... | |
void | enableLighting () |
Enables lighting. More... | |
void | disableLighting () |
Disables lighting. More... | |
void | setLight (const Light &light) |
Sets a light internally using the properties of light. Up to eight unique lights may exist in this model. More... | |
void | drawLine (const Vec2f &start, const Vec2f &end) |
Draws a line from start to end. More... | |
void | drawLine (const Vec3f &start, const Vec3f &end) |
Draws a line from start to end. More... | |
void | drawCube (const Vec3f ¢er, const Vec3f &size) |
Renders a solid cube centered at center of size size. Normals and created texture coordinates are generated for GL_TEXTURE_2D , with each face in the range [0,0] - [1.0,1.0]. More... | |
void | drawColorCube (const Vec3f ¢er, const Vec3f &size) |
Renders a solid cube centered at center of size size. Each face is assigned a unique color, and no normals or texture coordinates are generated. More... | |
void | drawStrokedCube (const Vec3f ¢er, const Vec3f &size) |
Renders a stroked cube centered at center of size size. More... | |
void | drawStrokedCube (const AxisAlignedBox3f &aab) |
Renders a stroked cube aab. More... | |
void | drawSphere (const Vec3f ¢er, float radius, int segments=12) |
Renders a solid sphere centered at center of radius radius. segments defines how many segments the sphere is subdivided into. Normals and texture coordinates in the range [0,1] are generated. More... | |
void | draw (const class Sphere &sphere, int segments=12) |
Renders a solid sphere. segments defines how many segments the sphere is subdivided into. Normals and texture coordinates in the range [0,1] are generated. More... | |
void | drawSolidCircle (const Vec2f ¢er, float radius, int numSegments=0) |
Renders a solid circle using triangle fans. The default value of zero for numSegments automatically determines a number of segments based on the circle's circumference. More... | |
void | drawStrokedCircle (const Vec2f ¢er, float radius, int numSegments=0) |
Renders a stroked circle using a line loop. The default value of zero for numSegments automatically determines a number of segments based on the circle's circumference. More... | |
void | drawSolidEllipse (const Vec2f ¢er, float radiusX, float radiusY, int numSegments=0) |
Renders a solid ellipse using triangle fans. The default value of zero for numSegments automatically determines a number of segments based on the ellipse's circumference. More... | |
void | drawStrokedEllipse (const Vec2f ¢er, float radiusX, float radiusY, int numSegments=0) |
Renders a stroked circle using a line loop. The default value of zero for numSegments automatically determines a number of segments based on the circle's circumference. More... | |
void | drawSolidRect (const Rectf &rect, bool textureRectangle=false) |
Renders a solid rectangle. Texture coordinates in the range [0,1] are generated unless textureRectangle. More... | |
void | drawStrokedRect (const Rectf &rect) |
Renders a stroked rectangle. More... | |
void | drawSolidRoundedRect (const Rectf &r, float cornerRadius, int numSegmentsPerCorner=0) |
void | drawStrokedRoundedRect (const Rectf &r, float cornerRadius, int numSegmentsPerCorner=0) |
void | drawSolidTriangle (const Vec2f &pt1, const Vec2f &pt2, const Vec2f &pt3) |
void | drawSolidTriangle (const Vec2f pts[3]) |
void | drawSolidTriangle (const Vec2f &pt1, const Vec2f &pt2, const Vec2f &pt3, const Vec2f &texPt1, const Vec2f &texPt2, const Vec2f &texPt3) |
Renders a textured triangle. More... | |
void | drawSolidTriangle (const Vec2f pts[3], const Vec2f texCoord[3]) |
void | drawStrokedTriangle (const Vec2f &pt1, const Vec2f &pt2, const Vec2f &pt3) |
Renders a stroked triangle. More... | |
void | drawStrokedTriangle (const Vec2f pts[3]) |
void | drawCoordinateFrame (float axisLength=1.0f, float headLength=0.2f, float headRadius=0.05f) |
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 headRadius and length headLength. More... | |
void | drawFrustum (const Camera &cam) |
Draws a wireframe representation of the frustum defined by cam. More... | |
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, subdivided into longitudeSegments and latitudeSegments. Normals and texture coordinates in the range [0,1] are generated. More... | |
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. More... | |
void | draw (const class PolyLine< Vec2f > &polyLine) |
Draws a 2d PolyLine polyLine. More... | |
void | draw (const class PolyLine< Vec3f > &polyLine) |
Draws a 3d PolyLine polyLine. More... | |
void | draw (const class Path2d &path2d, float approximationScale=1.0f) |
Draws a Path2d path2d using approximation scale approximationScale. 1.0 corresponds to screenspace, 2.0 is double screen resolution, etc. More... | |
void | draw (const class Shape2d &shape2d, float approximationScale=1.0f) |
Draws a Shape2d shape2d using approximation scale approximationScale. 1.0 corresponds to screenspace, 2.0 is double screen resolution, etc. More... | |
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. More... | |
void | drawSolid (const class Shape2d &shape2d, float approximationScale=1.0f) |
Draws a solid (filled) Shape2d shape2d 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. More... | |
void | drawSolid (const PolyLine2f &polyLine) |
Draws a solid (filled) PolyLine2f polyLine. Performance warning: This routine tesselates the polygon into triangles. Consider using Triangulator directly. More... | |
void | draw (const TriMesh2d &mesh) |
Draws a cinder::TriMesh mesh at the origin. More... | |
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 cinder::TriMesh mesh at the origin. More... | |
void | draw (const TriMesh &mesh) |
Draws a cinder::TriMesh mesh at the origin. More... | |
void | drawRange (const TriMesh &mesh, size_t startTriangle, size_t triangleCount) |
Draws a range of triangles starting with triangle # startTriangle and a count of triangleCount from cinder::TriMesh mesh at the origin. More... | |
void | draw (const VboMesh &vbo) |
Draws a cinder::gl::VboMesh mesh at the origin. More... | |
void | drawRange (const VboMesh &vbo, size_t startIndex, size_t indexCount, int vertexStart=-1, int vertexEnd=-1) |
Draws a range of vertices and elements of cinder::gl::VboMesh mesh at the origin. Default parameters for vertexStart and vertexEnd imply the VboMesh's full range of vertices. More... | |
void | drawArrays (const VboMesh &vbo, GLint first, GLsizei count) |
Draws a range of elements from a cinder::gl::VboMesh vbo. More... | |
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, rotated by rotationDegrees around the vector orthogonal to bbRight and bbUp. More... | |
void | draw (const TextureRef &texture) |
Draws texture on the XY-plane. More... | |
void | draw (const TextureRef &texture, const Vec2f &pos) |
Draws texture on the XY-plane at pos. More... | |
void | draw (const TextureRef &texture, const Rectf &rect) |
Draws texture on the XY-plane in the rectangle defined by rect. More... | |
void | draw (const TextureRef &texture, const Area &srcArea, const Rectf &destRect) |
Draws the pixels inside srcArea of texture on the XY-plane in the rectangle defined by destRect. More... | |
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) |
Draws a bunch of textured triangles as specified by the function caller. More... | |
void | batchTextureBegin () |
Sets the render state to batch texture draw calls until the end for optimal performance. More... | |
void | batchTextureEnd () |
Draws all the batched textures. More... | |
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 style. More... | |
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 affect the style. More... | |
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 affect the style. More... | |
void | begin (GLenum mode) |
void | end () |
void | vertex (const Vec2f &v) |
void | vertex (float x, float y) |
void | vertex (const Vec3f &v) |
void | vertex (float x, float y, float z) |
void | texCoord (float x, float y) |
void | texCoord (const Vec2f &v) |
void | texCoord (float x, float y, float z) |
void | texCoord (const Vec3f &v) |
void | enableWireframe () |
void | disableWireframe () |
void | draw (const PolyLine< Vec2f > &polyLine) |
void | draw (const PolyLine< Vec3f > &polyLine) |
void | draw (const Path2d &path2d, float approximationScale) |
void | draw (const Shape2d &shape2d, float approximationScale) |
void | drawSolid (const Path2d &path2d, float approximationScale) |
void | drawSolid (const Shape2d &shape2d, float approximationScale) |
set< Font::Glyph > | getNecessaryGlyphs (const Font &font, const string &supportedChars) |
Variables | |
const char * | kErrorInsufficientNonFloatChannels = "Non-float textures need to have all four color channels (RGBA) defined" |
typedef std::shared_ptr< Texture > cinder::dx::TextureRef |
typedef std::shared_ptr<RenderTarget> cinder::dx::RenderTargetRef |
typedef std::shared_ptr<class TextureFont> cinder::dx::TextureFontRef |
typedef std::shared_ptr<HlslProg> cinder::dx::HlslProgRef |
typedef app::AppImplMswRendererDx::FixedVertex cinder::dx::FixedVertex |
typedef app::AppImplMswRendererDx::LightData cinder::dx::LightData |
enum cinder::dx::CinderDxgiChannel |
anonymous enum |
app::AppImplMswRendererDx * cinder::dx::getDxRenderer | ( | ) |
bool cinder::dx::isExtensionAvailable | ( | const std::string & | extName | ) |
Returns whether a particular OpenGL extension is available. Caches results.
void cinder::dx::clear | ( | const ColorA & | color = ColorA::black() , |
bool | clearDepthBuffer = true |
||
) |
Clears the OpenGL color buffer using color and optionally clears the depth buffer when clearDepthBuffer.
void cinder::dx::enableVerticalSync | ( | bool | enable = true | ) |
Enables or disables wait for vertical sync.
void cinder::dx::disableVerticalSync | ( | ) |
Disables wait for vertical sync.
bool cinder::dx::isVerticalSyncEnabled | ( | ) |
Returns whether vertical sync is enabled for the current context.
void cinder::dx::setMatrices | ( | const Camera & | cam | ) |
Sets the MODELVIEW
and PROJECTION
matrices to reflect the values of cam. Leaves the MatrixMode
as MODELVIEW
.
void cinder::dx::setModelView | ( | const Camera & | cam | ) |
Sets the MODELVIEW
matrix to reflect the values of cam. Leaves the MatrixMode
as MODELVIEW
.
void cinder::dx::setModelView | ( | const Matrix44f & | m | ) |
Sets the MODELVIEW
matrix to reflect the values of m. Leaves the MatrixMode
as MODELVIEW
.
void cinder::dx::setProjection | ( | const Camera & | cam | ) |
Sets the PROJECTION
matrix to reflect the values of cam. Leaves the MatrixMode
as PROJECTION
.
void cinder::dx::pushModelView | ( | ) |
Pushes the MODELVIEW
matrix onto its stack, preserving the current values. Leaves the MatrixMode
as MODELVIEW
.
void cinder::dx::popModelView | ( | ) |
Pops the MODELVIEW
matrix off of its stack, restoring the values saved with the previous push. Leaves the MatrixMode
as MODELVIEW
.
void cinder::dx::pushModelView | ( | const Camera & | cam | ) |
Pushes the MODELVIEW
matrix onto its stack, preserving the current values, and then sets the matrix to reflect cam. Leaves the MatrixMode
as MODELVIEW
.
void cinder::dx::pushProjection | ( | const Camera & | cam | ) |
Pushes the PROJECTION
matrix onto its stack, preserving the current values, and then sets the matrix to reflect cam. Leaves the MatrixMode
as PROJECTION
.
void cinder::dx::pushMatrices | ( | ) |
Pushes the MODELVIEW
and PROJECTION
matrices onto their stacks, preserving the current values. Leaves the MatrixMode
as MODELVIEW
.
void cinder::dx::popMatrices | ( | ) |
Pops the MODELVIEW
and PROJECTION
matrices off their stacks, restoring the values saved with the previous push. Leaves the MatrixMode
as MODELVIEW
.
void cinder::dx::multModelView | ( | const Matrix44f & | mtx | ) |
Multiplies the current MODELVIEW
matrix with mtx. Leaves the MatrixMode
as MODELVIEW
.
void cinder::dx::multProjection | ( | const Matrix44f & | mtx | ) |
Multiplies the current PROJECTION
matrix with mtx. Leaves the MatrixMode
as MODELVIEW
.
Matrix44f cinder::dx::getModelView | ( | ) |
Returns the value of the current MODELVIEW
matrix as a Matrix44f.
Matrix44f cinder::dx::getProjection | ( | ) |
Returns the value of the current PROJECTION
matrix as a Matrix44f.
void cinder::dx::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-left corner at [0,0] and the lower-right at
[screenWidth,screenHeight], but flipped vertically if not originUpperLeft.
void cinder::dx::setMatricesWindowPersp | ( | const Vec2i & | screenSize, |
float | fovDegrees = 60.0f , |
||
float | nearPlane = 1.0f , |
||
float | farPlane = 1000.0f , |
||
bool | originUpperLeft = true |
||
) |
Sets the viewport and MODELVIEW
and PROJECTION
matrices to be a perspective projection with the upper-left corner at [0,0] and the lower-right at
[screenWidth,screenHeight], but flipped vertically if not originUpperLeft.
void cinder::dx::setMatricesWindow | ( | int | screenWidth, |
int | screenHeight, | ||
bool | originUpperLeft = true |
||
) |
Sets the viewport and MODELVIEW
and PROJECTION
matrices to orthographic with the upper-left corner at [0,0] and the lower-right at
[screenWidth,screenHeight] if originUpperLeft is
true
. Otherwise the origin is in the lower right.
void cinder::dx::setMatricesWindow | ( | const Vec2i & | screenSize, |
bool | originUpperLeft = true |
||
) |
Sets the viewport and the MODELVIEW
and PROJECTION
matrices to orthographic with the upper-left corner at [0,0] and the lower-right at
[size.x,size.y] if originUpperLeft is
true
. Otherwise the origin is in the lower right.
void cinder::dx::setViewport | ( | const Area & | area | ) |
Sets the current OpenGL Viewport to area.
void cinder::dx::translate | ( | const Vec2f & | pos | ) |
Produces a translation by pos in the current matrix.
void cinder::dx::translate | ( | float | x, |
float | y | ||
) |
Produces a translation by x and y in the current matrix.
void cinder::dx::translate | ( | const Vec3f & | pos | ) |
Produces a translation by pos in the current matrix.
void cinder::dx::translate | ( | float | x, |
float | y, | ||
float | z | ||
) |
Produces a translation by x, y and z in the current matrix.
void cinder::dx::scale | ( | const Vec3f & | scl | ) |
Produces a scale by scale in the current matrix.
void cinder::dx::scale | ( | const Vec2f & | scl | ) |
Produces a scale by scl in the current matrix.
void cinder::dx::scale | ( | float | x, |
float | y | ||
) |
Produces a scale by x and y in the current matrix.
void cinder::dx::scale | ( | float | x, |
float | y, | ||
float | z | ||
) |
Produces a scale by x, y and z in the current matrix.
void cinder::dx::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 xyz.z degrees in the current matrix. Processed in X-Y-Z order.
void cinder::dx::rotate | ( | const Quatf & | quat | ) |
Produces a rotation by the quaternion quat in the current matrix.
void cinder::dx::rotate | ( | float | degrees | ) |
Produces a 2D rotation, the equivalent of a rotation around the Z axis by degrees.
void cinder::dx::color | ( | float | r, |
float | g, | ||
float | b | ||
) |
Sets the current color and the alpha value to 1.0.
void cinder::dx::color | ( | float | r, |
float | g, | ||
float | b, | ||
float | a | ||
) |
Sets the current color and alpha value.
void cinder::dx::color | ( | const Color8u & | c | ) |
Sets the current color, and the alpha value to 1.0.
void cinder::dx::color | ( | const ColorA8u & | c | ) |
Sets the current color and alpha value.
void cinder::dx::color | ( | const Color & | c | ) |
Sets the current color, and the alpha value to 1.0.
void cinder::dx::color | ( | const ColorA & | c | ) |
Sets the current color and alpha value.
void cinder::dx::normal | ( | float | x, |
float | y, | ||
float | z | ||
) |
Sets the current normal.
void cinder::dx::normal | ( | const Vec3f & | v | ) |
Sets the current normal.
Enables the OpenGL State state. Equivalent to calling to glEnable( state );.
Disables the OpenGL State state. Equivalent to calling to glDisable( state );.
void cinder::dx::enableAlphaBlending | ( | bool | premultiplied = false | ) |
Enables alpha blending. Selects a BlendFunc
that is appropriate for premultiplied-alpha when premultiplied.
void cinder::dx::disableAlphaBlending | ( | ) |
Disables alpha blending.
void cinder::dx::enableAdditiveBlending | ( | ) |
Enables alpha blending and selects a BlendFunc
for additive blending.
void cinder::dx::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, which should be in the range [0, 1.0]. Possible values for func include GL_NEVER, GL_LESS, GL_EQUAL, GL_LEQUAL, GL_GREATER, GL_NOTEQUAL, GL_GEQUAL and GL_ALWAYS
.
void cinder::dx::disableAlphaTest | ( | ) |
Disables alpha testing.
void cinder::dx::disableDepthRead | ( | ) |
Disables reading from the depth buffer, disabling z-testing.
void cinder::dx::disableDepthWrite | ( | ) |
Disables writing to the depth buffer.
void cinder::dx::enableDepthRead | ( | bool | enable = true | ) |
Enables reading from the depth buffer when enable, enabling z-testing.
void cinder::dx::enableDepthWrite | ( | bool | enable = true | ) |
Enables writing to the depth buffer when enable.
void cinder::dx::enableLighting | ( | ) |
Enables lighting.
void cinder::dx::disableLighting | ( | ) |
Disables lighting.
void cinder::dx::setLight | ( | const Light & | light | ) |
Sets a light internally using the properties of light. Up to eight unique lights may exist in this model.
void cinder::dx::drawLine | ( | const Vec2f & | start, |
const Vec2f & | end | ||
) |
Draws a line from start to end.
void cinder::dx::drawLine | ( | const Vec3f & | start, |
const Vec3f & | end | ||
) |
Draws a line from start to end.
void cinder::dx::drawCube | ( | const Vec3f & | center, |
const Vec3f & | size | ||
) |
Renders a solid cube centered at center of size size. Normals and created texture coordinates are generated for GL_TEXTURE_2D
, with each face in the range [0,0] - [1.0,1.0].
void cinder::dx::drawColorCube | ( | const Vec3f & | center, |
const Vec3f & | size | ||
) |
Renders a solid cube centered at center of size size. Each face is assigned a unique color, and no normals or texture coordinates are generated.
void cinder::dx::drawStrokedCube | ( | const Vec3f & | center, |
const Vec3f & | size | ||
) |
Renders a stroked cube centered at center of size size.
void cinder::dx::drawStrokedCube | ( | const AxisAlignedBox3f & | aab | ) |
Renders a stroked cube aab.
Renders a solid sphere centered at center of radius radius. segments defines how many segments the sphere is subdivided into. Normals and texture coordinates in the range [0,1] are generated.
Renders a solid sphere. segments defines how many segments the sphere is subdivided into. Normals and texture coordinates in the range [0,1] are generated.
Renders a solid circle using triangle fans. The default value of zero for numSegments automatically determines a number of segments based on the circle's circumference.
Renders a stroked circle using a line loop. The default value of zero for numSegments automatically determines a number of segments based on the circle's circumference.
void cinder::dx::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 determines a number of segments based on the ellipse's circumference.
void cinder::dx::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 determines a number of segments based on the circle's circumference.
void cinder::dx::drawSolidRect | ( | const Rectf & | rect, |
bool | textureRectangle = false |
||
) |
Renders a solid rectangle. Texture coordinates in the range [0,1] are generated unless textureRectangle.
void cinder::dx::drawStrokedRect | ( | const Rectf & | rect | ) |
Renders a stroked rectangle.
void cinder::dx::drawSolidRoundedRect | ( | const Rectf & | r, |
float | cornerRadius, | ||
int | numSegmentsPerCorner = 0 |
||
) |
void cinder::dx::drawStrokedRoundedRect | ( | const Rectf & | r, |
float | cornerRadius, | ||
int | numSegmentsPerCorner = 0 |
||
) |
void cinder::dx::drawSolidTriangle | ( | const Vec2f & | pt1, |
const Vec2f & | pt2, | ||
const Vec2f & | pt3 | ||
) |
Renders a coordinate frame representation centered at the origin. Arrowheads are drawn at the end of each axis with radius headRadius and length headLength. Renders a solid triangle.
void cinder::dx::drawSolidTriangle | ( | const Vec2f | pts[3] | ) |
void cinder::dx::drawSolidTriangle | ( | const Vec2f & | pt1, |
const Vec2f & | pt2, | ||
const Vec2f & | pt3, | ||
const Vec2f & | texPt1, | ||
const Vec2f & | texPt2, | ||
const Vec2f & | texPt3 | ||
) |
Renders a textured triangle.
void cinder::dx::drawSolidTriangle | ( | const Vec2f | pts[3], |
const Vec2f | texCoord[3] | ||
) |
void cinder::dx::drawStrokedTriangle | ( | const Vec2f & | pt1, |
const Vec2f & | pt2, | ||
const Vec2f & | pt3 | ||
) |
Renders a stroked triangle.
void cinder::dx::drawStrokedTriangle | ( | const Vec2f | pts[3] | ) |
void cinder::dx::drawCoordinateFrame | ( | float | axisLength = 1.0f , |
float | headLength = 0.2f , |
||
float | headRadius = 0.05f |
||
) |
void cinder::dx::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 headRadius and length headLength.
void cinder::dx::drawFrustum | ( | const Camera & | cam | ) |
Draws a wireframe representation of the frustum defined by cam.
void cinder::dx::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, subdivided into longitudeSegments and latitudeSegments. Normals and texture coordinates in the range [0,1] are generated.
void cinder::dx::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.
void cinder::dx::draw | ( | const class Path2d & | path2d, |
float | approximationScale = 1.0f |
||
) |
Draws a Path2d path2d using approximation scale approximationScale. 1.0 corresponds to screenspace, 2.0 is double screen resolution, etc.
void cinder::dx::draw | ( | const class Shape2d & | shape2d, |
float | approximationScale = 1.0f |
||
) |
Draws a Shape2d shape2d using approximation scale approximationScale. 1.0 corresponds to screenspace, 2.0 is double screen resolution, etc.
void cinder::dx::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.
void cinder::dx::drawSolid | ( | const class Shape2d & | shape2d, |
float | approximationScale = 1.0f |
||
) |
Draws a solid (filled) Shape2d shape2d 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.
void cinder::dx::drawSolid | ( | const PolyLine2f & | polyLine | ) |
Draws a solid (filled) PolyLine2f polyLine. Performance warning: This routine tesselates the polygon into triangles. Consider using Triangulator directly.
void cinder::dx::draw | ( | const TriMesh2d & | mesh | ) |
Draws a cinder::TriMesh mesh at the origin.
void cinder::dx::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 cinder::TriMesh mesh at the origin.
void cinder::dx::draw | ( | const TriMesh & | mesh | ) |
Draws a cinder::TriMesh mesh at the origin.
void cinder::dx::drawRange | ( | const TriMesh & | mesh, |
size_t | startTriangle, | ||
size_t | triangleCount | ||
) |
Draws a range of triangles starting with triangle # startTriangle and a count of triangleCount from cinder::TriMesh mesh at the origin.
void cinder::dx::draw | ( | const VboMesh & | vbo | ) |
Draws a cinder::gl::VboMesh mesh at the origin.
void cinder::dx::drawRange | ( | const VboMesh & | vbo, |
size_t | startIndex, | ||
size_t | indexCount, | ||
int | vertexStart = -1 , |
||
int | vertexEnd = -1 |
||
) |
Draws a range of vertices and elements of cinder::gl::VboMesh mesh at the origin. Default parameters for vertexStart and vertexEnd imply the VboMesh's full range of vertices.
Draws a range of elements from a cinder::gl::VboMesh vbo.
void cinder::dx::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, rotated by rotationDegrees around the vector orthogonal to bbRight and bbUp.
void cinder::dx::draw | ( | const TextureRef & | texture | ) |
Draws texture on the XY-plane.
void cinder::dx::draw | ( | const TextureRef & | texture, |
const Vec2f & | pos | ||
) |
Draws texture on the XY-plane at pos.
void cinder::dx::draw | ( | const TextureRef & | texture, |
const Rectf & | rect | ||
) |
Draws texture on the XY-plane in the rectangle defined by rect.
void cinder::dx::draw | ( | const TextureRef & | texture, |
const Area & | srcArea, | ||
const Rectf & | destRect | ||
) |
Draws the pixels inside srcArea of texture on the XY-plane in the rectangle defined by destRect.
void cinder::dx::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 | ||
) |
Draws a bunch of textured triangles as specified by the function caller.
void cinder::dx::batchTextureBegin | ( | ) |
Sets the render state to batch texture draw calls until the end for optimal performance.
void cinder::dx::batchTextureEnd | ( | ) |
Draws all the batched textures.
void cinder::dx::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 style.
void cinder::dx::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 affect the style.
void cinder::dx::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 affect the style.
void cinder::dx::end | ( | ) |
void cinder::dx::vertex | ( | const Vec2f & | v | ) |
void cinder::dx::vertex | ( | float | x, |
float | y | ||
) |
void cinder::dx::vertex | ( | const Vec3f & | v | ) |
void cinder::dx::vertex | ( | float | x, |
float | y, | ||
float | z | ||
) |
void cinder::dx::texCoord | ( | float | x, |
float | y | ||
) |
void cinder::dx::texCoord | ( | const Vec2f & | v | ) |
void cinder::dx::texCoord | ( | float | x, |
float | y, | ||
float | z | ||
) |
void cinder::dx::texCoord | ( | const Vec3f & | v | ) |
void cinder::dx::enableWireframe | ( | ) |
void cinder::dx::disableWireframe | ( | ) |
void cinder::dx::draw | ( | const PolyLine< Vec2f > & | polyLine | ) |
void cinder::dx::draw | ( | const PolyLine< Vec3f > & | polyLine | ) |
void cinder::dx::draw | ( | const Path2d & | path2d, |
float | approximationScale | ||
) |
void cinder::dx::draw | ( | const Shape2d & | shape2d, |
float | approximationScale | ||
) |
void cinder::dx::drawSolid | ( | const Path2d & | path2d, |
float | approximationScale | ||
) |
void cinder::dx::drawSolid | ( | const Shape2d & | shape2d, |
float | approximationScale | ||
) |
set<Font::Glyph> cinder::dx::getNecessaryGlyphs | ( | const Font & | font, |
const string & | supportedChars | ||
) |