reference

This documentation is automatically generated from the openFrameworks source code using doxygen and refers to the most recent release, version 0.12.0.

ofGLProgrammableRenderer Class Reference

#include <ofGLProgrammableRenderer.h>

Inheritance diagram for ofGLProgrammableRenderer:
ofBaseGLRenderer ofBaseRenderer

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.
 
ofPathgetPath ()
 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 ofShadergetCurrentShader () 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 ofShadergetVideoShader (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 of3dGraphicsget3dGraphics () const
 Get a const reference of this renderer's 3D graphics object.
 
of3dGraphicsget3dGraphics ()
 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.
 
- Public Member Functions inherited from ofBaseRenderer
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]

void ofGLProgrammableRenderer::background ( const ofColor c)
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
cThe color to paint the background with.

Implements ofBaseRenderer.

◆ background() [2/4]

void ofGLProgrammableRenderer::background ( float  brightness)
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
brightnessThe grayscale value between 0 and 255 to paint the background with.

Implements ofBaseRenderer.

◆ background() [3/4]

void ofGLProgrammableRenderer::background ( int  hexColor,
float  _a = 255.0f 
)
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
hexColorThe 24-bit hex representation of the color to paint the background with.
_aThe alpha value between 0 and 255 to apply to hexColor when when painting the background.

Implements ofBaseRenderer.

◆ background() [4/4]

void ofGLProgrammableRenderer::background ( int  r,
int  g,
int  b,
int  a = 255 
)
virtual

Immediately paint a background color to the screen.

Parameters
rThe red value between 0 and 255 to use for the background.
gThe green value between 0 and 255 to use for the background.
bThe blue value between 0 and 255 to use for the background.
aThe alpha value between 0 and 255 to use for the background.

Implements ofBaseRenderer.

◆ begin()

void ofGLProgrammableRenderer::begin ( const ofFbo fbo,
ofFboMode  mode 
)
virtual

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
fboThe frame buffer to use as this renderer's render surface.
modeThe fbo mode to use.
See also
ofFboMode

Implements ofBaseGLRenderer.

◆ bind() [1/8]

void ofGLProgrammableRenderer::bind ( const ofBaseMaterial material)
virtual

Bind a material to be used with this renderer.

Implements ofBaseGLRenderer.

◆ bind() [2/8]

void ofGLProgrammableRenderer::bind ( const ofBaseVideoDraws video)
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
videoThe video whose texture should be bound to this renderer.

Implements ofBaseGLRenderer.

◆ bind() [3/8]

void ofGLProgrammableRenderer::bind ( const ofCamera camera,
const ofRectangle viewport 
)
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
cameraThe camera to bind to this renderer.
viewportThe viewport to use when binding camera to this renderer.

Reimplemented from ofBaseGLRenderer.

◆ bind() [4/8]

void ofGLProgrammableRenderer::bind ( const ofFbo fbo)
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
fboThe frame buffer whose texture should be bound to this renderer.

Implements ofBaseGLRenderer.

◆ bind() [5/8]

void ofGLProgrammableRenderer::bind ( const ofShader shader)
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
shaderThe shader to bind to this renderer.
See also
glUseProgram()

Implements ofBaseGLRenderer.

◆ bind() [6/8]

void ofGLProgrammableRenderer::bind ( const ofShadow shadow)
virtual

Implements ofBaseGLRenderer.

◆ bind() [7/8]

void ofGLProgrammableRenderer::bind ( const ofShadow shadow,
GLenum  aCubeFace 
)
virtual

Implements ofBaseGLRenderer.

◆ bind() [8/8]

void ofGLProgrammableRenderer::bind ( const ofTexture texture,
int  location 
)
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
textureThe texture to bind with this renderer.
locationThe texture location to bind this texture to.

Implements ofBaseGLRenderer.

◆ bindForBlitting()

void ofGLProgrammableRenderer::bindForBlitting ( const ofFbo fboSrc,
ofFbo fboDst,
int  attachmentPoint 
)
virtual

Bind source and destination frame buffers for blitting.

Parameters
fboSrcThe source frame buffer to bind for blitting.
fboDstThe destination frame buffer to bind for blitting.
attachmentPointThe attatchement point to use when binding.
Warning
This method is unavailable when using OpenGLES.
See also
https://en.wikipedia.org/wiki/Bit_blit

Implements ofBaseGLRenderer.

◆ clear() [1/3]

void ofGLProgrammableRenderer::clear ( )
virtual

Clear this renderer's current color and bit depths.

clear() will clear the screen entirely.

Implements ofBaseRenderer.

◆ clear() [2/3]

void ofGLProgrammableRenderer::clear ( float  brightness,
float  a = 0 
)
virtual

Clear this renderer's color and bit depths replacing them.

clear() will clear the screen entirely.

Parameters
brightnessThe grayscale value between 0 and 255 to use when clearing the screen.
aThe alpha value between 0 and 255 to use when clearing the screen. Defaults to 0.

Implements ofBaseRenderer.

◆ clear() [3/3]

void ofGLProgrammableRenderer::clear ( float  r,
float  g,
float  b,
float  a = 0 
)
virtual

Clear this renderer's color and bit depths and replace them.

clear() will clear the screen entirely.

Parameters
rThe red value between 0 and 255 to use when clearing the screen.
gThe green value between 0 and 255 to use when clearing the screen.
bThe blue value between 0 and 255 use when clearing the screen.
aThe alpha value between 0 and 255 use when clearing the screen. Defaults to 0.

Implements ofBaseRenderer.

◆ clearAlpha()

void ofGLProgrammableRenderer::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()

void ofGLProgrammableRenderer::disableAlphaMask ( )
virtual

Disable this renderer's current alpha mask texture.

See also
setAlphaMaskTex()

Implements ofBaseGLRenderer.

◆ disableAntiAliasing()

void ofGLProgrammableRenderer::disableAntiAliasing ( )
virtual

Disable this renderer from using anti-aliasing.

Implements ofBaseRenderer.

◆ disableLight()

void ofGLProgrammableRenderer::disableLight ( int  lightIndex)
virtual

Disable a light at a specific index.

Parameters
lightIndexThe index of the light to disable.

Implements ofBaseGLRenderer.

◆ disableLighting()

void ofGLProgrammableRenderer::disableLighting ( )
virtual

Disable lighting with this renderer.

Implements ofBaseGLRenderer.

◆ disablePointSprites()

void ofGLProgrammableRenderer::disablePointSprites ( )
virtual

Disable point sprites when using this renderer.

Implements ofBaseGLRenderer.

◆ disableSeparateSpecularLight()

void ofGLProgrammableRenderer::disableSeparateSpecularLight ( )
inlinevirtual

Disable seperate specular lighting parameters.

Implements ofBaseGLRenderer.

◆ disableTextureTarget()

void ofGLProgrammableRenderer::disableTextureTarget ( int  textureTarget,
int  textureLocation 
)
virtual

Unbind the texture target at the texture location.

