This documentation is automatically generated from the openFrameworks source code using doxygen and refers to the most recent release, version 0.12.0.
ofGLProgrammableRenderer.h
Go to the documentation of this file.
31 void draw(const ofMesh & vertexData, ofPolyRenderMode renderType, bool useColors, bool useTextures, bool useNormals) const;
36 void draw(const ofImage & image, float x, float y, float z, float w, float h, float sx, float sy, float sw, float sh) const;
37 void draw(const ofFloatImage & image, float x, float y, float z, float w, float h, float sx, float sy, float sw, float sh) const;
38 void draw(const ofShortImage & image, float x, float y, float z, float w, float h, float sx, float sy, float sw, float sh) const;
39 void draw(const ofTexture & image, float x, float y, float z, float w, float h, float sx, float sy, float sw, float sh) const;
43 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);
165 void drawTriangle(float x1, float y1, float z1, float x2, float y2, float z2, float x3, float y3, float z3) const;
325 //void setDefaultFramebufferId(const GLuint& fboId_); ///< windowing systems might use this to set the default framebuffer for this renderer.
328 //const GLuint& popFramebufferId(); /// returns topmost element in framebufferIdStack or 0, removes topmost element from stack.
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 ofGLProgrammableRenderer.h:17
void translate(float x, float y, float z=0)
Translate this renderer's current matrix by x, y, and z.
Definition ofGLProgrammableRenderer.cpp:699
void disableLighting()
Disable lighting with this renderer.
Definition ofGLProgrammableRenderer.cpp:1466
int getViewportWidth() const
Get the renderer's current viewport width.
Definition ofGLProgrammableRenderer.cpp:559
void setFillMode(ofFillFlag fill)
set this renderer's fill flag.
Definition ofGLProgrammableRenderer.cpp:961
void setPolyMode(ofPolyWindingMode mode)
Set this renderer's poly winding mode.
Definition ofGLProgrammableRenderer.cpp:676
std::string defaultFragmentShaderHeader(GLenum textureTarget)
Definition ofGLProgrammableRenderer.cpp:2461
void begin(const ofFbo &fbo, ofFboMode mode)
Begin using a frame buffer as this renderer's render surface.
Definition ofGLProgrammableRenderer.cpp:1325
void enableTextureTarget(const ofTexture &tex, int textureLocation)
Bind the texture at the texture location.
Definition ofGLProgrammableRenderer.cpp:1226
void loadMatrix(const glm::mat4 &m)
Load a matrix as this renderer's current matrix.
Definition ofGLProgrammableRenderer.cpp:749
void setLineWidth(float lineWidth)
Set the line width this renderer should use when drawing lines.
Definition ofGLProgrammableRenderer.cpp:1000
void enableSeparateSpecularLight()
Enable seperate specular lighting parameters.
Definition ofGLProgrammableRenderer.h:217
void multMatrix(const glm::mat4 &m)
Multiply this renderer's current matrix by m.
Definition ofGLProgrammableRenderer.cpp:760
bool isVFlipped() const
Returns true if the renderer's current viewport is vertically flipped.
Definition ofGLProgrammableRenderer.cpp:569
void bindForBlitting(const ofFbo &fboSrc, ofFbo &fboDst, int attachmentPoint)
Bind source and destination frame buffers for blitting.
Definition ofGLProgrammableRenderer.cpp:1370
void rotateRad(float radians, float vecX, float vecY, float vecZ)
Rotate this renderer's current matrix by degrees about a euler.
Definition ofGLProgrammableRenderer.cpp:711
void setColor(int r, int g, int b)
Set the global color this renderer will use when drawing.
Definition ofGLProgrammableRenderer.cpp:861
void disableLight(int lightIndex)
Disable a light at a specific index.
Definition ofGLProgrammableRenderer.cpp:1475
void setLightDiffuseColor(int lightIndex, const ofFloatColor &c)
Set the diffues light color for a light at a specific index.
Definition ofGLProgrammableRenderer.h:227
glm::mat4 getCurrentMatrix(ofMatrixMode matrixMode_) const
Queries the current OpenGL matrix state.
Definition ofGLProgrammableRenderer.cpp:828
void saveScreen(int x, int y, int w, int h, ofPixels &pixels)
Fill an ofPixels object with a subsection of the current screen.
Definition ofGLProgrammableRenderer.cpp:2720
void disableTextureTarget(int textureTarget, int textureLocation)
Unbind the texture target at the texture location.
Definition ofGLProgrammableRenderer.cpp:1245
void clear()
Clear this renderer's current color and bit depths.
Definition ofGLProgrammableRenderer.cpp:895
glm::mat4 getCurrentModelMatrix() const
Definition ofGLProgrammableRenderer.cpp:793
void setCircleResolution(int res)
Set the resolution to use when drawing ellipses with this renderer.
Definition ofGLProgrammableRenderer.cpp:665
void loadIdentityMatrix(void)
Load this renderer's identity matrix.
Definition ofGLProgrammableRenderer.cpp:743
void setLineSmoothing(bool smooth)
Enable/disable line smoothing for this renderer if it's supported.
Definition ofGLProgrammableRenderer.cpp:1024
void setLightSpotDirection(int lightIndex, const glm::vec4 &direction)
Set the spot direction of a light at a specific index.
Definition ofGLProgrammableRenderer.h:230
void startRender()
Starts using this renderer as the rendering surface.
Definition ofGLProgrammableRenderer.cpp:89
void drawString(std::string text, float x, float y, float z) const
Draw text with this renderer using the current bitmap text mode.
void enablePointSprites()
Enable point sprites when using this renderer.
Definition ofGLProgrammableRenderer.cpp:1082
bool getLightingEnabled()
Returns true if lighting is enabled with this renderer.
Definition ofGLProgrammableRenderer.cpp:1480
bool getBackgroundAuto()
Get the current auto redraw background setting for this renderer.
Definition ofGLProgrammableRenderer.cpp:924
void pushStyle()
Push this renderer's current style into its internal style stack.
Definition ofGLProgrammableRenderer.cpp:1137
void drawLine(float x1, float y1, float z1, float x2, float y2, float z2) const
Draw a line between two 3D points.
Definition ofGLProgrammableRenderer.cpp:1662
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 ofGLProgrammableRenderer.cpp:1702
void setLightAmbientColor(int lightIndex, const ofFloatColor &c)
Set the ambient light color for a light at a specific index.
Definition ofGLProgrammableRenderer.h:226
void setBlendMode(ofBlendMode blendMode)
Set this renderer's current blend mode.
Definition ofGLProgrammableRenderer.cpp:1039
void pushView()
Push the current viewport into the renderer's viewport stack.
Definition ofGLProgrammableRenderer.cpp:525
void setLightSpotConcentration(int lightIndex, float exponent)
Set the spotlight concentration (exponent) for a light at a specific index.
Definition ofGLProgrammableRenderer.h:224
const of3dGraphics & get3dGraphics() const
Get a const reference of this renderer's 3D graphics object.
Definition ofGLProgrammableRenderer.cpp:2819
void setLightPosition(int lightIndex, const glm::vec4 &position)
Set the position of a light at a specific index.
Definition ofGLProgrammableRenderer.h:229
void draw(const ofMesh &vertexData, ofPolyRenderMode renderType, bool useColors, bool useTextures, bool useNormals) const
Draw a mesh with this renderer.
Definition ofGLProgrammableRenderer.cpp:120
void clearAlpha()
Restore the alpha color to its full opacity value.
Definition ofGLProgrammableRenderer.cpp:911
ofColor getBackgroundColor()
Get this renderer's current background color.
Definition ofGLProgrammableRenderer.cpp:929
void unbind(const ofBaseMaterial &material)
Unbind a material previously bound to this renderer with bind().
Definition ofGLProgrammableRenderer.cpp:1434
ofPath & getPath()
Get a reference to the path used internally by this renderer.
Definition ofGLProgrammableRenderer.cpp:487
void setBackgroundAuto(bool bManual)
Enable/disable automatic redrawing of the background each frame.
Definition ofGLProgrammableRenderer.cpp:919
void disableAlphaMask()
Disable this renderer's current alpha mask texture.
Definition ofGLProgrammableRenderer.cpp:1279
void setup(int glVersionMajor, int glVersionMinor)
Definition ofGLProgrammableRenderer.cpp:2465
void drawCircle(float x, float y, float z, float radius) const
Draw a circle using a 3D point and a radius.
Definition ofGLProgrammableRenderer.cpp:1719
void saveFullViewport(ofPixels &pixels)
Fill an ofPixels object with the contents of the current screen.
Definition ofGLProgrammableRenderer.cpp:2715
void setStyle(const ofStyle &style)
Set this renderer's current style object.
Definition ofGLProgrammableRenderer.cpp:1154
glm::mat4 getCurrentOrientationMatrix() const
Get this renderer's current orientation matrix.
Definition ofGLProgrammableRenderer.cpp:847
ofRectangle getCurrentViewport() const
Get this renderer's current viewport.
Definition ofGLProgrammableRenderer.cpp:549
ofRectangle getNativeViewport() const
Get this renderer's current native viewport.
Definition ofGLProgrammableRenderer.cpp:554
void enableAntiAliasing()
Enable this renderer to use anti-aliasing if it is supported.
Definition ofGLProgrammableRenderer.cpp:1105
int getGLVersionMajor()
Get the major OpenGL version number this renderer is using.
Definition ofGLProgrammableRenderer.cpp:2706
void setHexColor(int hexColor)
Set the global color this renderer will use when drawing.
Definition ofGLProgrammableRenderer.cpp:882
void setRectMode(ofRectMode mode)
Set this renderer's rect mode.
Definition ofGLProgrammableRenderer.cpp:990
glm::mat4 getCurrentViewMatrix() const
Get this renderer's current view matrix.
Definition ofGLProgrammableRenderer.cpp:783
void drawInstanced(const ofVbo &vbo, GLuint drawMode, int first, int total, int primCount) const
Draw vertices from a vertext buffer using instanced arrays.
Definition ofGLProgrammableRenderer.cpp:451
void background(const ofColor &c)
Immediately paint a background color to the screen.
Definition ofGLProgrammableRenderer.cpp:940
int getGLVersionMinor()
Get the minor OpenGL version number this renderer is using.
Definition ofGLProgrammableRenderer.cpp:2710
void drawElementsInstanced(const ofVbo &vbo, GLuint drawMode, int amt, int primCount) const
Draw vertices from a vertex buffer using this renderer.
Definition ofGLProgrammableRenderer.cpp:469
void end(const ofFbo &fbo)
Stop using the specified frame buffer as this renderer's render surface.
Definition ofGLProgrammableRenderer.cpp:1343
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 ofGLProgrammableRenderer.cpp:591
void setLightSpecularColor(int lightIndex, const ofFloatColor &c)
Set the specular light color for a light at a specific index.
Definition ofGLProgrammableRenderer.h:228
void setDepthTest(bool depthTest)
Enable/disable depth testing with this renderer.
Definition ofGLProgrammableRenderer.cpp:1015
const ofShader & getCurrentShader() const
Definition ofGLProgrammableRenderer.cpp:1119
void bind(const ofBaseMaterial &material)
Bind a material to be used with this renderer.
Definition ofGLProgrammableRenderer.cpp:1404
void pushMatrix()
Pushes this renderer's matrix stack down by one.
Definition ofGLProgrammableRenderer.cpp:683
void viewport(ofRectangle viewport)
Set this renderer's viewport using a rectangle.
Definition ofGLProgrammableRenderer.cpp:537
ofFillFlag getFillMode()
Get this renderer's current fill flag.
Definition ofGLProgrammableRenderer.cpp:981
void multViewMatrix(const glm::mat4 &m)
Multiply this renderer's view matrix by m.
Definition ofGLProgrammableRenderer.cpp:777
void drawElements(const ofVbo &vbo, GLuint drawMode, int amt, int offsetelements=0) const
Draw vertices from a vertext buffer with this renderer.
Definition ofGLProgrammableRenderer.cpp:437
void drawString(const ofTrueTypeFont &font, std::string text, float x, float y) const
Draw text with this renderer using an ofTrueType font.
void rotateZRad(float radians)
Rotate this renderer's current matrix by degrees about the z axis.
Definition ofGLProgrammableRenderer.cpp:727
void setupScreen()
setup the default screen settings for this renderer.
Definition ofGLProgrammableRenderer.cpp:659
ofRectMode getRectMode()
Get this renderer's current rect mode.
Definition ofGLProgrammableRenderer.cpp:995
void loadViewMatrix(const glm::mat4 &m)
Load m into this renderer's matrix stack as a view matrix.
Definition ofGLProgrammableRenderer.cpp:771
void rotateYRad(float radians)
Rotate this renderer's current matrix by degrees about the y axis.
Definition ofGLProgrammableRenderer.cpp:722
void setBackgroundColor(const ofColor &c)
Set this renderer's background color.
Definition ofGLProgrammableRenderer.cpp:934
void setAlphaMaskTex(const ofTexture &tex)
Enable alpha masking using this texture as the mask source.
Definition ofGLProgrammableRenderer.cpp:1268
GLenum getCurrentTextureTarget()
Definition ofGLProgrammableRenderer.cpp:1263
void popView()
Pop the current viewport from the renderer's view stack.
Definition ofGLProgrammableRenderer.cpp:530
void setLightAttenuation(int lightIndex, float constant, float linear, float quadratic)
Set the light attenuation for a light at a specific index.
Definition ofGLProgrammableRenderer.h:225
void setCoordHandedness(ofHandednessType handedness)
Set the coordinate handidness of this renderer.
Definition ofGLProgrammableRenderer.cpp:574
const ofShader * getVideoShader(const ofBaseVideoDraws &video) const
Definition ofGLProgrammableRenderer.cpp:2565
void matrixMode(ofMatrixMode mode)
Sets this renderer's current matrix mode.
Definition ofGLProgrammableRenderer.cpp:738
void popMatrix()
Pops this renderer's current matrix stack.
Definition ofGLProgrammableRenderer.cpp:688
void setVideoShaderUniforms(const ofBaseVideoDraws &video, const ofShader &shader) const
Definition ofGLProgrammableRenderer.cpp:2635
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 ofGLProgrammableRenderer.cpp:1677
int getViewportHeight() const
Get the renderer's current viewport width.
Definition ofGLProgrammableRenderer.cpp:564
void setSmoothLighting(bool b)
Enable/disable smooth light shading.
Definition ofGLProgrammableRenderer.h:219
glm::vec3 getCurrentEyePosition() const
Definition ofGLProgrammableRenderer.cpp:798
void disableSeparateSpecularLight()
Disable seperate specular lighting parameters.
Definition ofGLProgrammableRenderer.h:218
void finishRender()
Stop using this renderer as the rendering surface.
Definition ofGLProgrammableRenderer.cpp:110
void disablePointSprites()
Disable point sprites when using this renderer.
Definition ofGLProgrammableRenderer.cpp:1093
glm::mat4 getCurrentNormalMatrix() const
Get this renderer's current normal matrix.
Definition ofGLProgrammableRenderer.cpp:788
void setLightSpotlightCutOff(int lightIndex, float spotCutOff)
Set the spot light cutoff for a light at a specific index.
Definition ofGLProgrammableRenderer.h:223
void enableLight(int lightIndex)
Enable a light at a specific index.
Definition ofGLProgrammableRenderer.cpp:1470
void setBitmapTextMode(ofDrawBitmapMode mode)
Set this renderer's bitmap text mode.
Definition ofGLProgrammableRenderer.cpp:890
void scale(float xAmnt, float yAmnt, float zAmnt=1)
Scale this renderer's current matrix by xAmnt, yAmnt, and zAmnt.
Definition ofGLProgrammableRenderer.cpp:705
void setupScreenOrtho(float width=-1, float height=-1, float nearDist=-1, float farDist=1)
Setup the renderer to use an orthographic matrix.
Definition ofGLProgrammableRenderer.cpp:627
void setupGraphicDefaults()
setup the default graphics settings for this renderer.
Definition ofGLProgrammableRenderer.cpp:652
ofHandednessType getCoordHandedness() const
Get the coordinate handidness of this renderer.
Definition ofGLProgrammableRenderer.cpp:579
void rotateXRad(float radians)
Rotate this renderer's current matrix by degrees about the x axis.
Definition ofGLProgrammableRenderer.cpp:717
const std::string & getType()
Get the string representation of the renderer type.
Definition ofGLProgrammableRenderer.h:24
void setGlobalAmbientColor(const ofColor &c)
Set the global ambient light color.
Definition ofGLProgrammableRenderer.h:220
void enableLighting()
Enable lighting with this renderer.
Definition ofGLProgrammableRenderer.cpp:1461
void setOrientation(ofOrientation orientation, bool vFlip)
set this renderer's orientation.
Definition ofGLProgrammableRenderer.cpp:584
void drawEllipse(float x, float y, float z, float width, float height) const
Draw an ellipse using a 3D point, width, and height.
Definition ofGLProgrammableRenderer.cpp:1737
std::string defaultVertexShaderHeader(GLenum textureTarget)
Definition ofGLProgrammableRenderer.cpp:2457
ofStyle getStyle() const
Get this renderer's current style object.
Definition ofGLProgrammableRenderer.cpp:1133
void setCurveResolution(int resolution)
Set the resolution used when drawing curves with this renderer.
Definition ofGLProgrammableRenderer.cpp:1198
void popStyle()
Pop this renderer's current style from its internal style stack.
Definition ofGLProgrammableRenderer.cpp:1147
void disableAntiAliasing()
Disable this renderer from using anti-aliasing.
Definition ofGLProgrammableRenderer.cpp:1112
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