This documentation is automatically generated from the openFrameworks source code using doxygen and refers to the most recent release, version 0.12.0.
ofGLRenderer.h
Go to the documentation of this file.
30 void draw(const ofMesh & vertexData, ofPolyRenderMode renderType, bool useColors, bool useTextures, bool useNormals) const;
35 void draw(const ofImage & image, float x, float y, float z, float w, float h, float sx, float sy, float sw, float sh) const;
36 void draw(const ofFloatImage & image, float x, float y, float z, float w, float h, float sx, float sy, float sw, float sh) const;
37 void draw(const ofShortImage & image, float x, float y, float z, float w, float h, float sx, float sy, float sw, float sh) const;
38 void draw(const ofTexture & image, float x, float y, float z, float w, float h, float sx, float sy, float sw, float sh) const;
42 void drawInstanced(const ofVbo & vbo, GLuint drawMode, int first, int total, int primCount) const;
61 void setupScreenPerspective(float width = -1, float height = -1, float fov = 60, float nearDist = 0, float farDist = 0);
62 void setupScreenOrtho(float width = -1, float height = -1, float nearDist = -1, float farDist = 1);
159 void drawTriangle(float x1, float y1, float z1, float x2, float y2, float z2, float x3, float y3, float z3) const;
Definition of3dGraphics.h:445
Definition ofAppBaseWindow.h:21
Definition ofGLBaseTypes.h:95
virtual void draw(const ofTexture &image, float x, float y, float z, float w, float h, float sx, float sy, float sw, float sh) const =0
Draw a texture with this renderer.
material parameter properties that can be applied to vertices in the OpenGL lighting model used in de...
Definition ofMaterialBaseTypes.h:41
virtual void draw(const ofPolyline &poly) const =0
Draw a polyline with this renderer.
Definition ofBitmapFont.h:19
Definition ofFbo.h:46
Definition ofGLRenderer.h:15
void disableLight(int lightIndex)
Disable a light at a specific index.
Definition ofGLRenderer.cpp:1833
void enableLight(int lightIndex)
Enable a light at a specific index.
Definition ofGLRenderer.cpp:1827
void setAlphaMaskTex(const ofTexture &tex)
Enable alpha masking using this texture as the mask source.
Definition ofGLRenderer.cpp:1746
void rotateYRad(float radians)
Rotate this renderer's current matrix by degrees about the y axis.
Definition ofGLRenderer.cpp:910
void disableAlphaMask()
Disable this renderer's current alpha mask texture.
Definition ofGLRenderer.cpp:1752
void setBackgroundAuto(bool bManual)
Enable/disable automatic redrawing of the background each frame.
Definition ofGLRenderer.cpp:1120
void drawTriangle(float x1, float y1, float z1, float x2, float y2, float z2, float x3, float y3, float z3) const
Draw a triangle using three 3D points.
Definition ofGLRenderer.cpp:1468
void setCircleResolution(int res)
Set the resolution to use when drawing ellipses with this renderer.
Definition ofGLRenderer.cpp:832
int getViewportWidth() const
Get the renderer's current viewport width.
Definition ofGLRenderer.cpp:724
void disableTextureTarget(int textureTarget, int textureLocation)
Unbind the texture target at the texture location.
Definition ofGLRenderer.cpp:1737
void drawRectangle(float x, float y, float z, float w, float h) const
Draw a rectangle using a 3D point and a width and height.
Definition ofGLRenderer.cpp:1441
void popStyle()
Pop this renderer's current style from its internal style stack.
Definition ofGLRenderer.cpp:1328
void saveScreen(int x, int y, int w, int h, ofPixels &pixels)
Fill an ofPixels object with a subsection of the current screen.
Definition ofGLRenderer.cpp:1926
void rotateXDeg(float radians)
Rotate this renderer's current matrix by degrees about the x axis.
Definition ofGLRenderer.cpp:879
void end(const ofFbo &fbo)
Stop using the specified frame buffer as this renderer's render surface.
Definition ofGLRenderer.cpp:488
void setDepthTest(bool depthTest)
Enable/disable depth testing with this renderer.
Definition ofGLRenderer.cpp:1210
ofStyle getStyle() const
Get this renderer's current style object.
Definition ofGLRenderer.cpp:1312
void begin(const ofFbo &fbo, ofFboMode mode)
Begin using a frame buffer as this renderer's render surface.
Definition ofGLRenderer.cpp:462
void enableSeparateSpecularLight()
Enable seperate specular lighting parameters.
Definition ofGLRenderer.cpp:1796
void drawElementsInstanced(const ofVbo &vbo, GLuint drawMode, int amt, int primCount) const
Draw vertices from a vertex buffer using this renderer.
Definition ofGLRenderer.cpp:416
glm::mat4 getCurrentNormalMatrix() const
Get this renderer's current normal matrix.
Definition ofGLRenderer.cpp:1043
bool isVFlipped() const
Returns true if the renderer's current viewport is vertically flipped.
Definition ofGLRenderer.cpp:749
void setLineWidth(float lineWidth)
Set the line width this renderer should use when drawing lines.
Definition ofGLRenderer.cpp:1201
void setOrientation(ofOrientation orientation, bool vFlip)
set this renderer's orientation.
Definition ofGLRenderer.cpp:744
int getViewportHeight() const
Get the renderer's current viewport width.
Definition ofGLRenderer.cpp:729
void setCurveResolution(int resolution)
Set the resolution used when drawing curves with this renderer.
Definition ofGLRenderer.cpp:1380
void pushView()
Push the current viewport into the renderer's viewport stack.
Definition ofGLRenderer.cpp:658
bool getLightingEnabled()
Returns true if lighting is enabled with this renderer.
Definition ofGLRenderer.cpp:1810
void setColor(int r, int g, int b)
Set the global color this renderer will use when drawing.
Definition ofGLRenderer.cpp:1058
void rotateXRad(float radians)
Rotate this renderer's current matrix by degrees about the x axis.
Definition ofGLRenderer.cpp:905
void enableTextureTarget(const ofTexture &tex, int textureLocation)
Bind the texture at the texture location.
Definition ofGLRenderer.cpp:1723
void drawCircle(float x, float y, float z, float radius) const
Draw a circle using a 3D point and a radius.
Definition ofGLRenderer.cpp:1486
void multViewMatrix(const glm::mat4 &m)
Multiply this renderer's view matrix by m.
Definition ofGLRenderer.cpp:1033
void setCoordHandedness(ofHandednessType handedness)
Set the coordinate handidness of this renderer.
Definition ofGLRenderer.cpp:734
glm::mat4 getCurrentMatrix(ofMatrixMode matrixMode_) const
Queries the current OpenGL matrix state @detail Returns the specified matrix as held by the renderer'...
Definition ofGLRenderer.cpp:965
void loadMatrix(const glm::mat4 &m)
Load a matrix as this renderer's current matrix.
Definition ofGLRenderer.cpp:937
void setBackgroundColor(const ofColor &c)
Set this renderer's background color.
Definition ofGLRenderer.cpp:1135
void rotateYDeg(float radians)
Rotate this renderer's current matrix by degrees about the y axis.
Definition ofGLRenderer.cpp:884
void drawEllipse(float x, float y, float z, float width, float height) const
Draw an ellipse using a 3D point, width, and height.
Definition ofGLRenderer.cpp:1505
void clear()
Clear this renderer's current color and bit depths.
Definition ofGLRenderer.cpp:1096
void viewport(ofRectangle viewport)
Set this renderer's viewport using a rectangle.
Definition ofGLRenderer.cpp:695
bool getBackgroundAuto()
Get the current auto redraw background setting for this renderer.
Definition ofGLRenderer.cpp:1125
void drawInstanced(const ofVbo &vbo, GLuint drawMode, int first, int total, int primCount) const
Draw vertices from a vertext buffer using instanced arrays.
Definition ofGLRenderer.cpp:399
void popView()
Pop the current viewport from the renderer's view stack.
Definition ofGLRenderer.cpp:677
glm::mat4 getCurrentOrientationMatrix() const
Get this renderer's current orientation matrix.
Definition ofGLRenderer.cpp:985
void popMatrix()
Pops this renderer's current matrix stack.
Definition ofGLRenderer.cpp:854
void bindForBlitting(const ofFbo &fboSrc, ofFbo &fboDst, int attachmentPoint)
Bind source and destination frame buffers for blitting.
Definition ofGLRenderer.cpp:514
void enableLighting()
Enable lighting with this renderer.
Definition ofGLRenderer.cpp:1757
void disableSeparateSpecularLight()
Disable seperate specular lighting parameters.
Definition ofGLRenderer.cpp:1803
void setGlobalAmbientColor(const ofColor &c)
Set the global ambient light color.
Definition ofGLRenderer.cpp:1821
int getGLVersionMajor()
Get the major OpenGL version number this renderer is using.
Definition ofGLRenderer.cpp:1902
void draw(const ofMesh &vertexData, ofPolyRenderMode renderType, bool useColors, bool useTextures, bool useNormals) const
Draw a mesh with this renderer.
Definition ofGLRenderer.cpp:85
void scale(float xAmnt, float yAmnt, float zAmnt=1)
Scale this renderer's current matrix by xAmnt, yAmnt, and zAmnt.
Definition ofGLRenderer.cpp:869
ofRectangle getCurrentViewport() const
Get this renderer's current viewport.
Definition ofGLRenderer.cpp:707
void setupGraphicDefaults()
setup the default graphics settings for this renderer.
Definition ofGLRenderer.cpp:816
void loadViewMatrix(const glm::mat4 &m)
Load m into this renderer's matrix stack as a view matrix.
Definition ofGLRenderer.cpp:1011
void drawElements(const ofVbo &vbo, GLuint drawMode, int amt, int offsetelements=0) const
Draw vertices from a vertext buffer with this renderer.
Definition ofGLRenderer.cpp:386
void disableLighting()
Disable lighting with this renderer.
Definition ofGLRenderer.cpp:1787
const of3dGraphics & get3dGraphics() const
Get a const reference of this renderer's 3D graphics object.
Definition ofGLRenderer.cpp:2012
void setLightSpotConcentration(int lightIndex, float exponent)
Set the spotlight concentration (exponent) for a light at a specific index.
Definition ofGLRenderer.cpp:1845
void unbind(const ofBaseVideoDraws &video)
Unbind a video previously bound to this renderer with bind().
Definition ofGLRenderer.cpp:445
void enablePointSprites()
Enable point sprites when using this renderer.
Definition ofGLRenderer.cpp:1386
void setBitmapTextMode(ofDrawBitmapMode mode)
Set this renderer's bitmap text mode.
Definition ofGLRenderer.cpp:1307
void setupScreenOrtho(float width=-1, float height=-1, float nearDist=-1, float farDist=1)
Setup the renderer to use an orthographic matrix.
Definition ofGLRenderer.cpp:792
ofRectMode getRectMode()
Get this renderer's current rect mode.
Definition ofGLRenderer.cpp:1196
void loadIdentityMatrix(void)
Load this renderer's identity matrix.
Definition ofGLRenderer.cpp:932
void setLightAttenuation(int lightIndex, float constant, float linear, float quadratic)
Set the light attenuation for a light at a specific index.
Definition ofGLRenderer.cpp:1850
void finishRender()
Stop using this renderer as the rendering surface.
Definition ofGLRenderer.cpp:79
void setSmoothLighting(bool b)
Enable/disable smooth light shading.
Definition ofGLRenderer.cpp:1815
void rotateRad(float radians, float vecX, float vecY, float vecZ)
Rotate this renderer's current matrix by degrees about a euler.
Definition ofGLRenderer.cpp:900
glm::mat4 getCurrentViewMatrix() const
Get this renderer's current view matrix.
Definition ofGLRenderer.cpp:1038
void clearAlpha()
Restore the alpha color to its full opacity value.
Definition ofGLRenderer.cpp:1112
void setLightSpotlightCutOff(int lightIndex, float spotCutOff)
Set the spot light cutoff for a light at a specific index.
Definition ofGLRenderer.cpp:1840
void pushMatrix()
Pushes this renderer's matrix stack down by one.
Definition ofGLRenderer.cpp:849
void setLightSpotDirection(int lightIndex, const glm::vec4 &direction)
Set the spot direction of a light at a specific index.
Definition ofGLRenderer.cpp:1889
int getGLVersionMinor()
Get the minor OpenGL version number this renderer is using.
Definition ofGLRenderer.cpp:1911
void setFillMode(ofFillFlag fill)
set this renderer's fill flag.
Definition ofGLRenderer.cpp:1162
const std::string & getType()
Get the string representation of the renderer type.
Definition ofGLRenderer.h:21
void startRender()
Starts using this renderer as the rendering surface.
Definition ofGLRenderer.cpp:60
ofPath & getPath()
Get a reference to the path used internally by this renderer.
Definition ofGLRenderer.cpp:433
ofColor getBackgroundColor()
Get this renderer's current background color.
Definition ofGLRenderer.cpp:1130
void disablePointSprites()
Disable point sprites when using this renderer.
Definition ofGLRenderer.cpp:1404
void bind(const ofBaseVideoDraws &video)
Bind a video's texture to this renderer.
Definition ofGLRenderer.cpp:438
void setupScreenPerspective(float width=-1, float height=-1, float fov=60, float nearDist=0, float farDist=0)
Setup the renderer to use a perspective matrix.
Definition ofGLRenderer.cpp:759
void setStyle(const ofStyle &style)
Set this renderer's current style object.
Definition ofGLRenderer.cpp:1336
void setLightDiffuseColor(int lightIndex, const ofFloatColor &c)
Set the diffues light color for a light at a specific index.
Definition ofGLRenderer.cpp:1864
void setBlendMode(ofBlendMode blendMode)
Set this renderer's current blend mode.
Definition ofGLRenderer.cpp:1247
void pushStyle()
Push this renderer's current style into its internal style stack.
Definition ofGLRenderer.cpp:1317
void rotateZDeg(float radians)
Rotate this renderer's current matrix by degrees about the z axis.
Definition ofGLRenderer.cpp:889
void setPolyMode(ofPolyWindingMode mode)
Set this renderer's poly winding mode.
Definition ofGLRenderer.cpp:842
void setLightAmbientColor(int lightIndex, const ofFloatColor &c)
Set the ambient light color for a light at a specific index.
Definition ofGLRenderer.cpp:1858
void translate(float x, float y, float z=0)
Translate this renderer's current matrix by x, y, and z.
Definition ofGLRenderer.cpp:864
void setHexColor(int hexColor)
Set the global color this renderer will use when drawing.
Definition ofGLRenderer.cpp:1088
void setRectMode(ofRectMode mode)
Set this renderer's rect mode.
Definition ofGLRenderer.cpp:1191
void enableAntiAliasing()
Enable this renderer to use anti-aliasing if it is supported.
Definition ofGLRenderer.cpp:1414
void setupScreen()
setup the default screen settings for this renderer.
Definition ofGLRenderer.cpp:827
void drawString(std::string text, float x, float y, float z) const
Draw text with this renderer using the current bitmap text mode.
Definition ofGLRenderer.cpp:1526
void rotateDeg(float radians, float vecX, float vecY, float vecZ)
Rotate this renderer's current matrix by degrees about a euler.
Definition ofGLRenderer.cpp:874
void disableAntiAliasing()
Disable this renderer from using anti-aliasing.
Definition ofGLRenderer.cpp:1419
ofFillFlag getFillMode()
Get this renderer's current fill flag.
Definition ofGLRenderer.cpp:1182
ofRectangle getNativeViewport() const
Get this renderer's current native viewport.
Definition ofGLRenderer.cpp:713
void setLightSpecularColor(int lightIndex, const ofFloatColor &c)
Set the specular light color for a light at a specific index.
Definition ofGLRenderer.cpp:1870
ofHandednessType getCoordHandedness() const
Get the coordinate handidness of this renderer.
Definition ofGLRenderer.cpp:739
void rotateZRad(float radians)
Rotate this renderer's current matrix by degrees about the z axis.
Definition ofGLRenderer.cpp:915
void drawLine(float x1, float y1, float z1, float x2, float y2, float z2) const
Draw a line between two 3D points.
Definition ofGLRenderer.cpp:1424
void background(const ofColor &c)
Immediately paint a background color to the screen.
Definition ofGLRenderer.cpp:1141
void setLineSmoothing(bool smooth)
Enable/disable line smoothing for this renderer if it's supported.
Definition ofGLRenderer.cpp:1219
void multMatrix(const glm::mat4 &m)
Multiply this renderer's current matrix by m.
Definition ofGLRenderer.cpp:990
void setLightPosition(int lightIndex, const glm::vec4 &position)
Set the position of a light at a specific index.
Definition ofGLRenderer.cpp:1876
void saveFullViewport(ofPixels &pixels)
Fill an ofPixels object with the contents of the current screen.
Definition ofGLRenderer.cpp:1920
void matrixMode(ofMatrixMode mode)
Sets this renderer's current matrix mode.
Definition ofGLRenderer.cpp:926
Definition ofMatrixStack.h:22
A generic 3d object in space with transformation (position, rotation, scale).
Definition ofNode.h:14
ofPath is a way to create a path or multiple paths consisting of points. It allows you to combine mul...
Definition ofPath.h:38
Definition ofShader.h:35
Definition ofShadow.h:24
Contains general information about the style of ofGraphics elements such as color,...
Definition ofGraphicsBaseTypes.h:51
Definition ofTrueTypeFont.h:164
Definition ofVbo.h:21
Definition ofVboMesh.h:6
ofDrawBitmapMode
Sets the bitmap drawing mode for text.
Definition ofGraphicsConstants.h:125
ofMatrixMode
represents the available matrix types used internally in ofMatrixStack.
Definition ofGraphicsConstants.h:119
ofHandednessType
represents the available matrix coordinate system handednesses.
Definition ofGraphicsConstants.h:116
ofRectMode
Used to represent the available rectangle drawing modes.
Definition ofGraphicsConstants.h:139
ofBlendMode
Used to represent the available blending modes for drawing.
Definition ofGraphicsConstants.h:57
ofPolyWindingMode
represents the available polygon winding modes.
Definition ofGraphicsConstants.h:97
#define a
#define c
#define b
ofOrientation
Used to represent the available screen orientations.
Definition ofWindowSettings.h:25