textureTarget can be accessed from an ofTexture with ofTexture::texData::textureTarget.

Parameters
textureTargetThe texture target to unbind from this renderer.
textureLocationThe location that texture was bound with.
See also
ofTextureData()

Implements ofBaseGLRenderer.

◆ draw() [1/37]

void ofGLProgrammableRenderer::draw ( const of3dPrimitive model,
ofPolyRenderMode  renderType 
) const
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
modelThe model to draw with this renderer.
renderTypeThe render mode to use when drawing the model with this renderer.
See also
ofPolyRenderMode

Reimplemented from ofBaseGLRenderer.

◆ draw() [2/37]

virtual void ofBaseRenderer::draw ( const of3dPrimitive model,
ofPolyRenderMode  renderType 
) const
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
modelThe model to draw with this renderer.
renderTypeThe render mode to use when drawing the model with this renderer.
See also
ofPolyRenderMode

Reimplemented from ofBaseGLRenderer.

◆ draw() [3/37]

virtual void ofBaseRenderer::draw ( const of3dPrimitive model,
ofPolyRenderMode  renderType 
) const
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
modelThe model to draw with this renderer.
renderTypeThe render mode to use when drawing the model with this renderer.
See also
ofPolyRenderMode

Reimplemented from ofBaseGLRenderer.

◆ draw() [4/37]

void ofGLProgrammableRenderer::draw ( const ofBaseVideoDraws video,
float  x,
float  y,
float  w,
float  h 
) const
virtual

Draw a video with this renderer.

Parameters
videoThe video with draw with this renderer.
xThe x coordinate to use to draw video with this renderer.
yThe y coordinate to use to draw video with this renderer.
wThe width to use to draw the video with this renderer.
hThe height to use to draw the video with this renderer.

Reimplemented from ofBaseGLRenderer.

◆ draw() [5/37]

virtual void ofBaseRenderer::draw ( const ofBaseVideoDraws video,
float  x,
float  y,
float  w,
float  h 
) const
virtual

Draw a video with this renderer.

Parameters
videoThe video with draw with this renderer.
xThe x coordinate to use to draw video with this renderer.
yThe y coordinate to use to draw video with this renderer.
wThe width to use to draw the video with this renderer.
hThe height to use to draw the video with this renderer.

Reimplemented from ofBaseGLRenderer.

◆ draw() [6/37]

virtual void ofBaseRenderer::draw ( const ofBaseVideoDraws video,
float  x,
float  y,
float  w,
float  h 
) const
virtual

Draw a video with this renderer.

Parameters
videoThe video with draw with this renderer.
xThe x coordinate to use to draw video with this renderer.
yThe y coordinate to use to draw video with this renderer.
wThe width to use to draw the video with this renderer.
hThe height to use to draw the video with this renderer.

Reimplemented from ofBaseGLRenderer.

◆ draw() [7/37]

void ofGLProgrammableRenderer::draw ( const ofFloatImage image,
float  x,
float  y,
float  z,
float  w,
float  h,
float  sx,
float  sy,
float  sw,
float  sh 
) const
virtual

Draw an image with this renderer.

Parameters
imageThe image to draw with this renderer.
xThe x coordinate to use to draw image with this renderer.
yThe y coordinate to use to draw image with this renderer.
zThe z coordinate to use to draw image with this renderer.
wThe width to use to draw image with this renderer.
hThe height to use to draw image with this renderer.
sxThe subsection x axis offset within the image texture.
syThe subsection y axis offset within the image texture.
swThe subsection width offset within the image texture.
shThe subsection height offset within the image texture.

Reimplemented from ofBaseGLRenderer.

◆ draw() [8/37]

virtual void ofBaseRenderer::draw ( const ofFloatImage image,
float  x,
float  y,
float  z,
float  w,
float  h,
float  sx,
float  sy,
float  sw,
float  sh 
) const
virtual

Draw an image with this renderer.

Parameters
imageThe image to draw with this renderer.
xThe x coordinate to use to draw image with this renderer.
yThe y coordinate to use to draw image with this renderer.
zThe z coordinate to use to draw image with this renderer.
wThe width to use to draw image with this renderer.
hThe height to use to draw image with this renderer.
sxThe subsection x axis offset within the image texture.
syThe subsection y axis offset within the image texture.
swThe subsection width offset within the image texture.
shThe subsection height offset within the image texture.

Reimplemented from ofBaseGLRenderer.

◆ draw() [9/37]

virtual void ofBaseRenderer::draw ( const ofFloatImage image,
float  x,
float  y,
float  z,
float  w,
float  h,
float  sx,
float  sy,
float  sw,
float  sh 
) const
virtual

Draw an image with this renderer.

Parameters
imageThe image to draw with this renderer.
xThe x coordinate to use to draw image with this renderer.
yThe y coordinate to use to draw image with this renderer.
zThe z coordinate to use to draw image with this renderer.
wThe width to use to draw image with this renderer.
hThe height to use to draw image with this renderer.
sxThe subsection x axis offset within the image texture.
syThe subsection y axis offset within the image texture.
swThe subsection width offset within the image texture.
shThe subsection height offset within the image texture.

Reimplemented from ofBaseGLRenderer.

◆ draw() [10/37]

void ofGLProgrammableRenderer::draw ( const ofImage image,
float  x,
float  y,
float  z,
float  w,
float  h,
float  sx,
float  sy,
float  sw,
float  sh 
) const
virtual

Draw an image with this renderer.

Parameters
imageThe image to draw with this renderer.
xThe x coordinate to use when drawing image with this renderer.
yThe y coordinate to use to draw image with this renderer.
zThe z coordinate to use to drawing image with this renderer.
wThe width to use to draw the image with this renderer.
hThe height to use to draw the image with this renderer.
sxThe subsection x axis offset within the image texture.
syThe subsection y axis offset within the image texture.
swThe subsection width offset within the image texture.
shThe subsection height offset within the image texture.

Reimplemented from ofBaseGLRenderer.

◆ draw() [11/37]

virtual void ofBaseRenderer::draw ( const ofImage image,
float  x,
float  y,
float  z,
float  w,
float  h,
float  sx,
float  sy,
float  sw,
float  sh 
) const
virtual

Draw an image with this renderer.

Parameters
imageThe image to draw with this renderer.
xThe x coordinate to use when drawing image with this renderer.
yThe y coordinate to use to draw image with this renderer.
zThe z coordinate to use to drawing image with this renderer.
wThe width to use to draw the image with this renderer.
hThe height to use to draw the image with this renderer.
sxThe subsection x axis offset within the image texture.
syThe subsection y axis offset within the image texture.
swThe subsection width offset within the image texture.
shThe subsection height offset within the image texture.

Reimplemented from ofBaseGLRenderer.

◆ draw() [12/37]

virtual void ofBaseRenderer::draw ( const ofImage image,
float  x,
float  y,
float  z,
float  w,
float  h,
float  sx,
float  sy,
float  sw,
float  sh 
) const
virtual

