This documentation is automatically generated from the openFrameworks source code using doxygen and refers to the most recent release, version 0.12.0.
#include <ofGLProgrammableRenderer.h>

Public Member Functions | |
ofGLProgrammableRenderer (const ofAppBaseWindow *window) | |
void | setup (int glVersionMajor, int glVersionMinor) |
const std::string & | getType () |
Get the string representation of the renderer type. | |
void | startRender () |
Starts using this renderer as the rendering surface. | |
void | finishRender () |
Stop using this renderer as the rendering surface. | |
void | draw (const ofMesh &vertexData, ofPolyRenderMode renderType, bool useColors, bool useTextures, bool useNormals) const |
Draw a mesh with this renderer. | |
void | draw (const of3dPrimitive &model, ofPolyRenderMode renderType) const |
Draw a model with this renderer using the renderType . | |
void | draw (const ofNode &node) const |
Draw a node with this renderer using ofNode::customDraw(). | |
void | draw (const ofPolyline &poly) const |
Draw a polyline with this renderer. | |
void | draw (const ofPath &path) const |
Draw a path with this renderer. | |
void | draw (const ofImage &image, float x, float y, float z, float w, float h, float sx, float sy, float sw, float sh) const |
Draw an image with this renderer. | |
void | draw (const ofFloatImage &image, float x, float y, float z, float w, float h, float sx, float sy, float sw, float sh) const |
Draw an image with this renderer. | |
void | draw (const ofShortImage &image, float x, float y, float z, float w, float h, float sx, float sy, float sw, float sh) const |
Draw an image with this renderer. | |
void | draw (const ofTexture &image, float x, float y, float z, float w, float h, float sx, float sy, float sw, float sh) const |
Draw a texture with this renderer. | |
void | draw (const ofBaseVideoDraws &video, float x, float y, float w, float h) const |
Draw a video with this renderer. | |
void | draw (const ofVbo &vbo, GLuint drawMode, int first, int total) const |
Draw vertices from a vertext buffer with this renderer. | |
void | drawElements (const ofVbo &vbo, GLuint drawMode, int amt, int offsetelements=0) const |
Draw vertices from a vertext buffer with this renderer. | |
void | drawInstanced (const ofVbo &vbo, GLuint drawMode, int first, int total, int primCount) const |
Draw vertices from a vertext buffer using instanced arrays. | |
void | drawElementsInstanced (const ofVbo &vbo, GLuint drawMode, int amt, int primCount) const |
Draw vertices from a vertex buffer using this renderer. | |
void | draw (const ofVboMesh &mesh, ofPolyRenderMode renderType) const |
Draw a vertex buffer mesh using a specific poly render mode. | |
void | drawInstanced (const ofVboMesh &mesh, ofPolyRenderMode renderType, int primCount) const |
Draw a vertex buffer mesh with instancing using a specific poly render mode. | |
ofPath & | getPath () |
Get a reference to the path used internally by this renderer. | |
void | pushView () |
Push the current viewport into the renderer's viewport stack. | |
void | popView () |
Pop the current viewport from the renderer's view stack. | |
void | viewport (ofRectangle viewport) |
Set this renderer's viewport using a rectangle. | |
void | viewport (float x=0, float y=0, float width=-1, float height=-1, bool vflip=true) |
Set this renderer's viewport manually using x, y, width, and height. | |
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. | |
void | setupScreenOrtho (float width=-1, float height=-1, float nearDist=-1, float farDist=1) |
Setup the renderer to use an orthographic matrix. | |
void | setOrientation (ofOrientation orientation, bool vFlip) |
set this renderer's orientation. | |
ofRectangle | getCurrentViewport () const |
Get this renderer's current viewport. | |
ofRectangle | getNativeViewport () const |
Get this renderer's current native viewport. | |
int | getViewportWidth () const |
Get the renderer's current viewport width. | |
int | getViewportHeight () const |
Get the renderer's current viewport width. | |
bool | isVFlipped () const |
Returns true if the renderer's current viewport is vertically flipped. | |
void | setCoordHandedness (ofHandednessType handedness) |
Set the coordinate handidness of this renderer. | |
ofHandednessType | getCoordHandedness () const |
Get the coordinate handidness of this renderer. | |
void | pushMatrix () |
Pushes this renderer's matrix stack down by one. | |
void | popMatrix () |
Pops this renderer's current matrix stack. | |
void | translate (float x, float y, float z=0) |
Translate this renderer's current matrix by x, y, and z. | |
void | translate (const glm::vec3 &p) |
Translate this renderer's current matrix by a point. | |
void | scale (float xAmnt, float yAmnt, float zAmnt=1) |
Scale this renderer's current matrix by xAmnt, yAmnt, and zAmnt. | |
void | rotateRad (float radians, float vecX, float vecY, float vecZ) |
Rotate this renderer's current matrix by degrees about a euler. | |
void | rotateXRad (float radians) |
Rotate this renderer's current matrix by degrees about the x axis. | |
void | rotateYRad (float radians) |
Rotate this renderer's current matrix by degrees about the y axis. | |
void | rotateZRad (float radians) |
Rotate this renderer's current matrix by degrees about the z axis. | |
void | rotateRad (float radians) |
Rotate this renderer's current matrix by degrees about the z axis. | |
void | matrixMode (ofMatrixMode mode) |
Sets this renderer's current matrix mode. | |
void | loadIdentityMatrix (void) |
Load this renderer's identity matrix. | |
void | loadMatrix (const glm::mat4 &m) |
Load a matrix as this renderer's current matrix. | |
void | loadMatrix (const float *m) |
Load m as this renderer's current matrix. | |
void | multMatrix (const glm::mat4 &m) |
Multiply this renderer's current matrix by m . | |
void | multMatrix (const float *m) |
Multiply this renderer's current matrix by m . | |
void | loadViewMatrix (const glm::mat4 &m) |
Load m into this renderer's matrix stack as a view matrix. | |
void | multViewMatrix (const glm::mat4 &m) |
Multiply this renderer's view matrix by m . | |
glm::mat4 | getCurrentMatrix (ofMatrixMode matrixMode_) const |
Queries the current OpenGL matrix state. | |
glm::mat4 | getCurrentOrientationMatrix () const |
Get this renderer's current orientation matrix. | |
glm::mat4 | getCurrentViewMatrix () const |
Get this renderer's current view matrix. | |
glm::mat4 | getCurrentNormalMatrix () const |
Get this renderer's current normal matrix. | |
glm::mat4 | getCurrentModelMatrix () const |
glm::vec3 | getCurrentEyePosition () const |
void | setupGraphicDefaults () |
setup the default graphics settings for this renderer. | |
void | setupScreen () |
setup the default screen settings for this renderer. | |
void | setFillMode (ofFillFlag fill) |
set this renderer's fill flag. | |
ofFillFlag | getFillMode () |
Get this renderer's current fill flag. | |
void | setCircleResolution (int res) |
Set the resolution to use when drawing ellipses with this renderer. | |
void | setRectMode (ofRectMode mode) |
Set this renderer's rect mode. | |
ofRectMode | getRectMode () |
Get this renderer's current rect mode. | |
void | setLineWidth (float lineWidth) |
Set the line width this renderer should use when drawing lines. | |
void | setDepthTest (bool depthTest) |
Enable/disable depth testing with this renderer. | |
void | setLineSmoothing (bool smooth) |
Enable/disable line smoothing for this renderer if it's supported. | |
void | setBlendMode (ofBlendMode blendMode) |
Set this renderer's current blend mode. | |
void | enablePointSprites () |
Enable point sprites when using this renderer. | |
void | disablePointSprites () |
Disable point sprites when using this renderer. | |
void | enableAntiAliasing () |
Enable this renderer to use anti-aliasing if it is supported. | |
void | disableAntiAliasing () |
Disable this renderer from using anti-aliasing. | |
void | setColor (int r, int g, int b) |
Set the global color this renderer will use when drawing. | |
void | setColor (int r, int g, int b, int a) |
Set the global color this renderer will use when drawing. | |
void | setColor (const ofColor &color) |
Set the global color this renderer will use when drawing. | |
void | setColor (const ofColor &color, int _a) |
Set the global color this renderer will use when drawing. | |
void | setColor (int gray) |
Set the global color this renderer will use when drawing. | |
void | setHexColor (int hexColor) |
Set the global color this renderer will use when drawing. | |
void | setBitmapTextMode (ofDrawBitmapMode mode) |
Set this renderer's bitmap text mode. | |
ofColor | getBackgroundColor () |
Get this renderer's current background color. | |
void | setBackgroundColor (const ofColor &c) |
Set this renderer's background color. | |
void | background (const ofColor &c) |
Immediately paint a background color to the screen. | |
void | background (float brightness) |
Immediately paint a grayscale background color to the screen. | |
void | background (int hexColor, float _a=255.0f) |
Immediately paint a grayscale background color to the screen. | |
void | background (int r, int g, int b, int a=255) |
Immediately paint a background color to the screen. | |
bool | getBackgroundAuto () |
Get the current auto redraw background setting for this renderer. | |
void | setBackgroundAuto (bool bManual) |
Enable/disable automatic redrawing of the background each frame. | |
void | clear () |
Clear this renderer's current color and bit depths. | |
void | clear (float r, float g, float b, float a=0) |
Clear this renderer's color and bit depths and replace them. | |
void | clear (float brightness, float a=0) |
Clear this renderer's color and bit depths replacing them. | |
void | clearAlpha () |
Restore the alpha color to its full opacity value. | |
void | drawLine (float x1, float y1, float z1, float x2, float y2, float z2) const |
Draw a line between two 3D points. | |
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. | |
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. | |
void | drawCircle (float x, float y, float z, float radius) const |
Draw a circle using a 3D point and a radius. | |
void | drawEllipse (float x, float y, float z, float width, float height) const |
Draw an ellipse using a 3D point, width, and height. | |
void | drawString (std::string text, float x, float y, float z) const |
Draw text with this renderer using the current bitmap text mode. | |
void | drawString (const ofTrueTypeFont &font, std::string text, float x, float y) const |
Draw text with this renderer using an ofTrueType font. | |
void | enableTextureTarget (const ofTexture &tex, int textureLocation) |
Bind the texture at the texture location. | |
void | disableTextureTarget (int textureTarget, int textureLocation) |
Unbind the texture target at the texture location. | |
void | setAlphaMaskTex (const ofTexture &tex) |
Enable alpha masking using this texture as the mask source. | |
void | disableAlphaMask () |
Disable this renderer's current alpha mask texture. | |
GLenum | getCurrentTextureTarget () |
const ofShader & | getCurrentShader () const |
void | bind (const ofBaseMaterial &material) |
Bind a material to be used with this renderer. | |
void | bind (const ofShadow &shadow) |
void | bind (const ofShadow &shadow, GLenum aCubeFace) |
void | bind (const ofShader &shader) |
Bind a shader to be used with this renderer. | |
void | bind (const ofTexture &texture, int location) |
Bind a texture to be used with this renderer at a location. | |
void | bind (const ofBaseVideoDraws &video) |
Bind a video's texture to this renderer. | |
void | bind (const ofCamera &camera, const ofRectangle &viewport) |
Bind camera's matrices to this renderer's matrix stack. | |
void | unbind (const ofBaseMaterial &material) |
Unbind a material previously bound to this renderer with bind(). | |
void | unbind (const ofShadow &shadow) |
void | unbind (const ofShadow &shadow, GLenum aCubeFace) |
void | unbind (const ofShader &shader) |
Unbind a shader previously bound to this renderer with bind(). | |
void | unbind (const ofTexture &texture, int location) |
Unbind a texture previously bound to this renderer with bind(). | |
void | unbind (const ofBaseVideoDraws &video) |
Unbind a video previously bound to this renderer with bind(). | |
void | unbind (const ofCamera &camera) |
Unbind the camera from this renderer. | |
void | bind (const ofFbo &fbo) |
Bind a frame buffer to this renderer. | |
void | bindForBlitting (const ofFbo &fboSrc, ofFbo &fboDst, int attachmentPoint) |
Bind source and destination frame buffers for blitting. | |
void | unbind (const ofFbo &fbo) |
Unbind a frame buffer previously bound to this renderer with bind(). | |
void | begin (const ofFbo &fbo, ofFboMode mode) |
Begin using a frame buffer as this renderer's render surface. | |
void | end (const ofFbo &fbo) |
Stop using the specified frame buffer as this renderer's render surface. | |
ofStyle | getStyle () const |
Get this renderer's current style object. | |
void | pushStyle () |
Push this renderer's current style into its internal style stack. | |
void | popStyle () |
Pop this renderer's current style from its internal style stack. | |
void | setStyle (const ofStyle &style) |
Set this renderer's current style object. | |
void | setCurveResolution (int resolution) |
Set the resolution used when drawing curves with this renderer. | |
void | setPolyMode (ofPolyWindingMode mode) |
Set this renderer's poly winding mode. | |
const ofShader * | getVideoShader (const ofBaseVideoDraws &video) const |
void | setVideoShaderUniforms (const ofBaseVideoDraws &video, const ofShader &shader) const |
void | enableLighting () |
Enable lighting with this renderer. | |
void | disableLighting () |
Disable lighting with this renderer. | |
bool | getLightingEnabled () |
Returns true if lighting is enabled with this renderer. | |
void | enableSeparateSpecularLight () |
Enable seperate specular lighting parameters. | |
void | disableSeparateSpecularLight () |
Disable seperate specular lighting parameters. | |
void | setSmoothLighting (bool b) |
Enable/disable smooth light shading. | |
void | setGlobalAmbientColor (const ofColor &c) |
Set the global ambient light color. | |
void | enableLight (int lightIndex) |
Enable a light at a specific index. | |
void | disableLight (int lightIndex) |
Disable a light at a specific index. | |
void | setLightSpotlightCutOff (int lightIndex, float spotCutOff) |
Set the spot light cutoff for a light at a specific index. | |
void | setLightSpotConcentration (int lightIndex, float exponent) |
Set the spotlight concentration (exponent) for a light at a specific index. | |
void | setLightAttenuation (int lightIndex, float constant, float linear, float quadratic) |
Set the light attenuation for a light at a specific index. | |
void | setLightAmbientColor (int lightIndex, const ofFloatColor &c) |
Set the ambient light color for a light at a specific index. | |
void | setLightDiffuseColor (int lightIndex, const ofFloatColor &c) |
Set the diffues light color for a light at a specific index. | |
void | setLightSpecularColor (int lightIndex, const ofFloatColor &c) |
Set the specular light color for a light at a specific index. | |
void | setLightPosition (int lightIndex, const glm::vec4 &position) |
Set the position of a light at a specific index. | |
void | setLightSpotDirection (int lightIndex, const glm::vec4 &direction) |
Set the spot direction of a light at a specific index. | |
std::string | defaultVertexShaderHeader (GLenum textureTarget) |
std::string | defaultFragmentShaderHeader (GLenum textureTarget) |
int | getGLVersionMajor () |
Get the major OpenGL version number this renderer is using. | |
int | getGLVersionMinor () |
Get the minor OpenGL version number this renderer is using. | |
void | saveScreen (int x, int y, int w, int h, ofPixels &pixels) |
Fill an ofPixels object with a subsection of the current screen. | |
void | saveFullViewport (ofPixels &pixels) |
Fill an ofPixels object with the contents of the current screen. | |
const of3dGraphics & | get3dGraphics () const |
Get a const reference of this renderer's 3D graphics object. | |
of3dGraphics & | get3dGraphics () |
Get a reference with this renderer's 3D graphics object. | |
virtual void | draw (const ofPolyline &poly) const=0 |
Draw a polyline with this renderer. | |
virtual void | draw (const ofPath &shape) const=0 |
Draw a path with this renderer. | |
virtual void | draw (const ofPath &shape, float x, float y) const |
Draw a path with this renderer at x and y . | |
virtual void | draw (const ofMesh &mesh, ofPolyRenderMode renderType) const |
Draw a mesh with this renderer using the renderType . | |
virtual void | draw (const ofMesh &vertexData, ofPolyRenderMode renderType, bool useColors, bool useTextures, bool useNormals) const=0 |
Draw a mesh with this renderer. | |
virtual void | draw (const of3dPrimitive &model, ofPolyRenderMode renderType) const=0 |
Draw a model with this renderer using the renderType . | |
virtual void | draw (const ofNode &model) const=0 |
Draw a node with this renderer using ofNode::customDraw(). | |
virtual void | draw (const ofImage &image, float x, float y, float z, float w, float h, float sx, float sy, float sw, float sh) const=0 |
Draw an image with this renderer. | |
virtual void | draw (const ofFloatImage &image, float x, float y, float z, float w, float h, float sx, float sy, float sw, float sh) const=0 |
Draw an image with this renderer. | |
virtual void | draw (const ofShortImage &image, float x, float y, float z, float w, float h, float sx, float sy, float sw, float sh) const=0 |
Draw an image with this renderer. | |
virtual void | draw (const ofBaseVideoDraws &video, float x, float y, float w, float h) const=0 |
Draw a video with this renderer. | |
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. | |
virtual void | draw (const ofVbo &vbo, GLuint drawMode, int first, int total) const=0 |
Draw vertices from a vertext buffer with this renderer. | |
virtual void | draw (const ofVboMesh &mesh, ofPolyRenderMode renderType) const=0 |
Draw a vertex buffer mesh using a specific poly render mode. | |
virtual void | draw (const ofPolyline &poly) const =0 |
Draw a polyline with this renderer. | |
virtual void | draw (const ofPath &shape) const =0 |
Draw a path with this renderer. | |
virtual void | draw (const ofPath &shape, float x, float y) const |
Draw a path with this renderer at x and y . | |
virtual void | draw (const ofMesh &mesh, ofPolyRenderMode renderType) const |
Draw a mesh with this renderer using the renderType . | |
virtual void | draw (const ofMesh &vertexData, ofPolyRenderMode renderType, bool useColors, bool useTextures, bool useNormals) const =0 |
Draw a mesh with this renderer. | |
virtual void | draw (const of3dPrimitive &model, ofPolyRenderMode renderType) const =0 |
Draw a model with this renderer using the renderType . | |
virtual void | draw (const ofNode &model) const =0 |
Draw a node with this renderer using ofNode::customDraw(). | |
virtual void | draw (const ofImage &image, float x, float y, float z, float w, float h, float sx, float sy, float sw, float sh) const =0 |
Draw an image with this renderer. | |
virtual void | draw (const ofFloatImage &image, float x, float y, float z, float w, float h, float sx, float sy, float sw, float sh) const =0 |
Draw an image with this renderer. | |
virtual void | draw (const ofShortImage &image, float x, float y, float z, float w, float h, float sx, float sy, float sw, float sh) const =0 |
Draw an image with this renderer. | |
virtual void | draw (const ofBaseVideoDraws &video, float x, float y, float w, float h) const =0 |
Draw a video with this renderer. | |
![]() | |
virtual | ~ofBaseRenderer () |
virtual void | rotateDeg (float degrees, float vecX, float vecY, float vecZ) |
Rotate this renderer's current matrix by degrees about a euler. | |
virtual void | rotateXDeg (float degrees) |
Rotate this renderer's current matrix by degrees about the x axis. | |
virtual void | rotateYDeg (float degrees) |
Rotate this renderer's current matrix by degrees about the y axis. | |
virtual void | rotateZDeg (float degrees) |
Rotate this renderer's current matrix by degrees about the z axis. | |
virtual void | rotateDeg (float degrees) |
Rotate this renderer's current matrix by degrees about the z axis. | |
virtual void | setPlaneResolution (int columns, int rows) |
Set this renderer's plane resolution using column and rows . | |
virtual glm::vec2 | getPlaneResolution () const |
Get this renderer's current plane resolution as a 2D vector. | |
virtual void | drawPlane (float x, float y, float width, float height) const |
Draw a plane with the renderer using x, y, width, and height. | |
virtual void | drawPlane (float x, float y, float z, float width, float height) const |
Draw a plane with the renderer using x, y, z, width, and height. | |
virtual void | drawPlane (const glm::vec3 &position, float width, float height) const |
Draw a plane with the renderer using a 3D point, width, and height. | |
virtual void | drawPlane (float width, float height) const |
Draw a plane with the renderer at the origin. | |
virtual void | setSphereResolution (int res) |
Set the point resolution to use when drawing a sphere with this renderer. | |
virtual int | getSphereResolution () const |
Get this renderer's current sphere resolution. | |
virtual void | drawSphere (float x, float y, float radius) const |
Draw a sphere with this renderer using x, y, and radius. | |
virtual void | drawSphere (float x, float y, float z, float radius) const |
Draw a sphere with this renderer using x, y, z, and radius. | |
virtual void | drawSphere (const glm::vec3 &position, float radius) const |
Draw a sphere with this renderer using a position point and radius. | |
virtual void | drawSphere (float radius) const |
Draw a sphere with the renderer at the defualt origin using radius. | |
virtual void | setIcoSphereResolution (int res) |
Set the point resolution to use when drawing an icosphere with this renderer. | |
virtual int | getIcoSphereResolution () const |
Get this renderer's current icosphere resolution. | |
virtual void | drawIcoSphere (float x, float y, float z, float radius) const |
Draw an icosphere with this renderer using x, y, and radius. | |
virtual void | drawIcoSphere (float x, float y, float radius) const |
Draw an icosphere with this renderer using x, y, and radius. | |
virtual void | drawIcoSphere (const glm::vec3 &position, float radius) const |
Draw an icosphere with this renderer using x, y, and radius. | |
virtual void | drawIcoSphere (float radius) const |
Draw an icosphere with the renderer at the origin using radius. | |
virtual void | setCylinderResolution (int radiusSegments, int heightSegments, int capSegments=2) |
Set this renderer's cylinder resolution. | |
virtual glm::vec3 | getCylinderResolution () const |
Get this renderer's cylinder resolution as a 3D vector. | |
virtual void | drawCylinder (float x, float y, float radius, float height) const |
Draw a cylinder with this renderer using x, y, radius, and height. | |
virtual void | drawCylinder (float x, float y, float z, float radius, float height) const |
Draw a cylinder with this renderer using x, y, z, radius, and height. | |
virtual void | drawCylinder (const glm::vec3 &position, float radius, float height) const |
Draw a cylinder with this renderer using position, radius, and height. | |
virtual void | drawCylinder (float radius, float height) const |
Draw a cylinder at the origin using radius and height. | |
virtual void | setConeResolution (int radiusSegments, int heightSegments, int capSegments=2) |
Set the resolution of a polygonized cone. | |
virtual glm::vec3 | getConeResolution () const |
Get this renderer's cone resolution as a 3D vector. | |
virtual void | drawCone (float x, float y, float z, float radius, float height) const |
Draw a cone with this renderer using x, y, z, radius, and height. | |
virtual void | drawCone (float x, float y, float radius, float height) const |
Draw a cone with this renderer using x, y, z, radius, and height. | |
virtual void | drawCone (const glm::vec3 &position, float radius, float height) const |
Draw a cone with this renderer using x, y, z, radius, and height. | |
virtual void | drawCone (float radius, float height) const |
Draw a cone at the origin using radius and height. | |
virtual void | setBoxResolution (int res) |
Set the resolution this renderer uses when drawing boxes. | |
virtual void | setBoxResolution (int resWidth, int resHeight, int resDepth) |
Set the resolution this renderer uses when drawing boxes. | |
virtual glm::vec3 | getBoxResolution () const |
Get this renderer's current box resolution as a 3D vector. | |
virtual void | drawBox (float x, float y, float z, float width, float height, float depth) const |
Draws a rectangular box using x, y, z, width, height, and depth. | |
virtual void | drawBox (float x, float y, float z, float size) const |
Draws a cube using x, y, z, and size. coordinates. | |
virtual void | drawBox (const glm::vec3 &position, float width, float height, float depth) const |
Draws a rectangular box using position, width, height and depth. | |
virtual void | drawBox (const glm::vec3 &position, float size) const |
Draws a cube with the specified size, starting from the specified position. | |
virtual void | drawBox (float size) const |
Draws a cube with the specified size at the origin. | |
virtual void | drawBox (float width, float height, float depth) const |
Draws a rectangular box with the specified dimensions, starting from the origin. | |
virtual void | drawAxis (float size) const |
Draw the coordinate system's axes with the renderer. | |
virtual void | drawGrid (float stepSize, size_t numberOfSteps, bool labels, bool x, bool y, bool z) const |
Draw the coordinate system's axes as a grid with the renderer. | |
virtual void | drawGridPlane (float stepSize, size_t numberOfSteps, bool labels) const |
Draw a coordinate system plane using the y and z axes. | |
virtual void | drawArrow (const glm::vec3 &start, const glm::vec3 &end, float headSize) const |
Draw an arrow between two 3D points. | |
virtual void | drawRotationAxes (float radius, float stripWidth, int circleRes) const |
Draw the coordinate system's axes with the renderer. | |
Static Public Attributes | |
static const std::string | TYPE ="ProgrammableGL" |
Constructor & Destructor Documentation
◆ ofGLProgrammableRenderer()
ofGLProgrammableRenderer::ofGLProgrammableRenderer | ( | const ofAppBaseWindow * | window | ) |
Member Function Documentation
◆ background() [1/4]
|
virtual |
Immediately paint a background color to the screen.
If automatic background drawing is enabled (which it is by default) this method called from ofApp::setup() will also repaint the background with this color each frame.
- Parameters
-
c The color to paint the background with.
Implements ofBaseRenderer.
◆ background() [2/4]
|
virtual |
Immediately paint a grayscale background color to the screen.
If automatic background drawing is enabled (which it is by default) this method called from ofApp::setup() will also repaint the background with this color each frame.
- Parameters
-
brightness The grayscale value between 0 and 255 to paint the background with.
Implements ofBaseRenderer.
◆ background() [3/4]
|
virtual |
Immediately paint a grayscale background color to the screen.
If automatic background drawing is enabled (which it is by default) this method called from ofApp::setup() will also repaint the background with this color each frame.
- Parameters
-
hexColor The 24-bit hex representation of the color to paint the background with. _a The alpha value between 0 and 255 to apply to hexColor
when when painting the background.
Implements ofBaseRenderer.
◆ background() [4/4]
|
virtual |
Immediately paint a background color to the screen.
- Parameters
-
r The red value between 0 and 255 to use for the background. g The green value between 0 and 255 to use for the background. b The blue value between 0 and 255 to use for the background. a The alpha value between 0 and 255 to use for the background.
Implements ofBaseRenderer.
◆ begin()
Begin using a frame buffer as this renderer's render surface.
The Render Surface
The fbo used with this method will be used by this renderer until it is unbound with unbind().
- Parameters
-
fbo The frame buffer to use as this renderer's render surface. mode The fbo mode to use.
- See also
- ofFboMode
Implements ofBaseGLRenderer.
◆ bind() [1/8]
|
virtual |
Bind a material to be used with this renderer.
Implements ofBaseGLRenderer.
◆ bind() [2/8]
|
virtual |
Bind a video's texture to this renderer.
The video bound with this method will be used by this renderer until it is unbound with unbind().
- Parameters
-
video The video whose texture should be bound to this renderer.
Implements ofBaseGLRenderer.
◆ bind() [3/8]
|
virtual |
Bind camera's
matrices to this renderer's matrix stack.
Bind's the camera's
modelview and projection matrices to this renderer's matrix stack using viewport
. Should be followed with a call to unbind().
- Parameters
-
camera The camera to bind to this renderer. viewport The viewport to use when binding camera
to this renderer.
Reimplemented from ofBaseGLRenderer.
◆ bind() [4/8]
|
virtual |
Bind a frame buffer to this renderer.
The fbo bound with this method will be used as this renderer until it is unbound with unbind().
- Parameters
-
fbo The frame buffer whose texture should be bound to this renderer.
Implements ofBaseGLRenderer.
◆ bind() [5/8]
|
virtual |
Bind a shader to be used with this renderer.
The shader bound with this method will be used by this renderer until it is unbound with unbind().
- Parameters
-
shader The shader to bind to this renderer.
- See also
- glUseProgram()
Implements ofBaseGLRenderer.
◆ bind() [6/8]
|
virtual |
Implements ofBaseGLRenderer.
◆ bind() [7/8]
|
virtual |
Implements ofBaseGLRenderer.
◆ bind() [8/8]
|
virtual |
Bind a texture to be used with this renderer at a location.
The texture bound with this method will be used by this renderer until it is unbound with unbind().
- Parameters
-
texture The texture to bind with this renderer. location The texture location to bind this texture to.
Implements ofBaseGLRenderer.
◆ bindForBlitting()
|
virtual |
Bind source and destination frame buffers for blitting.
- Parameters
-
fboSrc The source frame buffer to bind for blitting. fboDst The destination frame buffer to bind for blitting. attachmentPoint The attatchement point to use when binding.
- Warning
- This method is unavailable when using OpenGLES.
Implements ofBaseGLRenderer.
◆ clear() [1/3]
|
virtual |
Clear this renderer's current color and bit depths.
clear() will clear the screen entirely.
Implements ofBaseRenderer.
◆ clear() [2/3]
|
virtual |
Clear this renderer's color and bit depths replacing them.
clear() will clear the screen entirely.
- Parameters
-
brightness The grayscale value between 0 and 255 to use when clearing the screen. a The alpha value between 0 and 255 to use when clearing the screen. Defaults to 0.
Implements ofBaseRenderer.
◆ clear() [3/3]
|
virtual |
Clear this renderer's color and bit depths and replace them.
clear() will clear the screen entirely.
- Parameters
-
r The red value between 0 and 255 to use when clearing the screen. g The green value between 0 and 255 to use when clearing the screen. b The blue value between 0 and 255 use when clearing the screen. a The alpha value between 0 and 255 use when clearing the screen. Defaults to 0.
Implements ofBaseRenderer.
◆ clearAlpha()
|
virtual |
Restore the alpha color to its full opacity value.
Implements ofBaseRenderer.
◆ defaultFragmentShaderHeader()
string ofGLProgrammableRenderer::defaultFragmentShaderHeader | ( | GLenum | textureTarget | ) |
◆ defaultVertexShaderHeader()
string ofGLProgrammableRenderer::defaultVertexShaderHeader | ( | GLenum | textureTarget | ) |
◆ disableAlphaMask()
|
virtual |
Disable this renderer's current alpha mask texture.
- See also
- setAlphaMaskTex()
Implements ofBaseGLRenderer.
◆ disableAntiAliasing()
|
virtual |
Disable this renderer from using anti-aliasing.
Implements ofBaseRenderer.
◆ disableLight()
|
virtual |
Disable a light at a specific index.
- Parameters
-
lightIndex The index of the light to disable.
Implements ofBaseGLRenderer.
◆ disableLighting()
|
virtual |
Disable lighting with this renderer.
Implements ofBaseGLRenderer.
◆ disablePointSprites()
|
virtual |
Disable point sprites when using this renderer.
Implements ofBaseGLRenderer.
◆ disableSeparateSpecularLight()
|
inlinevirtual |
Disable seperate specular lighting parameters.
Implements ofBaseGLRenderer.
◆ disableTextureTarget()
|
virtual |
Unbind the texture target at the texture location.
textureTarget
can be accessed from an ofTexture with ofTexture::texData::textureTarget.
- Parameters
-
textureTarget The texture target to unbind from this renderer. textureLocation The location that texture was bound with.
- See also
- ofTextureData()
Implements ofBaseGLRenderer.
◆ draw() [1/37]
|
virtual |
Draw a model
with this renderer using the renderType
.
renderType
defines how the model
will be rendered and may be: OF_MESH_POINTS, OF_MESH_WIREFRAME, OF_MESH_FILL
- Parameters
-
model The model to draw with this renderer. renderType The render mode to use when drawing the model
with this renderer.
- See also
- ofPolyRenderMode
Reimplemented from ofBaseGLRenderer.
◆ draw() [2/37]
|
virtual |
Draw a model
with this renderer using the renderType
.
renderType
defines how the model
will be rendered and may be: OF_MESH_POINTS, OF_MESH_WIREFRAME, OF_MESH_FILL
- Parameters
-
model The model to draw with this renderer. renderType The render mode to use when drawing the model
with this renderer.
- See also
- ofPolyRenderMode
Reimplemented from ofBaseGLRenderer.
◆ draw() [3/37]
|
virtual |
Draw a model
with this renderer using the renderType
.
renderType
defines how the model
will be rendered and may be: OF_MESH_POINTS, OF_MESH_WIREFRAME, OF_MESH_FILL
- Parameters
-
model The model to draw with this renderer. renderType The render mode to use when drawing the model
with this renderer.
- See also
- ofPolyRenderMode
Reimplemented from ofBaseGLRenderer.
◆ draw() [4/37]
|
virtual |
Draw a video
with this renderer.
- Parameters
-
video The video with draw with this renderer. x The x coordinate to use to draw video
with this renderer.y The y coordinate to use to draw video
with this renderer.w The width to use to draw the video with this renderer. h The height to use to draw the video with this renderer.
Reimplemented from ofBaseGLRenderer.
◆ draw() [5/37]
|
virtual |
Draw a video
with this renderer.
- Parameters
-
video The video with draw with this renderer. x The x coordinate to use to draw video
with this renderer.y The y coordinate to use to draw video
with this renderer.w The width to use to draw the video with this renderer. h The height to use to draw the video with this renderer.
Reimplemented from ofBaseGLRenderer.
◆ draw() [6/37]
|
virtual |
Draw a video
with this renderer.
- Parameters
-
video The video with draw with this renderer. x The x coordinate to use to draw video
with this renderer.y The y coordinate to use to draw video
with this renderer.w The width to use to draw the video with this renderer. h The height to use to draw the video with this renderer.
Reimplemented from ofBaseGLRenderer.
◆ draw() [7/37]
|
virtual |
Draw an image
with this renderer.
- Parameters
-
image The image to draw with this renderer. x The x coordinate to use to draw image
with this renderer.y The y coordinate to use to draw image
with this renderer.z The z coordinate to use to draw image
with this renderer.w The width to use to draw image
with this renderer.h The height to use to draw image
with this renderer.sx The subsection x axis offset within the image texture. sy The subsection y axis offset within the image texture. sw The subsection width offset within the image texture. sh The subsection height offset within the image texture.
Reimplemented from ofBaseGLRenderer.
◆ draw() [8/37]
|
virtual |
Draw an image
with this renderer.
- Parameters
-
image The image to draw with this renderer. x The x coordinate to use to draw image
with this renderer.y The y coordinate to use to draw image
with this renderer.z The z coordinate to use to draw image
with this renderer.w The width to use to draw image
with this renderer.h The height to use to draw image
with this renderer.sx The subsection x axis offset within the image texture. sy The subsection y axis offset within the image texture. sw The subsection width offset within the image texture. sh The subsection height offset within the image texture.
Reimplemented from ofBaseGLRenderer.
◆ draw() [9/37]
|
virtual |
Draw an image
with this renderer.
- Parameters
-
image The image to draw with this renderer. x The x coordinate to use to draw image
with this renderer.y The y coordinate to use to draw image
with this renderer.z The z coordinate to use to draw image
with this renderer.w The width to use to draw image
with this renderer.h The height to use to draw image
with this renderer.sx The subsection x axis offset within the image texture. sy The subsection y axis offset within the image texture. sw The subsection width offset within the image texture. sh The subsection height offset within the image texture.
Reimplemented from ofBaseGLRenderer.
◆ draw() [10/37]
|
virtual |
Draw an image
with this renderer.
- Parameters
-
image The image to draw with this renderer. x The x coordinate to use when drawing image
with this renderer.y The y coordinate to use to draw image
with this renderer.z The z coordinate to use to drawing image
with this renderer.w The width to use to draw the image
with this renderer.h The height to use to draw the image
with this renderer.sx The subsection x axis offset within the image texture. sy The subsection y axis offset within the image texture. sw The subsection width offset within the image texture. sh The subsection height offset within the image texture.
Reimplemented from ofBaseGLRenderer.
◆ draw() [11/37]
|
virtual |
Draw an image
with this renderer.
- Parameters
-
image The image to draw with this renderer. x The x coordinate to use when drawing image
with this renderer.y The y coordinate to use to draw image
with this renderer.z The z coordinate to use to drawing image
with this renderer.w The width to use to draw the image
with this renderer.h The height to use to draw the image
with this renderer.sx The subsection x axis offset within the image texture. sy The subsection y axis offset within the image texture. sw The subsection width offset within the image texture. sh The subsection height offset within the image texture.
Reimplemented from ofBaseGLRenderer.
◆ draw() [12/37]
|
virtual |
Draw an image
with this renderer.
- Parameters
-
image The image to draw with this renderer. x The x coordinate to use when drawing image
with this renderer.y The y coordinate to use to draw image
with this renderer.z The z coordinate to use to drawing image
with this renderer.w The width to use to draw the image
with this renderer.h The height to use to draw the image
with this renderer.sx The subsection x axis offset within the image texture. sy The subsection y axis offset within the image texture. sw The subsection width offset within the image texture. sh The subsection height offset within the image texture.
Reimplemented from ofBaseGLRenderer.
◆ draw() [13/37]
|
virtual |
Draw a mesh
with this renderer using the renderType
.
renderType
defines how the mesh
will be rendered and may be: OF_MESH_POINTS, OF_MESH_WIREFRAME, OF_MESH_FILL
- Parameters
-
mesh The mesh to draw with this renderer. renderType The render mode to use to draw mesh
with this renderer.
- See also
- ofPolyRenderMode
Reimplemented from ofBaseGLRenderer.
◆ draw() [14/37]
|
virtual |
Draw a mesh
with this renderer using the renderType
.
renderType
defines how the mesh
will be rendered and may be: OF_MESH_POINTS, OF_MESH_WIREFRAME, OF_MESH_FILL
- Parameters
-
mesh The mesh to draw with this renderer. renderType The render mode to use to draw mesh
with this renderer.
- See also
- ofPolyRenderMode
Reimplemented from ofBaseGLRenderer.
◆ draw() [15/37]
|
virtual |
Draw a mesh with this renderer.
renderType
defines how the mesh
will be rendered and may be: OF_MESH_POINTS, OF_MESH_WIREFRAME, OF_MESH_FILL
- Parameters
-
vertexData The mesh to draw with this renderer. renderType The render mode to use to draw vertexData
to this renderer.useColors True to use per-vertex coloring to draw the vertexData
.useTextures True to use texture coordinates to draw the vertexData
.useNormals True to use normals to draw the vertexData
.
- See also
- ofPolyRenderMode
Reimplemented from ofBaseGLRenderer.
◆ draw() [16/37]
|
virtual |
Draw a mesh with this renderer.
renderType
defines how the mesh
will be rendered and may be: OF_MESH_POINTS, OF_MESH_WIREFRAME, OF_MESH_FILL
- Parameters
-
vertexData The mesh to draw with this renderer. renderType The render mode to use to draw vertexData
to this renderer.useColors True to use per-vertex coloring to draw the vertexData
.useTextures True to use texture coordinates to draw the vertexData
.useNormals True to use normals to draw the vertexData
.
- See also
- ofPolyRenderMode
Reimplemented from ofBaseGLRenderer.
◆ draw() [17/37]
|
virtual |
Draw a mesh with this renderer.
renderType
defines how the mesh
will be rendered and may be: OF_MESH_POINTS, OF_MESH_WIREFRAME, OF_MESH_FILL
- Parameters
-
vertexData The mesh to draw with this renderer. renderType The render mode to use to draw vertexData
to this renderer.useColors True to use per-vertex coloring to draw the vertexData
.useTextures True to use texture coordinates to draw the vertexData
.useNormals True to use normals to draw the vertexData
.
- See also
- ofPolyRenderMode
Reimplemented from ofBaseGLRenderer.
◆ draw() [18/37]
|
virtual |
Draw a node with this renderer using ofNode::customDraw().
- Parameters
-
model The node to draw with this renderer.
- See also
- ofNode::customDraw()
Reimplemented from ofBaseGLRenderer.
◆ draw() [19/37]
|
virtual |
Draw a node with this renderer using ofNode::customDraw().
- Parameters
-
model The node to draw with this renderer.
- See also
- ofNode::customDraw()
Reimplemented from ofBaseGLRenderer.
◆ draw() [20/37]
|
virtual |
Draw a node with this renderer using ofNode::customDraw().
- Parameters
-
model The node to draw with this renderer.
- See also
- ofNode::customDraw()
Reimplemented from ofBaseGLRenderer.
◆ draw() [21/37]
|
virtual |
Draw a path with this renderer.
- Parameters
-
shape The path to draw with this renderer.
Reimplemented from ofBaseGLRenderer.
◆ draw() [22/37]
|
virtual |
Draw a path with this renderer.
- Parameters
-
shape The path to draw with this renderer.
Reimplemented from ofBaseGLRenderer.
◆ draw() [23/37]
|
virtual |
Draw a path with this renderer.
- Parameters
-
shape The path to draw with this renderer.
Reimplemented from ofBaseGLRenderer.
◆ draw() [24/37]
|
inlinevirtual |
Draw a path with this renderer at x
and y
.
- Parameters
-
shape The path to draw with this renderer. x The x coordinate to use to draw shape
.y The y coordinate to use to draw shape
.
Reimplemented from ofBaseGLRenderer.
◆ draw() [25/37]
|
inlinevirtual |
Draw a path with this renderer at x
and y
.
- Parameters
-
shape The path to draw with this renderer. x The x coordinate to use to draw shape
.y The y coordinate to use to draw shape
.
Reimplemented from ofBaseGLRenderer.
◆ draw() [26/37]
|
virtual |
Draw a polyline with this renderer.
- Parameters
-
poly The polyline to draw with this renderer.
Reimplemented from ofBaseGLRenderer.
◆ draw() [27/37]
|
virtual |
Draw a polyline with this renderer.
- Parameters
-
poly The polyline to draw with this renderer.
Reimplemented from ofBaseGLRenderer.
◆ draw() [28/37]
|
virtual |
Draw a polyline with this renderer.
- Parameters
-
poly The polyline to draw with this renderer.
Reimplemented from ofBaseGLRenderer.
◆ draw() [29/37]
|
virtual |
Draw an image
with this renderer.
- Parameters
-
image The image to draw with this renderer. x The x coordinate to use to draw image
with this renderer.y The y coordinate to use to draw image
with this renderer.z The z coordinate to use to draw image
with this renderer.w The width to use when drawing the image with this renderer. h The height to use when drawing the image with this renderer. sx The subsection x axis offset within the image texture. sy The subsection y axis offset within the image texture. sw The subsection width offset within the image texture. sh The subsection height offset within the image texture.
Reimplemented from ofBaseGLRenderer.
◆ draw() [30/37]
|
virtual |
Draw an image
with this renderer.
- Parameters
-
image The image to draw with this renderer. x The x coordinate to use to draw image
with this renderer.y The y coordinate to use to draw image
with this renderer.z The z coordinate to use to draw image
with this renderer.w The width to use when drawing the image with this renderer. h The height to use when drawing the image with this renderer. sx The subsection x axis offset within the image texture. sy The subsection y axis offset within the image texture. sw The subsection width offset within the image texture. sh The subsection height offset within the image texture.
Reimplemented from ofBaseGLRenderer.
◆ draw() [31/37]
|
virtual |
Draw an image
with this renderer.
- Parameters
-
image The image to draw with this renderer. x The x coordinate to use to draw image
with this renderer.y The y coordinate to use to draw image
with this renderer.z The z coordinate to use to draw image
with this renderer.w The width to use when drawing the image with this renderer. h The height to use when drawing the image with this renderer. sx The subsection x axis offset within the image texture. sy The subsection y axis offset within the image texture. sw The subsection width offset within the image texture. sh The subsection height offset within the image texture.
Reimplemented from ofBaseGLRenderer.
◆ draw() [32/37]
|
virtual |
Draw a texture with this renderer.
Drawing
- Parameters
-
image The texture to draw with this renderer. x The x coordinate to use when drawing the texture with this renderer. y The y coordinate to use to draw the texture with this renderer. z The z coordinate to use to draw the texture with this renderer. w The width to use to draw the the texture with this renderer. h The height to use to draw the the texture with this renderer. sx The subsection x axis offset within the texture. sy The subsection y axis offset within the texture. sw The subsection width offset within the texture. sh The subsection height offset within the texture.
Implements ofBaseGLRenderer.
◆ draw() [33/37]
|
virtual |
Draw a texture with this renderer.
Drawing
- Parameters
-
image The texture to draw with this renderer. x The x coordinate to use when drawing the texture with this renderer. y The y coordinate to use to draw the texture with this renderer. z The z coordinate to use to draw the texture with this renderer. w The width to use to draw the the texture with this renderer. h The height to use to draw the the texture with this renderer. sx The subsection x axis offset within the texture. sy The subsection y axis offset within the texture. sw The subsection width offset within the texture. sh The subsection height offset within the texture.
Implements ofBaseGLRenderer.
◆ draw() [34/37]
|
virtual |
Draw vertices from a vertext buffer with this renderer.
drawMode
may be any of the OpenGL primitive draw modes: GL_POINTS, GL_LINE_STRIP, GL_LINE_LOOP, GL_LINES, GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN, GL_TRIANGLES
ofGetGLPrimitiveMode() can also be used to get the GLuint draw mode from an ofPrimitiveMode.
- Parameters
-
vbo The vertext buffer object to draw vertices from with this renderer. drawMode OpenGL primitive draw mode to use when drawing the vbo's vertices with this renderer. first The index of the first vertex to draw from vbo
.total The total number of indices to draw from vbo
.
- See also
- ofGetGLPrimitiveMode()
- glDrawArrays()
- https://www.khronos.org/opengles/sdk/docs/man/xhtml/glDrawArrays.xml
Implements ofBaseGLRenderer.
◆ draw() [35/37]
|
virtual |
Draw vertices from a vertext buffer with this renderer.
drawMode
may be any of the OpenGL primitive draw modes: GL_POINTS, GL_LINE_STRIP, GL_LINE_LOOP, GL_LINES, GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN, GL_TRIANGLES
ofGetGLPrimitiveMode() can also be used to get the GLuint draw mode from an ofPrimitiveMode.
- Parameters
-
vbo The vertext buffer object to draw vertices from with this renderer. drawMode OpenGL primitive draw mode to use when drawing the vbo's vertices with this renderer. first The index of the first vertex to draw from vbo
.total The total number of indices to draw from vbo
.
- See also
- ofGetGLPrimitiveMode()
- glDrawArrays()
- https://www.khronos.org/opengles/sdk/docs/man/xhtml/glDrawArrays.xml
Implements ofBaseGLRenderer.
◆ draw() [36/37]
|
virtual |
Draw a vertex buffer mesh using a specific poly render mode.
renderType
defines how the mesh
will be rendered and may be: OF_MESH_POINTS, OF_MESH_WIREFRAME, OF_MESH_FILL
- Parameters
-
mesh The vertex buffer mesh to draw with this renderer. renderType The poly render mode to use when drawing mesh
with this renderer.
- See also
- ofPolyRenderMode
Implements ofBaseGLRenderer.
◆ draw() [37/37]
|
virtual |
Draw a vertex buffer mesh using a specific poly render mode.
renderType
defines how the mesh
will be rendered and may be: OF_MESH_POINTS, OF_MESH_WIREFRAME, OF_MESH_FILL
- Parameters
-
mesh The vertex buffer mesh to draw with this renderer. renderType The poly render mode to use when drawing mesh
with this renderer.
- See also
- ofPolyRenderMode
Implements ofBaseGLRenderer.
◆ drawCircle()
|
virtual |
Draw a circle using a 3D point and a radius.
- Parameters
-
x The x coordinate of the center of the circle. y The y coordinate of the center of the circle. z The z coordinate of the center of the circle. radius The length of the radius of the circle.
Implements ofBaseRenderer.
◆ drawElements()
|
virtual |
Draw vertices from a vertext buffer with this renderer.
drawMode
may be any of the OpenGL primitive draw modes: GL_POINTS, GL_LINE_STRIP, GL_LINE_LOOP, GL_LINES, GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN, GL_TRIANGLES
ofGetGLPrimitiveMode() can also be used to get the GLuint draw mode from an ofPrimitiveMode.
- Parameters
-
vbo The vertext buffer object to draw vertices from with this renderer. drawMode OpenGL primitive draw mode to use when drawing the vbo's vertices with this renderer. amt The number of elements to be rendered. offsetelements The number of elements (indices) offset from the first element to start drawing from.
- See also
- ofGetGLPrimitiveMode()
- glDrawElements()
- http://www.opengl-tutorial.org/intermediate-tutorials/tutorial-9-vbo-indexing/
- https://www.opengl.org/sdk/docs/man/html/glDrawElements.xhtml
Implements ofBaseGLRenderer.
◆ drawElementsInstanced()
|
virtual |
Draw vertices from a vertex buffer using this renderer.
drawMode
may be any of the OpenGL primitive draw modes: GL_POINTS, GL_LINE_STRIP, GL_LINE_LOOP, GL_LINES, GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN, GL_TRIANGLES
ofGetGLPrimitiveMode() can also be used to get the GLuint draw mode from an ofPrimitiveMode.
- Parameters
-
vbo The vertext buffer object to draw vertices from with this renderer. drawMode OpenGL primitive draw mode to use when drawing the vbo's vertices with this renderer. amt The number of elements to be rendered. primCount Specifies the number of instances of the specified range of indices to be rendered.
- Warning
- This method may be unsupported when using OpenGLES.
- See also
- ofGetGLPrimitiveMode()
- glDrawElementsInstanced()
- https://www.opengl.org/sdk/docs/man/html/glDrawElementsInstanced.xhtml
Implements ofBaseGLRenderer.
◆ drawEllipse()
|
virtual |
Draw an ellipse using a 3D point, width, and height.
- Parameters
-
x The x coordinate of the center of the circle. y The y coordinate of the center of the circle. z The z coordinate of the center of the circle. width The width of the circle. height The height of the circle.
Implements ofBaseRenderer.
◆ drawInstanced() [1/2]
|
virtual |
Draw vertices from a vertext buffer using instanced arrays.
drawMode
may be any of the OpenGL primitive draw modes: GL_POINTS, GL_LINE_STRIP, GL_LINE_LOOP, GL_LINES, GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN, GL_TRIANGLES
ofGetGLPrimitiveMode() can also be used to get the GLuint draw mode from an ofPrimitiveMode.
- Parameters
-
vbo The vertext buffer object to draw vertices from with this renderer. drawMode OpenGL primitive draw mode to use when drawing the vbo's vertices with this renderer. first The index of the first vertex to draw from vbo
.total The total number of indices to draw from vbo
.primCount Specifies the number of instances of the specified range of indices to be rendered.
- Warning
- This method may be unsupported when using OpenGLES.
- See also
- ofGetGLPrimitiveMode()
- glDrawArraysInstanced()
- https://www.khronos.org/opengles/sdk/docs/man3/html/glDrawArraysInstanced.xhtml
Implements ofBaseGLRenderer.
◆ drawInstanced() [2/2]
|
virtual |
Draw a vertex buffer mesh with instancing using a specific poly render mode.
renderType
defines how the mesh
will be rendered and may be: OF_MESH_POINTS, OF_MESH_WIREFRAME, OF_MESH_FILL
- Parameters
-
mesh The vertext buffer mesh to draw vertices from with this renderer. renderType The poly render mode to use when drawing mesh
with this renderer.primCount Specifies the number of instances of the specified range of indices to be rendered.
Implements ofBaseGLRenderer.
◆ drawLine()
|
virtual |
Draw a line between two 3D points.
- Parameters
-
x1 The x coordinate of the first point. y1 The y coordinate of the first point. z1 The z coordinate of the first point. x2 The x coordinate of the second point. y2 The y coordinate of the second point. z2 The z coordinate of the second point.
Implements ofBaseRenderer.
◆ drawRectangle()
|
virtual |
Draw a rectangle using a 3D point and a width and height.
- Parameters
-
x The x coordinate of the rectangle. y The y coordinate of the rectangle. z The z coordinate of the rectangle. w The width of the rectangle. h The height of the rectangle.
- See also
- ofRectMode
Implements ofBaseRenderer.
◆ drawString() [1/2]
|
virtual |
Draw text with this renderer using an ofTrueType font.
- Parameters
-
font The font to use when drawing text
.text The text to draw with the renderer. x The x position for the bottom of text
.y The y position for the left alignment of text
.
Implements ofBaseRenderer.
◆ drawString() [2/2]
|
virtual |
Draw text with this renderer using the current bitmap text mode.
When using the OF_BITMAPMODE_SIMPLE bitmap text strings are drawn with their origin at the bottom left corner of the text. However, setBitmapTextMode() can transform this default behavior with modes like: OF_BITMAPMODE_SIMPLE OF_BITMAPMODE_SCREEN OF_BITMAPMODE_VIEWPORT OF_BITMAPMODE_MODEL OF_BITMAPMODE_MODEL_BILLBOARD
- Parameters
-
text The text to draw with the renderer. x The x position for the bottom of text
.y The y position for the left alignment of text
.z The z position of the text.
Implements ofBaseRenderer.
◆ drawTriangle()
|
virtual |
Draw a triangle using three 3D points.
- Parameters
-
x1 The x coordinate of the first point. y1 The y coordinate of the first point. z1 The z coordinate of the first point. x2 The x coordinate of the second point. y2 The y coordinate of the second point. z2 The z coordinate of the second point. x3 The x coordinate of the third point. y3 The y coordinate of the third point. z3 The z coordinate of the third point.
Implements ofBaseRenderer.
◆ enableAntiAliasing()
|
virtual |
Enable this renderer to use anti-aliasing if it is supported.
Implements ofBaseRenderer.
◆ enableLight()
|
virtual |
Enable a light at a specific index.
- Parameters
-
lightIndex The index of the light to enable.
Implements ofBaseGLRenderer.
◆ enableLighting()
|
virtual |
◆ enablePointSprites()
|
virtual |
◆ enableSeparateSpecularLight()
|
inlinevirtual |
Enable seperate specular lighting parameters.
Implements ofBaseGLRenderer.
◆ enableTextureTarget()
|
virtual |
Bind the texture at the texture location.
Textures
- Parameters
-
tex The texture to bind with this renderer. textureLocation The location to bind this texture.
Implements ofBaseGLRenderer.
◆ end()
|
virtual |
Stop using the specified frame buffer as this renderer's render surface.
- Parameters
-
fbo An fbo that is currently being used as this renderer's render surface with a call to begin().
Implements ofBaseGLRenderer.
◆ finishRender()
|
virtual |
Stop using this renderer as the rendering surface.
Implements ofBaseRenderer.
◆ get3dGraphics() [1/2]
|
virtual |
Get a reference with this renderer's 3D graphics object.
- Returns
- the 3D graphics object currently being used by this renderer.
Implements ofBaseRenderer.
◆ get3dGraphics() [2/2]
|
virtual |
Get a const reference of this renderer's 3D graphics object.
- Returns
- The 3D graphics object currently being used by this renderer.
Implements ofBaseRenderer.
◆ getBackgroundAuto()
|
virtual |
Get the current auto redraw background setting for this renderer.
- Returns
- True if this renderer is set to redraw the background each frame.
Implements ofBaseRenderer.
◆ getBackgroundColor()
|
virtual |
Get this renderer's current background color.
- Returns
- This renderer's current background color.
Implements ofBaseRenderer.
◆ getCoordHandedness()
|
virtual |
Get the coordinate handidness of this renderer.
Possible handednesses include OF_LEFT_HANDED and OF_RIGHT_HANDED. In a left handed coordinate system positive x, y and z axes point right, up and forward, respectively and positive rotation is clockwise about the axis of rotation. In a right handed coordinate system the positive x and y axes point right and up, and the negative z axis points forward and positive rotation is counterclockwise about the axis of rotation.
- Returns
- The handedness this renderer is using.
- See also
- http://seanmiddleditch.com/matrices-handedness-pre-and-post-multiplication-row-vs-column-major-and-notations/
- https://www.evl.uic.edu/ralph/508S98/coordinates.html
Implements ofBaseRenderer.
◆ getCurrentEyePosition()
glm::vec3 ofGLProgrammableRenderer::getCurrentEyePosition | ( | ) | const |
◆ getCurrentMatrix()
|
virtual |
Queries the current OpenGL matrix state.
Returns the specified matrix as held by the renderer's current matrix stack.
You can query one of the following:
[OF_MATRIX_MODELVIEW | OF_MATRIX_PROJECTION | OF_MATRIX_TEXTURE]
Each query will return the state of the matrix as it was uploaded to the shader currently bound.
- Parameters
-
matrixMode_ Which matrix mode to query
- Note
- If an invalid matrixMode is queried, this method will return the identity matrix, and print an error message.
Implements ofBaseRenderer.
◆ getCurrentModelMatrix()
glm::mat4 ofGLProgrammableRenderer::getCurrentModelMatrix | ( | ) | const |
◆ getCurrentNormalMatrix()
|
virtual |
Get this renderer's current normal matrix.
- Returns
- This renderer's current normal matrix.
Implements ofBaseRenderer.
◆ getCurrentOrientationMatrix()
|
virtual |
Get this renderer's current orientation matrix.
- Returns
- This renderer's current orientation matrix.
Implements ofBaseRenderer.
◆ getCurrentShader()
const ofShader & ofGLProgrammableRenderer::getCurrentShader | ( | ) | const |
◆ getCurrentTextureTarget()
GLenum ofGLProgrammableRenderer::getCurrentTextureTarget | ( | ) |
◆ getCurrentViewMatrix()
|
virtual |
Get this renderer's current view matrix.
- Returns
- This renderer's current view matrix.
Implements ofBaseRenderer.
◆ getCurrentViewport()
|
virtual |
Get this renderer's current viewport.
Unlike getNativeViewport(), this method gets this renderer's current viewport with orientation and vertical flipping applied.
- Returns
- This renderer's viewport as a rectangle.
- See also
- getNativeViewport()
Implements ofBaseRenderer.
◆ getFillMode()
|
virtual |
Get this renderer's current fill flag.
Possible fill flags include OF_OUTLINE and OF_FILLED.
- Returns
- The fill flag this render is currently using.
- See also
- ofFillFlag
Implements ofBaseRenderer.
◆ getGLVersionMajor()
|
virtual |
Get the major OpenGL version number this renderer is using.
Version
- Returns
- The major OpenGL version number this renderer is using.
Implements ofBaseGLRenderer.
◆ getGLVersionMinor()
|
virtual |
Get the minor OpenGL version number this renderer is using.
- Returns
- The minor OpenGL version number this renderer is using.
Implements ofBaseGLRenderer.
◆ getLightingEnabled()
|
virtual |
Returns true if lighting is enabled with this renderer.
- Returns
- True if lighting is enabled with this renderer.
- See also
- enableLighting()
- disableLighting()
Implements ofBaseGLRenderer.
◆ getNativeViewport()
|
virtual |
Get this renderer's current native viewport.
Unlike getViewport(), this method gets this renderer's current viewport without orientation and vertical flipping applied.
- Returns
- This renderer's native viewport as a rectangle.
- See also
- getViewport()
Implements ofBaseRenderer.
◆ getPath()
|
virtual |
Get a reference to the path used internally by this renderer.
- Returns
- A reference to the path used internally by this renderer.
Implements ofBaseRenderer.
◆ getRectMode()
|
virtual |
Get this renderer's current rect mode.
Possible rect modes include OF_RECTMODE_CORNER and OF_RECTMODE_CENTER.
- Returns
- The renderer's current rect mode.
- See also
- ofRectMode
Implements ofBaseRenderer.
◆ getStyle()
|
virtual |
Get this renderer's current style object.
- Returns
- This renderer's current style object.
Implements ofBaseRenderer.
◆ getType()
|
inlinevirtual |
Get the string representation of the renderer type.
For example, this method may return "GL", "ProgrammableGL", or another type depending on the renderer being used.
- Returns
- The string representation of the renderer type.
Implements ofBaseRenderer.
◆ getVideoShader()
const ofShader * ofGLProgrammableRenderer::getVideoShader | ( | const ofBaseVideoDraws & | video | ) | const |
◆ getViewportHeight()
|
virtual |
Get the renderer's current viewport width.
- Returns
- The renderer's current viewport width.
Implements ofBaseRenderer.
◆ getViewportWidth()
|
virtual |
Get the renderer's current viewport width.
- Returns
- The renderer's current viewport width.
Implements ofBaseRenderer.
◆ isVFlipped()
|
virtual |
Returns true if the renderer's current viewport is vertically flipped.
- Returns
- True if the renderer's current viewport is vertically flipped.
Implements ofBaseRenderer.
◆ loadIdentityMatrix()
|
virtual |
Load this renderer's identity matrix.
This identity matrix is an mat4 matrix with 1s on the main diagonal and 0s elsewhere. [ [1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1] ]
Matrix multiplications using this matrix as the multiplier will yield no change in the multiplicand matrix.
Implements ofBaseRenderer.
◆ loadMatrix() [1/2]
|
virtual |
Load m as this renderer's current matrix.
m
can be passed to loadMatrix() in this way from raw data
- Parameters
-
m Float pointer to an 4x4 matrix.
Implements ofBaseRenderer.
◆ loadMatrix() [2/2]
|
virtual |
Load a matrix as this renderer's current matrix.
- Parameters
-
m The matrix to load into this renderer.
Implements ofBaseRenderer.
◆ loadViewMatrix()
|
virtual |
Load m
into this renderer's matrix stack as a view matrix.
- Parameters
-
m The view matrix to load into this renderer's matrix stack.
Implements ofBaseRenderer.
◆ matrixMode()
|
virtual |
Sets this renderer's current matrix mode.
The possible matrix modes include: OF_MATRIX_MODELVIEW OF_MATRIX_PROJECTION OF_MATRIX_TEXTURE
- Parameters
-
mode The matrix mode this renderer's matrix should use.
Implements ofBaseRenderer.
◆ multMatrix() [1/2]
|
virtual |
Multiply this renderer's current matrix by m
.
m
can be passed to loadMatrix() in this way with raw data
- Parameters
-
m Float pointer to an mat4 to multiply this renderer's current matrix by.
Implements ofBaseRenderer.
◆ multMatrix() [2/2]
|
virtual |
Multiply this renderer's current matrix by m
.
- Parameters
-
m The matrix to multiply this renderer's current matrix by.
Implements ofBaseRenderer.
◆ multViewMatrix()
|
virtual |
Multiply this renderer's view matrix by m
.
- Parameters
-
m The matrix to multiply this renderer's view matrix by.
Implements ofBaseRenderer.
◆ popMatrix()
|
virtual |
Pops this renderer's current matrix stack.
popMatrix() restores the renderer's matrix to the state it was last saved with with a call to pushMatrix().
Implements ofBaseRenderer.
◆ popStyle()
|
virtual |
Pop this renderer's current style from its internal style stack.
This restores the style that was last saved with pushStyle().
Implements ofBaseRenderer.
◆ popView()
|
virtual |
Pop the current viewport from the renderer's view stack.
popView() restores the renderer's viewport to the state it was last saved with with a call to pushView().
- See also
- viewport()
Implements ofBaseRenderer.
◆ pushMatrix()
|
virtual |
Pushes this renderer's matrix stack down by one.
pushMatrix() saves the renderer's current matrix allowing new transformations and scales to effect only the new matrix created by this method. Should be paired with a call to popMatrix().
Implements ofBaseRenderer.
◆ pushStyle()
|
virtual |
Push this renderer's current style into its internal style stack.
This creates a new style object used by this renderer internally until popStyle() is called.
Implements ofBaseRenderer.
◆ pushView()
|
virtual |
Push the current viewport into the renderer's viewport stack.
pushViewport() save the current viewport to the renderer's viewport history stack allowing new viewport operations to effect only the new viewport created by this method. Should be paired with popView.
- See also
- viewport()
Implements ofBaseRenderer.
◆ rotateRad() [1/2]
|
virtual |
Rotate this renderer's current matrix by degrees
about the z axis.
This method is an alias of rotateZ().
- Parameters
-
degrees Degrees to rotate about the z axis.
- See also
- rotateZ()
Implements ofBaseRenderer.
◆ rotateRad() [2/2]
|
virtual |
Rotate this renderer's current matrix by degrees
about a euler.
- Parameters
-
degrees Degrees to rotate about vecX, vecY, and vecZ. vecX The x axis to rotate about. vecY The y axis to rotate about. vecZ The z axis to rotate about.
Implements ofBaseRenderer.
◆ rotateXRad()
|
virtual |
Rotate this renderer's current matrix by degrees
about the x axis.
- Parameters
-
degrees Degrees to rotate about the x axis.
Implements ofBaseRenderer.
◆ rotateYRad()
|
virtual |
Rotate this renderer's current matrix by degrees
about the y axis.
- Parameters
-
degrees Degrees to rotate about the y axis.
Implements ofBaseRenderer.
◆ rotateZRad()
|
virtual |
Rotate this renderer's current matrix by degrees
about the z axis.
- Parameters
-
degrees Degrees to rotate about the z axis.
Implements ofBaseRenderer.
◆ saveFullViewport()
|
virtual |
Fill an ofPixels object with the contents of the current screen.
- Parameters
-
pixels The pixels object to fill with the pixels from the screen.
Implements ofBaseGLRenderer.
◆ saveScreen()
|
virtual |
Fill an ofPixels object with a subsection of the current screen.
Screen Pixels
- Parameters
-
x The x coordinate to use when specifying the bounds of the subsection of the screen to save into pixels
.y The y coordinate to use when specifying the bounds of the subsection of the screen to save into pixels
.w The width to use when specifying the bounds of the subsection of the screen to save into pixels
.h The height to use when specifying the bounds of the subsection of the screen to save into pixels
.pixels The pixels object to fill with the pixels from the screen.
Implements ofBaseGLRenderer.
◆ scale()
|
virtual |
Scale this renderer's current matrix by xAmnt, yAmnt, and zAmnt.
- Parameters
-
xAmnt The amount to scale this renderer's current matrix's x axis by. yAmnt The amount to scale this renderer's current matrix's y axis by. zAmnt The amount to scale this renderer's current matrix's z axis by. Defaults to 1.
Implements ofBaseRenderer.
◆ setAlphaMaskTex()
|
virtual |
Enable alpha masking using this texture as the mask source.
tex
should be a grayscale image whose pixels will be used to set the alpha value of the previously bound texture or framebuffer. Darker pixels cause transparency in the masked image. Disable a mask being used in this way with disableAlphaMask().
- Parameters
-
tex The texture to use as the alpha mask.
- See also
- disableAlphaMask()
Implements ofBaseGLRenderer.
◆ setBackgroundAuto()
|
virtual |
Enable/disable automatic redrawing of the background each frame.
- Parameters
-
bManual False to disable automatic background redrawing.
Implements ofBaseRenderer.
◆ setBackgroundColor()
|
virtual |
Set this renderer's background color.
- Parameters
-
c The color to request this renderer to use.
Implements ofBaseRenderer.
◆ setBitmapTextMode()
|
virtual |
Set this renderer's bitmap text mode.
Possible bitmap texture modes include: OF_BITMAPMODE_SIMPLE OF_BITMAPMODE_SCREEN OF_BITMAPMODE_VIEWPORT OF_BITMAPMODE_MODEL OF_BITMAPMODE_MODEL_BILLBOARD
- Parameters
-
mode The bitmap mode to request this renderer to use.
- See also
- ofDrawBitmapMode
Implements ofBaseRenderer.
◆ setBlendMode()
|
virtual |
Set this renderer's current blend mode.
Possible blend modes include:
Rotate this renderer's current matrix by degrees
about the z axis.
This method is an alias of rotateZ().
- Parameters
-
degrees Degrees to rotate about the z axis.
- See also
- rotateZ() OF_BLENDMODE_DISABLED OF_BLENDMODE_ALPHA OF_BLENDMODE_ADD OF_BLENDMODE_SUBTRACT OF_BLENDMODE_MULTIPLY OF_BLENDMODE_SCREEN
- Parameters
-
blendMode The blend mode to request this renderer to use.
Implements ofBaseRenderer.
◆ setCircleResolution()
|
virtual |
Set the resolution to use when drawing ellipses with this renderer.
- Parameters
-
res The number of points to use when drawing circles and ellipses with this renderer.
Implements ofBaseRenderer.
◆ setColor() [1/5]
|
virtual |
Set the global color this renderer will use when drawing.
The renderer will continue using a color set by setColor() until another call to setColor() changes the drawing color.
- Parameters
-
color The color to use when drawing.
Implements ofBaseRenderer.
◆ setColor() [2/5]
|
virtual |
Set the global color this renderer will use when drawing.
The renderer will continue using a color set by setColor() until another call to setColor() changes the drawing color.
- Parameters
-
color The color to use when drawing. _a The alpha value between 0 and 255 to use when drawing.
Implements ofBaseRenderer.
◆ setColor() [3/5]
|
virtual |
Set the global color this renderer will use when drawing.
The renderer will continue using a color set by setColor() until another call to setColor() changes the drawing color.
- Parameters
-
gray The grayscale value to use when drawing.
Implements ofBaseRenderer.
◆ setColor() [4/5]
|
virtual |
Set the global color this renderer will use when drawing.
The renderer will continue using a color set by setColor() until another call to setColor() changes the drawing color.
- Parameters
-
r The red value between 0 and 255 to use when drawing. g The green value between 0 and 255 to use when drawing. b The blue value between 0 and 255 to use when drawing.
Implements ofBaseRenderer.
◆ setColor() [5/5]
|
virtual |
Set the global color this renderer will use when drawing.
The renderer will continue using a color set by setColor() until another call to setColor() changes the drawing color.
- Parameters
-
r The red value between 0 and 255 to use when drawing. g The green value between 0 and 255 to use when drawing. b The blue value between 0 and 255 to use when drawing. a The alpha value between 0 and 255 to use when drawing.
Implements ofBaseRenderer.
◆ setCoordHandedness()
|
virtual |
Set the coordinate handidness of this renderer.
Possible handednesses include OF_LEFT_HANDED and OF_RIGHT_HANDED. In a left handed coordinate system positive x, y and z axes point right, up and forward, respectively and positive rotation is clockwise about the axis of rotation. In a right handed coordinate system the positive x and y axes point right and up, and the negative z axis points forward and positive rotation is counterclockwise about the axis of rotation.
- Parameters
-
handedness The handedness to set this renderer to use.
- See also
- http://seanmiddleditch.com/matrices-handedness-pre-and-post-multiplication-row-vs-column-major-and-notations/
- https://www.evl.uic.edu/ralph/508S98/coordinates.html
Implements ofBaseRenderer.
◆ setCurveResolution()
|
virtual |
Set the resolution used when drawing curves with this renderer.
- Parameters
-
resolution The resolution to request this renderer to use when drawing curves.
Implements ofBaseRenderer.
◆ setDepthTest()
|
virtual |
Enable/disable depth testing with this renderer.
When depth testing is enabled the order shapes are drawn with the renderer is dependent on their distance from the camera rather than the order their drawing methods were called. This should be enabled when expecting normal behavior when drawing 3D scenes.
- Parameters
-
depthTest True to enable depth testing.
Implements ofBaseRenderer.
◆ setFillMode()
|
virtual |
set this renderer's fill flag.
Possible fill flags include OF_OUTLINE and OF_FILLED.
- Parameters
-
fill The fill flag to request this renderer to use.
- See also
- ofFillFlag
Implements ofBaseRenderer.
◆ setGlobalAmbientColor()
|
inlinevirtual |
Set the global ambient light color.
- Parameters
-
c The color to set this renderer to use as ambient lighting.
Implements ofBaseGLRenderer.
◆ setHexColor()
|
virtual |
Set the global color this renderer will use when drawing.
The renderer will continue using a color set by setColor() until another call to setColor() changes the drawing color.
- Parameters
-
hexColor The hexidecimal representation of the color to use when drawing.
Implements ofBaseRenderer.
◆ setLightAmbientColor()
|
inlinevirtual |
Set the ambient light color for a light at a specific index.
- Parameters
-
lightIndex The index of the light to set the ambient color of. c The color to set the ambient light.
Implements ofBaseGLRenderer.
◆ setLightAttenuation()
|
inlinevirtual |
Set the light attenuation for a light at a specific index.
- Parameters
-
lightIndex The index of the light whose spot concentration will be set. constant Set the constant attenuation factor of the light at lightIndex
.linear Set the linear attenuation factor of the light at lightIndex
.quadratic Set the quadratic attenuation factor of the light at lightIndex
.
- See also
- glLightf()
- GL_CONSTANT_ATTENUATION
- GL_LINEAR_ATTENUATION
- GL_QUADRATIC_ATTENUATION
Implements ofBaseGLRenderer.
◆ setLightDiffuseColor()
|
inlinevirtual |
Set the diffues light color for a light at a specific index.
- Parameters
-
lightIndex The index of the light to set the diffuse color of. c The color to set the diffuse light.
Implements ofBaseGLRenderer.
◆ setLightPosition()
|
inlinevirtual |
Set the position of a light at a specific index.
- Parameters
-
lightIndex The index of the light to set the position color of. position A vector of four values that specify the position of the light in homogeneous object coordinates.
- See also
- GL_POSITION
Implements ofBaseGLRenderer.
◆ setLightSpecularColor()
|
inlinevirtual |
Set the specular light color for a light at a specific index.
- Parameters
-
lightIndex The index of the light to set the specular color of. c The color to set the specular light.
Implements ofBaseGLRenderer.
◆ setLightSpotConcentration()
|
inlinevirtual |
Set the spotlight concentration (exponent) for a light at a specific index.
- Parameters
-
lightIndex The index of the light whose spot concentration will be set. exponent The spot light exponent value.
- See also
- GL_SPOT_EXPONENT
Implements ofBaseGLRenderer.
◆ setLightSpotDirection()
|
inlinevirtual |
Set the spot direction of a light at a specific index.
- Parameters
-
lightIndex The index of the light to set the spot direction of. direction A vector of four values that specify the direction of the light in homogeneous object coordinates.
- See also
- GL_SPOT_DIRECTION
Implements ofBaseGLRenderer.
◆ setLightSpotlightCutOff()
|
inlinevirtual |
Set the spot light cutoff for a light at a specific index.
- Parameters
-
lightIndex The index of the light whose spot cutoff will be set. spotCutOff The spot light cut off value.
- See also
- GL_SPOT_CUTOFF
Implements ofBaseGLRenderer.
◆ setLineSmoothing()
|
virtual |
Enable/disable line smoothing for this renderer if it's supported.
- Parameters
-
smooth True to enable line smoothing for this renderer if it's supported.
Implements ofBaseRenderer.
◆ setLineWidth()
|
virtual |
Set the line width this renderer should use when drawing lines.
- Parameters
-
lineWidth The line width to request this renderer to use.
Implements ofBaseRenderer.
◆ setOrientation()
|
virtual |
set this renderer's orientation.
Possible orientation values include: OF_ORIENTATION_DEFAULT OF_ORIENTATION_180 OF_ORIENTATION_90_LEFT OF_ORIENTATION_90_RIGHT OF_ORIENTATION_UNKNOWN
- Parameters
-
orientation The orientation to use with this renderer. vFlip True if the orientation should be vertically flipped.
- See also
- ofOrientation
Implements ofBaseRenderer.
◆ setPolyMode()
|
virtual |
Set this renderer's poly winding mode.
Possible poly winding modes include: OF_POLY_WINDING_ODD OF_POLY_WINDING_NONZERO OF_POLY_WINDING_POSITIVE OF_POLY_WINDING_NEGATIVE OF_POLY_WINDING_ABS_GEQ_TWO
- Parameters
-
mode The poly winding mode to request this renderer to use.
- See also
- ofPolyWindingMode
Implements ofBaseRenderer.
◆ setRectMode()
|
virtual |
Set this renderer's rect mode.
Possible rect modes include OF_RECTMODE_CORNER and OF_RECTMODE_CENTER.
- Parameters
-
mode The rect mode to request this renderer to use.
- See also
- ofRectMode
Implements ofBaseRenderer.
◆ setSmoothLighting()
|
inlinevirtual |
Enable/disable smooth light shading.
- Parameters
-
b True to enable smooth light shading.
Implements ofBaseGLRenderer.
◆ setStyle()
|
virtual |
Set this renderer's current style object.
- Parameters
-
style The style object to set this renderer to use.
Implements ofBaseRenderer.
◆ setup()
void ofGLProgrammableRenderer::setup | ( | int | glVersionMajor, |
int | glVersionMinor | ||
) |
◆ setupGraphicDefaults()
|
virtual |
setup the default graphics settings for this renderer.
Implements ofBaseRenderer.
◆ setupScreen()
|
virtual |
setup the default screen settings for this renderer.
Implements ofBaseRenderer.
◆ setupScreenOrtho()
|
virtual |
Setup the renderer to use an orthographic matrix.
- Parameters
-
width The width of the desired orthographic matrix. Defaults to -1 setting its width according to the rendering surface's width. height The height of the desired orthographic matrix. Defaults to -1 setting its height according to the rendering surface's height. nearDist The near clipping distance to use with the orthographic matrix. Setting this value to 0 uses the defualt near distance. Defaults to 0. farDist The far clipping distance to use with the orthographic matrix. Setting this value to 0 uses the defualt near distance. Defaults to 0.
Implements ofBaseRenderer.
◆ setupScreenPerspective()
|
virtual |
Setup the renderer to use a perspective matrix.
- Parameters
-
width The width of the desired perspective matrix. Defaults to -1 setting its width according to the rendering surface's width. height The height of the desired perspective matrix. Defaults to Defaults to -1 setting its width according to the rendering surface's width. fov The field of view to use with the perspective matrix. Defaults to 60. nearDist The near clipping distance to use with the perspective matrix. Setting this value to 0 uses the default near distance. Defaults to 0. farDist The far clipping distance to use with the perspective matrix. Setting this value to 0 uses the default near distance. Defaults to 0.
Implements ofBaseRenderer.
◆ setVideoShaderUniforms()
void ofGLProgrammableRenderer::setVideoShaderUniforms | ( | const ofBaseVideoDraws & | video, |
const ofShader & | shader | ||
) | const |
◆ startRender()
|
virtual |
Starts using this renderer as the rendering surface.
Implements ofBaseRenderer.
◆ translate() [1/2]
|
virtual |
Translate this renderer's current matrix by a point.
- Parameters
-
p The 3D point to translate this renderer's current matrix by.
Implements ofBaseRenderer.
◆ translate() [2/2]
|
virtual |
Translate this renderer's current matrix by x, y, and z.
- Parameters
-
x The x coordinate to translate this renderer's current matrix by. y The y coordinate to translate this renderer's current matrix by. z The z coordinate to translate this renderer's current matrix by. Defaults to 0.
Implements ofBaseRenderer.
◆ unbind() [1/8]
|
virtual |
Unbind a material previously bound to this renderer with bind().
- Parameters
-
material The material that is currently bound to this renderer.
Implements ofBaseGLRenderer.
◆ unbind() [2/8]
|
virtual |
Unbind a video previously bound to this renderer with bind().
- Parameters
-
video The video that is currently bound to this renderer.
Implements ofBaseGLRenderer.
◆ unbind() [3/8]
|
virtual |
Unbind the camera from this renderer.
- Parameters
-
camera The camera to unbind from this renderer.
Reimplemented from ofBaseGLRenderer.
◆ unbind() [4/8]
|
virtual |
Unbind a frame buffer previously bound to this renderer with bind().
- Parameters
-
fbo The frame buffer that is currently bound to this renderer.
Implements ofBaseGLRenderer.
◆ unbind() [5/8]
|
virtual |
Unbind a shader previously bound to this renderer with bind().
- Parameters
-
shader The shader that is currently bound to this renderer.
Implements ofBaseGLRenderer.
◆ unbind() [6/8]
|
virtual |
Implements ofBaseGLRenderer.
◆ unbind() [7/8]
|
virtual |
Implements ofBaseGLRenderer.
◆ unbind() [8/8]
|
virtual |
Unbind a texture previously bound to this renderer with bind().
- Parameters
-
texture The texture that is currently bound to this renderer. location The location texture
was bound at.
Implements ofBaseGLRenderer.
◆ viewport() [1/2]
|
virtual |
Set this renderer's viewport manually using x, y, width, and height.
- Parameters
-
x The x coordinate of the viewport. Defaults to 0. y The y coordinate of the viewport. Defaults to 0. w The width of the viewport. Defaults to -1 setting its width according to the rendering surface's width. h The height of the viewport. Defaults to -1 setting its height according to the rendering surface's height.
Implements ofBaseRenderer.
◆ viewport() [2/2]
|
virtual |
Set this renderer's viewport using a rectangle.
This method uses the ofGetWidth() and ofGetHeight() to set the width and height of the viewport. It also automatically creates near and far clipping planes based on this width and height.
Implements ofBaseRenderer.
Member Data Documentation
◆ TYPE
|
static |
The documentation for this class was generated from the following files:
- /Users/icq4ever/Desktop/oF0120/libs/openFrameworks/gl/ofGLProgrammableRenderer.h
- /Users/icq4ever/Desktop/oF0120/libs/openFrameworks/gl/ofGLProgrammableRenderer.cpp