Draw an image with this renderer.

Parameters
imageThe image to draw with this renderer.
xThe x coordinate to use when drawing image with this renderer.
yThe y coordinate to use to draw image with this renderer.
zThe z coordinate to use to drawing image with this renderer.
wThe width to use to draw the image with this renderer.
hThe height to use to draw the image with this renderer.
sxThe subsection x axis offset within the image texture.
syThe subsection y axis offset within the image texture.
swThe subsection width offset within the image texture.
shThe subsection height offset within the image texture.

Reimplemented from ofBaseGLRenderer.

◆ draw() [13/37]

void ofBaseRenderer::draw ( const ofMesh mesh,
ofPolyRenderMode  renderType 
) const
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
meshThe mesh to draw with this renderer.
renderTypeThe render mode to use to draw mesh with this renderer.
See also
ofPolyRenderMode

Reimplemented from ofBaseGLRenderer.

◆ draw() [14/37]

void ofBaseRenderer::draw ( const ofMesh mesh,
ofPolyRenderMode  renderType 
) const
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
meshThe mesh to draw with this renderer.
renderTypeThe render mode to use to draw mesh with this renderer.
See also
ofPolyRenderMode

Reimplemented from ofBaseGLRenderer.

◆ draw() [15/37]

void ofGLProgrammableRenderer::draw ( const ofMesh vertexData,
ofPolyRenderMode  renderType,
bool  useColors,
bool  useTextures,
bool  useNormals 
) const
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
vertexDataThe mesh to draw with this renderer.
renderTypeThe render mode to use to draw vertexData to this renderer.
useColorsTrue to use per-vertex coloring to draw the vertexData.
useTexturesTrue to use texture coordinates to draw the vertexData.
useNormalsTrue to use normals to draw the vertexData.
See also
ofPolyRenderMode

Reimplemented from ofBaseGLRenderer.

◆ draw() [16/37]

virtual void ofBaseRenderer::draw ( const ofMesh vertexData,
ofPolyRenderMode  renderType,
bool  useColors,
bool  useTextures,
bool  useNormals 
) const
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
vertexDataThe mesh to draw with this renderer.
renderTypeThe render mode to use to draw vertexData to this renderer.
useColorsTrue to use per-vertex coloring to draw the vertexData.
useTexturesTrue to use texture coordinates to draw the vertexData.
useNormalsTrue to use normals to draw the vertexData.
See also
ofPolyRenderMode

Reimplemented from ofBaseGLRenderer.

◆ draw() [17/37]

virtual void ofBaseRenderer::draw ( const ofMesh vertexData,
ofPolyRenderMode  renderType,
bool  useColors,
bool  useTextures,
bool  useNormals 
) const
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
vertexDataThe mesh to draw with this renderer.
renderTypeThe render mode to use to draw vertexData to this renderer.
useColorsTrue to use per-vertex coloring to draw the vertexData.
useTexturesTrue to use texture coordinates to draw the vertexData.
useNormalsTrue to use normals to draw the vertexData.
See also
ofPolyRenderMode

Reimplemented from ofBaseGLRenderer.

◆ draw() [18/37]

virtual void ofBaseRenderer::draw ( const ofNode model) const
virtual

Draw a node with this renderer using ofNode::customDraw().

Parameters
modelThe node to draw with this renderer.
See also
ofNode::customDraw()

Reimplemented from ofBaseGLRenderer.

◆ draw() [19/37]

virtual void ofBaseRenderer::draw ( const ofNode model) const
virtual

Draw a node with this renderer using ofNode::customDraw().

Parameters
modelThe node to draw with this renderer.
See also
ofNode::customDraw()

Reimplemented from ofBaseGLRenderer.

◆ draw() [20/37]

void ofGLProgrammableRenderer::draw ( const ofNode model) const
virtual

Draw a node with this renderer using ofNode::customDraw().

Parameters
modelThe node to draw with this renderer.
See also
ofNode::customDraw()

Reimplemented from ofBaseGLRenderer.

◆ draw() [21/37]

void ofGLProgrammableRenderer::draw ( const ofPath shape) const
virtual

Draw a path with this renderer.

Parameters
shapeThe path to draw with this renderer.

Reimplemented from ofBaseGLRenderer.

◆ draw() [22/37]

virtual void ofBaseRenderer::draw ( const ofPath shape) const
virtual

Draw a path with this renderer.

Parameters
shapeThe path to draw with this renderer.

Reimplemented from ofBaseGLRenderer.

◆ draw() [23/37]

virtual void ofBaseRenderer::draw ( const ofPath shape) const
virtual

Draw a path with this renderer.

Parameters
shapeThe path to draw with this renderer.

Reimplemented from ofBaseGLRenderer.

◆ draw() [24/37]

virtual void ofBaseRenderer::draw ( const ofPath shape,
float  x,
float  y 
) const
inlinevirtual

Draw a path with this renderer at x and y.

Parameters
shapeThe path to draw with this renderer.
xThe x coordinate to use to draw shape.
yThe y coordinate to use to draw shape.

Reimplemented from ofBaseGLRenderer.

◆ draw() [25/37]

virtual void ofBaseRenderer::draw ( const ofPath shape,
float  x,
float  y 
) const
inlinevirtual

Draw a path with this renderer at x and y.

Parameters
shapeThe path to draw with this renderer.
xThe x coordinate to use to draw shape.
yThe y coordinate to use to draw shape.

Reimplemented from ofBaseGLRenderer.

◆ draw() [26/37]

void ofGLProgrammableRenderer::draw ( const ofPolyline poly) const
virtual

Draw a polyline with this renderer.

Parameters
polyThe polyline to draw with this renderer.

Reimplemented from ofBaseGLRenderer.

◆ draw() [27/37]

virtual void ofBaseRenderer::draw ( const ofPolyline poly) const
virtual

Draw a polyline with this renderer.

Parameters
polyThe polyline to draw with this renderer.

Reimplemented from ofBaseGLRenderer.

◆ draw() [28/37]

virtual void ofBaseRenderer::draw ( const ofPolyline poly) const
virtual

Draw a polyline with this renderer.

Parameters
polyThe polyline to draw with this renderer.

Reimplemented from ofBaseGLRenderer.

◆ draw() [29/37]

void ofGLProgrammableRenderer::draw ( const ofShortImage image,
float  x,
float  y,
float  z,
float  w,
float  h,
float  sx,
float  sy,
float  sw,
float  sh 
) const
virtual

Draw an image with this renderer.

Parameters
imageThe image to draw with this renderer.
xThe x coordinate to use to draw image with this renderer.
yThe y coordinate to use to draw image with this renderer.
zThe z coordinate to use to draw image with this renderer.
wThe width to use when drawing the image with this renderer.
hThe height to use when drawing the image with this renderer.
sxThe subsection x axis offset within the image texture.
syThe subsection y axis offset within the image texture.
swThe subsection width offset within the image texture.
shThe subsection height offset within the image texture.

Reimplemented from ofBaseGLRenderer.

◆ draw() [30/37]

virtual void ofBaseRenderer::draw ( const ofShortImage image,
float  x,
float  y,
float  z,
float  w,
float  h,
float  sx,
float  sy,
float  sw,
float  sh 
) const
virtual

Draw an image with this renderer.

Parameters
imageThe image to draw with this renderer.
xThe x coordinate to use to draw image with this renderer.
yThe y coordinate to use to draw image with this renderer.
zThe z coordinate to use to draw image with this renderer.
wThe width to use when drawing the image with this renderer.
hThe height to use when drawing the image with this renderer.
sxThe subsection x axis offset within the image texture.
syThe subsection y axis offset within the image texture.
swThe subsection width offset within the image texture.
shThe subsection height offset within the image texture.

Reimplemented from ofBaseGLRenderer.

◆ draw() [31/37]

virtual void ofBaseRenderer::draw ( const ofShortImage image,
float  x,
float  y,
float  z,
float  w,
float  h,
float  sx,
float  sy,
float  sw,
float  sh 
) const
virtual

Draw an image with this renderer.

Parameters
imageThe image to draw with this renderer.
xThe x coordinate to use to draw image with this renderer.
yThe y coordinate to use to draw image with this renderer.
zThe z coordinate to use to draw image with this renderer.
wThe width to use when drawing the image with this renderer.
hThe height to use when drawing the image with this renderer.
sxThe subsection x axis offset within the image texture.
syThe subsection y axis offset within the image texture.
swThe subsection width offset within the image texture.
shThe subsection height offset within the image texture.

Reimplemented from ofBaseGLRenderer.

◆ draw() [32/37]

void ofGLProgrammableRenderer::draw ( const ofTexture image,
float  x,
float  y,
float  z,
float  w,
float  h,
float  sx,
float  sy,
float  sw,
float  sh 
) const
virtual

Draw a texture with this renderer.

Drawing

Parameters
imageThe texture to draw with this renderer.
xThe x coordinate to use when drawing the texture with this renderer.
yThe y coordinate to use to draw the texture with this renderer.
zThe z coordinate to use to draw the texture with this renderer.
wThe width to use to draw the the texture with this renderer.
hThe height to use to draw the the texture with this renderer.
sxThe subsection x axis offset within the texture.
syThe subsection y axis offset within the texture.
swThe subsection width offset within the texture.
shThe subsection height offset within the texture.

Implements ofBaseGLRenderer.

◆ draw() [33/37]

virtual void ofBaseGLRenderer::draw ( const ofTexture image,
float  x,
float  y,
float  z,
float  w,
float  h,
float  sx,
float  sy,
float  sw,
float  sh 
) const
virtual

Draw a texture with this renderer.

Drawing

Parameters
imageThe texture to draw with this renderer.
xThe x coordinate to use when drawing the texture with this renderer.
yThe y coordinate to use to draw the texture with this renderer.
zThe z coordinate to use to draw the texture with this renderer.
wThe width to use to draw the the texture with this renderer.
hThe height to use to draw the the texture with this renderer.
sxThe subsection x axis offset within the texture.
syThe subsection y axis offset within the texture.
swThe subsection width offset within the texture.
shThe subsection height offset within the texture.

Implements ofBaseGLRenderer.

◆ draw() [34/37]

void ofGLProgrammableRenderer::draw ( const ofVbo vbo,
GLuint  drawMode,
int  first,
int  total 
) const
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
vboThe vertext buffer object to draw vertices from with this renderer.
drawModeOpenGL primitive draw mode to use when drawing the vbo's vertices with this renderer.
firstThe index of the first vertex to draw from vbo.
totalThe 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 void ofBaseGLRenderer::draw ( const ofVbo vbo,
GLuint  drawMode,
int  first,
int  total 
) const
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
vboThe vertext buffer object to draw vertices from with this renderer.
drawModeOpenGL primitive draw mode to use when drawing the vbo's vertices with this renderer.
firstThe index of the first vertex to draw from vbo.
totalThe 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]

void ofGLProgrammableRenderer::draw ( const ofVboMesh mesh,
ofPolyRenderMode  renderType 
) const
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
meshThe vertex buffer mesh to draw with this renderer.
renderTypeThe poly render mode to use when drawing mesh with this renderer.
See also
ofPolyRenderMode

Implements ofBaseGLRenderer.

◆ draw() [37/37]

virtual void ofBaseGLRenderer::draw ( const ofVboMesh mesh,
ofPolyRenderMode  renderType 
) const
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
meshThe vertex buffer mesh to draw with this renderer.
renderTypeThe poly render mode to use when drawing mesh with this renderer.
See also
ofPolyRenderMode

Implements ofBaseGLRenderer.

◆ drawCircle()

void ofGLProgrammableRenderer::drawCircle ( float  x,
float  y,
float  z,
float  radius 
) const
virtual

Draw a circle using a 3D point and a radius.

Parameters
xThe x coordinate of the center of the circle.
yThe y coordinate of the center of the circle.
zThe z coordinate of the center of the circle.
radiusThe length of the radius of the circle.

Implements ofBaseRenderer.

◆ drawElements()

void ofGLProgrammableRenderer::drawElements ( const ofVbo vbo,
GLuint  drawMode,
int  amt,
int  offsetelements = 0 
) const
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
vboThe vertext buffer object to draw vertices from with this renderer.
drawModeOpenGL primitive draw mode to use when drawing the vbo's vertices with this renderer.
amtThe number of elements to be rendered.
offsetelementsThe 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()

void ofGLProgrammableRenderer::drawElementsInstanced ( const ofVbo vbo,
GLuint  drawMode,
int  amt,
int  primCount 
) const
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
vboThe vertext buffer object to draw vertices from with this renderer.
drawModeOpenGL primitive draw mode to use when drawing the vbo's vertices with this renderer.
amtThe number of elements to be rendered.
primCountSpecifies 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()

void ofGLProgrammableRenderer::drawEllipse ( float  x,
float  y,
float  z,
float  width,
float  height 
) const
virtual

Draw an ellipse using a 3D point, width, and height.

Parameters
xThe x coordinate of the center of the circle.
yThe y coordinate of the center of the circle.
zThe z coordinate of the center of the circle.
widthThe width of the circle.
heightThe height of the circle.

Implements ofBaseRenderer.

◆ drawInstanced() [1/2]

void ofGLProgrammableRenderer::drawInstanced ( const ofVbo vbo,
GLuint  drawMode,
int  first,
int  total,
int  primCount 
) const
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
vboThe vertext buffer object to draw vertices from with this renderer.
drawModeOpenGL primitive draw mode to use when drawing the vbo's vertices with this renderer.
firstThe index of the first vertex to draw from vbo.
totalThe total number of indices to draw from vbo.
primCountSpecifies 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]

void ofGLProgrammableRenderer::drawInstanced ( const ofVboMesh mesh,
ofPolyRenderMode  renderType,
int  primCount 
) const
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
meshThe vertext buffer mesh to draw vertices from with this renderer.
renderTypeThe poly render mode to use when drawing mesh with this renderer.
primCountSpecifies the number of instances of the specified range of indices to be rendered.

Implements ofBaseGLRenderer.

◆ drawLine()

void ofGLProgrammableRenderer::drawLine ( float  x1,
float  y1,
float  z1,
float  x2,
float  y2,
float  z2 
) const
virtual

Draw a line between two 3D points.

Parameters
x1The x coordinate of the first point.
y1The y coordinate of the first point.
z1The z coordinate of the first point.
x2The x coordinate of the second point.
y2The y coordinate of the second point.
z2The z coordinate of the second point.

Implements ofBaseRenderer.

◆ drawRectangle()

void ofGLProgrammableRenderer::drawRectangle ( float  x,
float  y,
float  z,
float  w,
float  h 
) const
virtual

Draw a rectangle using a 3D point and a width and height.

Parameters
xThe x coordinate of the rectangle.
yThe y coordinate of the rectangle.
zThe z coordinate of the rectangle.
wThe width of the rectangle.
hThe height of the rectangle.
See also
ofRectMode

Implements ofBaseRenderer.

◆ drawString() [1/2]

void ofGLProgrammableRenderer::drawString ( const ofTrueTypeFont font,
std::string  text,
float  x,
float  y 
) const
virtual

Draw text with this renderer using an ofTrueType font.

Parameters
fontThe font to use when drawing text.
textThe text to draw with the renderer.
xThe x position for the bottom of text.
yThe y position for the left alignment of text.

Implements ofBaseRenderer.

◆ drawString() [2/2]

void ofGLProgrammableRenderer::drawString ( std::string  text,
float  x,
float  y,
float  z 
) const
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
textThe text to draw with the renderer.
xThe x position for the bottom of text.
yThe y position for the left alignment of text.
zThe z position of the text.

Implements ofBaseRenderer.

◆ drawTriangle()

void ofGLProgrammableRenderer::drawTriangle ( float  x1,
float  y1,
float  z1,
float  x2,
float  y2,
float  z2,
float  x3,
float  y3,
float  z3 
) const
virtual

Draw a triangle using three 3D points.

Parameters
x1The x coordinate of the first point.
y1The y coordinate of the first point.
z1The z coordinate of the first point.
x2The x coordinate of the second point.
y2The y coordinate of the second point.
z2The z coordinate of the second point.
x3The x coordinate of the third point.
y3The y coordinate of the third point.
z3The z coordinate of the third point.

Implements ofBaseRenderer.

◆ enableAntiAliasing()

void ofGLProgrammableRenderer::enableAntiAliasing ( )
virtual

Enable this renderer to use anti-aliasing if it is supported.

Implements ofBaseRenderer.

◆ enableLight()

void ofGLProgrammableRenderer::enableLight ( int  lightIndex)
virtual

Enable a light at a specific index.

Parameters
lightIndexThe index of the light to enable.

Implements ofBaseGLRenderer.

◆ enableLighting()

void ofGLProgrammableRenderer::enableLighting ( )
virtual

Enable lighting with this renderer.

Lighting

Implements ofBaseGLRenderer.

◆ enablePointSprites()

void ofGLProgrammableRenderer::enablePointSprites ( )
virtual

Enable point sprites when using this renderer.

Sprites

Implements ofBaseGLRenderer.

◆ enableSeparateSpecularLight()

void ofGLProgrammableRenderer::enableSeparateSpecularLight ( )
inlinevirtual

Enable seperate specular lighting parameters.

Implements ofBaseGLRenderer.

◆ enableTextureTarget()

void ofGLProgrammableRenderer::enableTextureTarget ( const ofTexture tex,
int  textureLocation 
)
virtual

Bind the texture at the texture location.

Textures

Parameters
texThe texture to bind with this renderer.
textureLocationThe location to bind this texture.

Implements ofBaseGLRenderer.

◆ end()

void ofGLProgrammableRenderer::end ( const ofFbo fbo)
virtual

Stop using the specified frame buffer as this renderer's render surface.

Parameters
fboAn fbo that is currently being used as this renderer's render surface with a call to begin().

Implements ofBaseGLRenderer.

◆ finishRender()

void ofGLProgrammableRenderer::finishRender ( )
virtual

Stop using this renderer as the rendering surface.

Implements ofBaseRenderer.

◆ get3dGraphics() [1/2]

of3dGraphics & ofGLProgrammableRenderer::get3dGraphics ( )
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]

const of3dGraphics & ofGLProgrammableRenderer::get3dGraphics ( ) const
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()

bool ofGLProgrammableRenderer::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()

ofColor ofGLProgrammableRenderer::getBackgroundColor ( )
virtual

Get this renderer's current background color.

Returns
This renderer's current background color.

Implements ofBaseRenderer.

◆ getCoordHandedness()

ofHandednessType ofGLProgrammableRenderer::getCoordHandedness ( ) const
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()

glm::mat4 ofGLProgrammableRenderer::getCurrentMatrix ( ofMatrixMode  matrixMode_) const
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()

glm::mat4 ofGLProgrammableRenderer::getCurrentNormalMatrix ( ) const
virtual

Get this renderer's current normal matrix.

Returns
This renderer's current normal matrix.

Implements ofBaseRenderer.

◆ getCurrentOrientationMatrix()

glm::mat4 ofGLProgrammableRenderer::getCurrentOrientationMatrix ( ) const
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()

glm::mat4 ofGLProgrammableRenderer::getCurrentViewMatrix ( ) const
virtual

Get this renderer's current view matrix.

Returns
This renderer's current view matrix.

Implements ofBaseRenderer.

◆ getCurrentViewport()

ofRectangle ofGLProgrammableRenderer::getCurrentViewport ( ) const
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()

ofFillFlag ofGLProgrammableRenderer::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()

int ofGLProgrammableRenderer::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()

int ofGLProgrammableRenderer::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()

bool ofGLProgrammableRenderer::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()

ofRectangle ofGLProgrammableRenderer::getNativeViewport ( ) const
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()

ofPath & ofGLProgrammableRenderer::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()

ofRectMode ofGLProgrammableRenderer::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()

ofStyle ofGLProgrammableRenderer::getStyle ( ) const
virtual

Get this renderer's current style object.

Returns
This renderer's current style object.

Implements ofBaseRenderer.

◆ getType()

const std::string & ofGLProgrammableRenderer::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()

int ofGLProgrammableRenderer::getViewportHeight ( ) const
virtual

Get the renderer's current viewport width.

Returns
The renderer's current viewport width.

Implements ofBaseRenderer.

◆ getViewportWidth()

int ofGLProgrammableRenderer::getViewportWidth ( ) const
virtual

Get the renderer's current viewport width.

Returns
The renderer's current viewport width.

Implements ofBaseRenderer.

◆ isVFlipped()

bool ofGLProgrammableRenderer::isVFlipped ( ) const
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()

void ofGLProgrammableRenderer::loadIdentityMatrix ( void  )
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]

void ofGLProgrammableRenderer::loadMatrix ( const float *  m)
virtual

Load m as this renderer's current matrix.

m can be passed to loadMatrix() in this way from raw data

Parameters
mFloat pointer to an 4x4 matrix.

Implements ofBaseRenderer.

◆ loadMatrix() [2/2]

void ofGLProgrammableRenderer::loadMatrix ( const glm::mat4 &  m)
virtual

Load a matrix as this renderer's current matrix.

Parameters
mThe matrix to load into this renderer.

Implements ofBaseRenderer.

◆ loadViewMatrix()

void ofGLProgrammableRenderer::loadViewMatrix ( const glm::mat4 &  m)
virtual

Load m into this renderer's matrix stack as a view matrix.

Parameters
mThe view matrix to load into this renderer's matrix stack.

Implements ofBaseRenderer.

◆ matrixMode()

void ofGLProgrammableRenderer::matrixMode ( ofMatrixMode  mode)
virtual

Sets this renderer's current matrix mode.

The possible matrix modes include: OF_MATRIX_MODELVIEW OF_MATRIX_PROJECTION OF_MATRIX_TEXTURE

Parameters
modeThe matrix mode this renderer's matrix should use.

Implements ofBaseRenderer.

◆ multMatrix() [1/2]

void ofGLProgrammableRenderer::multMatrix ( const float *  m)
virtual

Multiply this renderer's current matrix by m.

m can be passed to loadMatrix() in this way with raw data

Parameters
mFloat pointer to an mat4 to multiply this renderer's current matrix by.

Implements ofBaseRenderer.

◆ multMatrix() [2/2]

void ofGLProgrammableRenderer::multMatrix ( const glm::mat4 &  m)
virtual

Multiply this renderer's current matrix by m.

Parameters
mThe matrix to multiply this renderer's current matrix by.

Implements ofBaseRenderer.

◆ multViewMatrix()

void ofGLProgrammableRenderer::multViewMatrix ( const glm::mat4 &  m)
virtual

Multiply this renderer's view matrix by m.

Parameters
mThe matrix to multiply this renderer's view matrix by.

Implements ofBaseRenderer.

◆ popMatrix()

void ofGLProgrammableRenderer::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()

void ofGLProgrammableRenderer::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()

void ofGLProgrammableRenderer::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()

void ofGLProgrammableRenderer::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()

void ofGLProgrammableRenderer::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()

void ofGLProgrammableRenderer::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]

void ofGLProgrammableRenderer::rotateRad ( float  degrees)
virtual

Rotate this renderer's current matrix by degrees about the z axis.

This method is an alias of rotateZ().

Parameters
degreesDegrees to rotate about the z axis.
See also
rotateZ()

Implements ofBaseRenderer.

◆ rotateRad() [2/2]

void ofGLProgrammableRenderer::rotateRad ( float  degrees,
float  vecX,
float  vecY,
float  vecZ 
)
virtual

Rotate this renderer's current matrix by degrees about a euler.

Parameters
degreesDegrees to rotate about vecX, vecY, and vecZ.
vecXThe x axis to rotate about.
vecYThe y axis to rotate about.
vecZThe z axis to rotate about.

Implements ofBaseRenderer.

◆ rotateXRad()

void ofGLProgrammableRenderer::rotateXRad ( float  degrees)
virtual

Rotate this renderer's current matrix by degrees about the x axis.

Parameters
degreesDegrees to rotate about the x axis.

Implements ofBaseRenderer.

◆ rotateYRad()

void ofGLProgrammableRenderer::rotateYRad ( float  degrees)
virtual

Rotate this renderer's current matrix by degrees about the y axis.

Parameters
degreesDegrees to rotate about the y axis.

Implements ofBaseRenderer.

◆ rotateZRad()

void ofGLProgrammableRenderer::rotateZRad ( float  degrees)
virtual

Rotate this renderer's current matrix by degrees about the z axis.

Parameters
degreesDegrees to rotate about the z axis.

Implements ofBaseRenderer.

◆ saveFullViewport()

void ofGLProgrammableRenderer::saveFullViewport ( ofPixels pixels)
virtual

Fill an ofPixels object with the contents of the current screen.

Parameters
pixelsThe pixels object to fill with the pixels from the screen.

Implements ofBaseGLRenderer.

◆ saveScreen()

void ofGLProgrammableRenderer::saveScreen ( int  x,
int  y,
int  w,
int  h,
ofPixels pixels 
)
virtual

Fill an ofPixels object with a subsection of the current screen.

Screen Pixels

Parameters
xThe x coordinate to use when specifying the bounds of the subsection of the screen to save into pixels.
yThe y coordinate to use when specifying the bounds of the subsection of the screen to save into pixels.
wThe width to use when specifying the bounds of the subsection of the screen to save into pixels.
hThe height to use when specifying the bounds of the subsection of the screen to save into pixels.
pixelsThe pixels object to fill with the pixels from the screen.

Implements ofBaseGLRenderer.

◆ scale()

void ofGLProgrammableRenderer::scale ( float  xAmnt,
float  yAmnt,
float  zAmnt = 1 
)
virtual

Scale this renderer's current matrix by xAmnt, yAmnt, and zAmnt.

Parameters
xAmntThe amount to scale this renderer's current matrix's x axis by.
yAmntThe amount to scale this renderer's current matrix's y axis by.
zAmntThe amount to scale this renderer's current matrix's z axis by. Defaults to 1.

Implements ofBaseRenderer.

◆ setAlphaMaskTex()

void ofGLProgrammableRenderer::setAlphaMaskTex ( const ofTexture tex)
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
texThe texture to use as the alpha mask.
See also
disableAlphaMask()

Implements ofBaseGLRenderer.

◆ setBackgroundAuto()

void ofGLProgrammableRenderer::setBackgroundAuto ( bool  bManual)
virtual

Enable/disable automatic redrawing of the background each frame.

Parameters
bManualFalse to disable automatic background redrawing.

Implements ofBaseRenderer.

◆ setBackgroundColor()

void ofGLProgrammableRenderer::setBackgroundColor ( const ofColor c)
virtual

Set this renderer's background color.

Parameters
cThe color to request this renderer to use.

Implements ofBaseRenderer.

◆ setBitmapTextMode()

void ofGLProgrammableRenderer::setBitmapTextMode ( ofDrawBitmapMode  mode)
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
modeThe bitmap mode to request this renderer to use.
See also
ofDrawBitmapMode

Implements ofBaseRenderer.

◆ setBlendMode()

void ofGLProgrammableRenderer::setBlendMode ( ofBlendMode  blendMode)
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
degreesDegrees 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
blendModeThe blend mode to request this renderer to use.
See also
ofBlendMode
https://helpx.adobe.com/photoshop/using/blending-modes.html

Implements ofBaseRenderer.

◆ setCircleResolution()

void ofGLProgrammableRenderer::setCircleResolution ( int  res)
virtual

Set the resolution to use when drawing ellipses with this renderer.

Parameters
resThe number of points to use when drawing circles and ellipses with this renderer.

Implements ofBaseRenderer.

◆ setColor() [1/5]

void ofGLProgrammableRenderer::setColor ( const ofColor color)
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
colorThe color to use when drawing.

Implements ofBaseRenderer.

◆ setColor() [2/5]

void ofGLProgrammableRenderer::setColor ( const ofColor color,
int  _a 
)
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
colorThe color to use when drawing.
_aThe alpha value between 0 and 255 to use when drawing.

Implements ofBaseRenderer.

◆ setColor() [3/5]

void ofGLProgrammableRenderer::setColor ( int  gray)
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
grayThe grayscale value to use when drawing.

Implements ofBaseRenderer.

◆ setColor() [4/5]

void ofGLProgrammableRenderer::setColor ( int  r,
int  g,
int  b 
)
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
rThe red value between 0 and 255 to use when drawing.
gThe green value between 0 and 255 to use when drawing.
bThe blue value between 0 and 255 to use when drawing.

Implements ofBaseRenderer.

◆ setColor() [5/5]

void ofGLProgrammableRenderer::setColor ( int  r,
int  g,
int  b,
int  a 
)
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
rThe red value between 0 and 255 to use when drawing.
gThe green value between 0 and 255 to use when drawing.
bThe blue value between 0 and 255 to use when drawing.
aThe alpha value between 0 and 255 to use when drawing.

Implements ofBaseRenderer.

◆ setCoordHandedness()

void ofGLProgrammableRenderer::setCoordHandedness ( ofHandednessType  handedness)
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
handednessThe 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()

void ofGLProgrammableRenderer::setCurveResolution ( int  resolution)
virtual

Set the resolution used when drawing curves with this renderer.

Parameters
resolutionThe resolution to request this renderer to use when drawing curves.

Implements ofBaseRenderer.

◆ setDepthTest()

void ofGLProgrammableRenderer::setDepthTest ( bool  depthTest)
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
depthTestTrue to enable depth testing.

Implements ofBaseRenderer.

◆ setFillMode()

void ofGLProgrammableRenderer::setFillMode ( ofFillFlag  fill)
virtual

set this renderer's fill flag.

Possible fill flags include OF_OUTLINE and OF_FILLED.

Parameters
fillThe fill flag to request this renderer to use.
See also
ofFillFlag

Implements ofBaseRenderer.

◆ setGlobalAmbientColor()

void ofGLProgrammableRenderer::setGlobalAmbientColor ( const ofColor c)
inlinevirtual

Set the global ambient light color.

Parameters
cThe color to set this renderer to use as ambient lighting.

Implements ofBaseGLRenderer.

◆ setHexColor()

void ofGLProgrammableRenderer::setHexColor ( int  hexColor)
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
hexColorThe hexidecimal representation of the color to use when drawing.

Implements ofBaseRenderer.

◆ setLightAmbientColor()

void ofGLProgrammableRenderer::setLightAmbientColor ( int  lightIndex,
const ofFloatColor c 
)
inlinevirtual

Set the ambient light color for a light at a specific index.

Parameters
lightIndexThe index of the light to set the ambient color of.
cThe color to set the ambient light.

Implements ofBaseGLRenderer.

◆ setLightAttenuation()

void ofGLProgrammableRenderer::setLightAttenuation ( int  lightIndex,
float  constant,
float  linear,
float  quadratic 
)
inlinevirtual

Set the light attenuation for a light at a specific index.

Parameters
lightIndexThe index of the light whose spot concentration will be set.
constantSet the constant attenuation factor of the light at lightIndex.
linearSet the linear attenuation factor of the light at lightIndex.
quadraticSet the quadratic attenuation factor of the light at lightIndex.
See also
glLightf()
GL_CONSTANT_ATTENUATION
GL_LINEAR_ATTENUATION
GL_QUADRATIC_ATTENUATION

Implements ofBaseGLRenderer.

◆ setLightDiffuseColor()

void ofGLProgrammableRenderer::setLightDiffuseColor ( int  lightIndex,
const ofFloatColor c 
)
inlinevirtual

Set the diffues light color for a light at a specific index.

Parameters
lightIndexThe index of the light to set the diffuse color of.
cThe color to set the diffuse light.

Implements ofBaseGLRenderer.

◆ setLightPosition()

void ofGLProgrammableRenderer::setLightPosition ( int  lightIndex,
const glm::vec4 &  position 
)
inlinevirtual

Set the position of a light at a specific index.

Parameters
lightIndexThe index of the light to set the position color of.
positionA vector of four values that specify the position of the light in homogeneous object coordinates.
See also
GL_POSITION

Implements ofBaseGLRenderer.

◆ setLightSpecularColor()

void ofGLProgrammableRenderer::setLightSpecularColor ( int  lightIndex,
const ofFloatColor c 
)
inlinevirtual

Set the specular light color for a light at a specific index.

Parameters
lightIndexThe index of the light to set the specular color of.
cThe color to set the specular light.

Implements ofBaseGLRenderer.

◆ setLightSpotConcentration()

void ofGLProgrammableRenderer::setLightSpotConcentration ( int  lightIndex,
float  exponent 
)
inlinevirtual

Set the spotlight concentration (exponent) for a light at a specific index.

Parameters
lightIndexThe index of the light whose spot concentration will be set.
exponentThe spot light exponent value.
See also
GL_SPOT_EXPONENT

Implements ofBaseGLRenderer.

◆ setLightSpotDirection()

void ofGLProgrammableRenderer::setLightSpotDirection ( int  lightIndex,
const glm::vec4 &  direction 
)
inlinevirtual

Set the spot direction of a light at a specific index.

Parameters
lightIndexThe index of the light to set the spot direction of.
directionA vector of four values that specify the direction of the light in homogeneous object coordinates.
See also
GL_SPOT_DIRECTION

Implements ofBaseGLRenderer.

◆ setLightSpotlightCutOff()

void ofGLProgrammableRenderer::setLightSpotlightCutOff ( int  lightIndex,
float  spotCutOff 
)
inlinevirtual

Set the spot light cutoff for a light at a specific index.

Parameters
lightIndexThe index of the light whose spot cutoff will be set.
spotCutOffThe spot light cut off value.
See also
GL_SPOT_CUTOFF

Implements ofBaseGLRenderer.

◆ setLineSmoothing()

void ofGLProgrammableRenderer::setLineSmoothing ( bool  smooth)
virtual

Enable/disable line smoothing for this renderer if it's supported.

Parameters
smoothTrue to enable line smoothing for this renderer if it's supported.

Implements ofBaseRenderer.

◆ setLineWidth()

void ofGLProgrammableRenderer::setLineWidth ( float  lineWidth)
virtual

Set the line width this renderer should use when drawing lines.

Parameters
lineWidthThe line width to request this renderer to use.

Implements ofBaseRenderer.

◆ setOrientation()

void ofGLProgrammableRenderer::setOrientation ( ofOrientation  orientation,
bool  vFlip 
)
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
orientationThe orientation to use with this renderer.
vFlipTrue if the orientation should be vertically flipped.
See also
ofOrientation

Implements ofBaseRenderer.

◆ setPolyMode()

void ofGLProgrammableRenderer::setPolyMode ( ofPolyWindingMode  mode)
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
modeThe poly winding mode to request this renderer to use.
See also
ofPolyWindingMode

Implements ofBaseRenderer.

◆ setRectMode()

void ofGLProgrammableRenderer::setRectMode ( ofRectMode  mode)
virtual

Set this renderer's rect mode.

Possible rect modes include OF_RECTMODE_CORNER and OF_RECTMODE_CENTER.

Parameters
modeThe rect mode to request this renderer to use.
See also
ofRectMode

Implements ofBaseRenderer.

◆ setSmoothLighting()

void ofGLProgrammableRenderer::setSmoothLighting ( bool  b)
inlinevirtual

Enable/disable smooth light shading.

Parameters
bTrue to enable smooth light shading.

Implements ofBaseGLRenderer.

◆ setStyle()

void ofGLProgrammableRenderer::setStyle ( const ofStyle style)
virtual

Set this renderer's current style object.

Parameters
styleThe style object to set this renderer to use.

Implements ofBaseRenderer.

◆ setup()

void ofGLProgrammableRenderer::setup ( int  glVersionMajor,
int  glVersionMinor 
)

◆ setupGraphicDefaults()

void ofGLProgrammableRenderer::setupGraphicDefaults ( )
virtual

setup the default graphics settings for this renderer.

Implements ofBaseRenderer.

◆ setupScreen()

void ofGLProgrammableRenderer::setupScreen ( )
virtual

setup the default screen settings for this renderer.

Implements ofBaseRenderer.

◆ setupScreenOrtho()

void ofGLProgrammableRenderer::setupScreenOrtho ( float  width = -1,
float  height = -1,
float  nearDist = -1,
float  farDist = 1 
)
virtual

Setup the renderer to use an orthographic matrix.

Parameters
widthThe width of the desired orthographic matrix. Defaults to -1 setting its width according to the rendering surface's width.
heightThe height of the desired orthographic matrix. Defaults to -1 setting its height according to the rendering surface's height.
nearDistThe near clipping distance to use with the orthographic matrix. Setting this value to 0 uses the defualt near distance. Defaults to 0.
farDistThe 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()

void ofGLProgrammableRenderer::setupScreenPerspective ( float  width = -1,
float  height = -1,
float  fov = 60,
float  nearDist = 0,
float  farDist = 0 
)
virtual

Setup the renderer to use a perspective matrix.

Parameters
widthThe width of the desired perspective matrix. Defaults to -1 setting its width according to the rendering surface's width.
heightThe height of the desired perspective matrix. Defaults to Defaults to -1 setting its width according to the rendering surface's width.
fovThe field of view to use with the perspective matrix. Defaults to 60.
nearDistThe near clipping distance to use with the perspective matrix. Setting this value to 0 uses the default near distance. Defaults to 0.
farDistThe 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()

void ofGLProgrammableRenderer::startRender ( )
virtual

Starts using this renderer as the rendering surface.

Implements ofBaseRenderer.

◆ translate() [1/2]

void ofGLProgrammableRenderer::translate ( const glm::vec3 &  p)
virtual

Translate this renderer's current matrix by a point.

Parameters
pThe 3D point to translate this renderer's current matrix by.

Implements ofBaseRenderer.

◆ translate() [2/2]

void ofGLProgrammableRenderer::translate ( float  x,
float  y,
float  z = 0 
)
virtual

Translate this renderer's current matrix by x, y, and z.

Parameters
xThe x coordinate to translate this renderer's current matrix by.
yThe y coordinate to translate this renderer's current matrix by.
zThe z coordinate to translate this renderer's current matrix by. Defaults to 0.

Implements ofBaseRenderer.

◆ unbind() [1/8]

void ofGLProgrammableRenderer::unbind ( const ofBaseMaterial material)
virtual

Unbind a material previously bound to this renderer with bind().

Parameters
materialThe material that is currently bound to this renderer.

Implements ofBaseGLRenderer.

◆ unbind() [2/8]

void ofGLProgrammableRenderer::unbind ( const ofBaseVideoDraws video)
virtual

Unbind a video previously bound to this renderer with bind().

Parameters
videoThe video that is currently bound to this renderer.

Implements ofBaseGLRenderer.

◆ unbind() [3/8]

void ofGLProgrammableRenderer::unbind ( const ofCamera camera)
virtual

Unbind the camera from this renderer.

Parameters
cameraThe camera to unbind from this renderer.

Reimplemented from ofBaseGLRenderer.

◆ unbind() [4/8]

void ofGLProgrammableRenderer::unbind ( const ofFbo fbo)
virtual

Unbind a frame buffer previously bound to this renderer with bind().

Parameters
fboThe frame buffer that is currently bound to this renderer.

Implements ofBaseGLRenderer.

◆ unbind() [5/8]

void ofGLProgrammableRenderer::unbind ( const ofShader shader)
virtual

Unbind a shader previously bound to this renderer with bind().

Parameters
shaderThe shader that is currently bound to this renderer.

Implements ofBaseGLRenderer.

◆ unbind() [6/8]

void ofGLProgrammableRenderer::unbind ( const ofShadow shadow)
virtual

Implements ofBaseGLRenderer.

◆ unbind() [7/8]

void ofGLProgrammableRenderer::unbind ( const ofShadow shadow,
GLenum  aCubeFace 
)
virtual

Implements ofBaseGLRenderer.

◆ unbind() [8/8]

void ofGLProgrammableRenderer::unbind ( const ofTexture texture,
int  location 
)
virtual

Unbind a texture previously bound to this renderer with bind().

Parameters
textureThe texture that is currently bound to this renderer.
locationThe location texture was bound at.

Implements ofBaseGLRenderer.

◆ viewport() [1/2]

void ofGLProgrammableRenderer::viewport ( float  x = 0,
float  y = 0,
float  width = -1,
float  height = -1,
bool  vflip = true 
)
virtual

Set this renderer's viewport manually using x, y, width, and height.

Parameters
xThe x coordinate of the viewport. Defaults to 0.
yThe y coordinate of the viewport. Defaults to 0.
wThe width of the viewport. Defaults to -1 setting its width according to the rendering surface's width.
hThe height of the viewport. Defaults to -1 setting its height according to the rendering surface's height.

Implements ofBaseRenderer.

◆ viewport() [2/2]

void ofGLProgrammableRenderer::viewport ( ofRectangle  viewport)
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

const string ofGLProgrammableRenderer::TYPE ="ProgrammableGL"
static

The documentation for this class was generated from the following files: