reference

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

ofGLRenderer.h
Go to the documentation of this file.
1#pragma once
2
4#include "ofPolyline.h"
5#include "of3dGraphics.h"
6#include "ofBitmapFont.h"
7#include "ofMatrixStack.h"
8#include "ofPath.h"
9#include "ofGLBaseTypes.h"
10
11class ofShapeTessellation;
12class ofFbo;
13class of3dPrimitive;
14
16public:
17 ofGLRenderer(const ofAppBaseWindow * window);
19
20 static const std::string TYPE;
21 const std::string & getType(){ return TYPE; }
22
23 void setup();
24
25 void startRender();
26 void finishRender();
27
30 void draw(const ofMesh & vertexData, ofPolyRenderMode renderType, bool useColors, bool useTextures, bool useNormals) const;
31 void draw(const of3dPrimitive& model, ofPolyRenderMode renderType) const;
32 void draw(const ofNode& model) const;
33 void draw(const ofPolyline & poly) const;
34 void draw(const ofPath & path) const;
35 void draw(const ofImage & image, float x, float y, float z, float w, float h, float sx, float sy, float sw, float sh) const;
36 void draw(const ofFloatImage & image, float x, float y, float z, float w, float h, float sx, float sy, float sw, float sh) const;
37 void draw(const ofShortImage & image, float x, float y, float z, float w, float h, float sx, float sy, float sw, float sh) const;
38 void draw(const ofTexture & image, float x, float y, float z, float w, float h, float sx, float sy, float sw, float sh) const;
39 void draw(const ofBaseVideoDraws & video, float x, float y, float w, float h) const;
40 void draw(const ofVbo & vbo, GLuint drawMode, int first, int total) const;
41 void drawElements(const ofVbo & vbo, GLuint drawMode, int amt, int offsetelements = 0) const;
42 void drawInstanced(const ofVbo & vbo, GLuint drawMode, int first, int total, int primCount) const;
43 void drawElementsInstanced(const ofVbo & vbo, GLuint drawMode, int amt, int primCount) const;
44 void draw(const ofVboMesh & mesh, ofPolyRenderMode renderType) const;
45 void drawInstanced(const ofVboMesh & mesh, ofPolyRenderMode renderType, int primCount) const;
46 ofPath & getPath();
47
48
49
50 //--------------------------------------------
51 // transformations
52 void pushView();
53 void popView();
54
55 // setup matrices and viewport (upto you to push and pop view before and after)
56 // if width or height are 0, assume windows dimensions (ofGetWidth(), ofGetHeight())
57 // if nearDist or farDist are 0 assume defaults (calculated based on width / height)
59 void viewport(float x = 0, float y = 0, float width = -1, float height = -1, bool vflip=true);
60 void setOrientation(ofOrientation orientation, bool vFlip);
61 void setupScreenPerspective(float width = -1, float height = -1, float fov = 60, float nearDist = 0, float farDist = 0);
62 void setupScreenOrtho(float width = -1, float height = -1, float nearDist = -1, float farDist = 1);
65 int getViewportWidth() const;
66 int getViewportHeight() const;
67 bool isVFlipped() const;
68 bool texturesNeedVFlip() const;
69
70 void setCoordHandedness(ofHandednessType handedness);
72
73 //our openGL wrappers
74 void pushMatrix();
75 void popMatrix();
76 void translate(float x, float y, float z = 0);
77 void translate(const glm::vec3 & p);
78 void scale(float xAmnt, float yAmnt, float zAmnt = 1);
79 void rotateDeg(float radians, float vecX, float vecY, float vecZ);
80 void rotateXDeg(float radians);
81 void rotateYDeg(float radians);
82 void rotateZDeg(float radians);
83 void rotateDeg(float radians);
84 void rotateRad(float radians, float vecX, float vecY, float vecZ);
85 void rotateXRad(float radians);
86 void rotateYRad(float radians);
87 void rotateZRad(float radians);
88 void rotateRad(float radians);
89 void matrixMode(ofMatrixMode mode);
90 void loadIdentityMatrix (void);
91 void loadMatrix (const glm::mat4 & m);
92 void loadMatrix (const float * m);
93 void multMatrix (const glm::mat4 & m);
94 void multMatrix (const float * m);
95 void loadViewMatrix(const glm::mat4 & m);
96 void multViewMatrix(const glm::mat4 & m);
97
98 glm::mat4 getCurrentMatrix(ofMatrixMode matrixMode_) const;
99 glm::mat4 getCurrentOrientationMatrix() const;
100 glm::mat4 getCurrentViewMatrix() const;
101 glm::mat4 getCurrentNormalMatrix() const;
102
103 // screen coordinate things / default gl values
105 void setupScreen();
106
107 // drawing modes
108 void setFillMode(ofFillFlag fill);
110 void setCircleResolution(int res);
111 void setRectMode(ofRectMode mode);
113 void setLineWidth(float lineWidth);
114 void setDepthTest(bool depthTest);
115 void setLineSmoothing(bool smooth);
116 void setBlendMode(ofBlendMode blendMode);
117 void enablePointSprites();
118 void disablePointSprites();
119 void enableAntiAliasing();
120 void disableAntiAliasing();
121
122 // color options
123 void setColor(int r, int g, int b); // 0-255
124 void setColor(int r, int g, int b, int a); // 0-255
125 void setColor(const ofColor & color);
126 void setColor(const ofColor & color, int _a);
127 void setColor(int gray); // new set a color as grayscale with one argument
128 void setHexColor( int hexColor ); // hex, like web 0xFF0033;
129
131
132 // bg color
134 void setBackgroundColor(const ofColor & c);
135 void background(const ofColor & c);
136 void background(float brightness);
137 void background(int hexColor, float _a=255.0f);
138 void background(int r, int g, int b, int a=255);
139
140 void setBackgroundAuto(bool bManual); // default is true
141 bool getBackgroundAuto();
142
143 void clear();
144 void clear(float r, float g, float b, float a=0);
145 void clear(float brightness, float a=0);
146 void clearAlpha();
147
148 ofStyle getStyle() const;
149 void pushStyle();
150 void popStyle();
151 void setStyle(const ofStyle & style);
152 void setCurveResolution(int resolution);
154
155
156 // drawing
157 void drawLine(float x1, float y1, float z1, float x2, float y2, float z2) const;
158 void drawRectangle(float x, float y, float z, float w, float h) const;
159 void drawTriangle(float x1, float y1, float z1, float x2, float y2, float z2, float x3, float y3, float z3) const;
160 void drawCircle(float x, float y, float z, float radius) const;
161 void drawEllipse(float x, float y, float z, float width, float height) const;
162 void drawString(std::string text, float x, float y, float z) const;
163 void drawString(const ofTrueTypeFont & font, std::string text, float x, float y) const;
164
165
166 // gl specifics
167 void enableTextureTarget(const ofTexture & tex, int textureLocation);
168 void disableTextureTarget(int textureTarget, int textureLocation);
169 void setAlphaMaskTex(const ofTexture & tex);
170 void disableAlphaMask();
171
172 // lighting globals
173 void enableLighting();
174 void disableLighting();
177 bool getLightingEnabled();
178 void setSmoothLighting(bool b);
179 void setGlobalAmbientColor(const ofColor& c);
180
181 // lighting per light
182 void enableLight(int lightIndex);
183 void disableLight(int lightIndex);
184 void setLightSpotlightCutOff(int lightIndex, float spotCutOff);
185 void setLightSpotConcentration(int lightIndex, float exponent);
186 void setLightAttenuation(int lightIndex, float constant, float linear, float quadratic );
187 void setLightAmbientColor(int lightIndex, const ofFloatColor& c);
188 void setLightDiffuseColor(int lightIndex, const ofFloatColor& c);
189 void setLightSpecularColor(int lightIndex, const ofFloatColor& c);
190 void setLightPosition(int lightIndex, const glm::vec4 & position);
191 void setLightSpotDirection(int lightIndex, const glm::vec4 & direction);
192
193
194 void bind(const ofBaseVideoDraws & video);
195 void bind(const ofBaseMaterial & material);
196 void bind(const ofShadow & shadow); // does nothing, only programmable renderer supported
197 void bind(const ofShadow & shadow, GLenum aCubeFace);
198 void bind(const ofShader & shader);
199 void bind(const ofTexture & texture, int location);
200 void bind(const ofCamera & camera, const ofRectangle & viewport);
201 void unbind(const ofBaseVideoDraws & video);
202 void unbind(const ofBaseMaterial & material);
203 void unbind(const ofShadow & shadow); // does nothing, only programmable renderer supported
204 void unbind(const ofShadow & shadow, GLenum aCubeFace);
205 void unbind(const ofShader & shader);
206 void unbind(const ofTexture & texture, int location);
207 void unbind(const ofCamera & camera);
208
209 void begin(const ofFbo & fbo, ofFboMode mode);
210 void end(const ofFbo & fbo);
211
212 void bind(const ofFbo & fbo);
213#ifndef TARGET_OPENGLES
214 void bindForBlitting(const ofFbo & fboSrc, ofFbo & fboDst, int attachmentPoint);
215#endif
216 void unbind(const ofFbo & fbo);
217
218 int getGLVersionMajor();
219 int getGLVersionMinor();
220
221 void saveScreen(int x, int y, int w, int h, ofPixels & pixels);
222 void saveFullViewport(ofPixels & pixels);
223
224 const of3dGraphics & get3dGraphics() const;
226private:
227 void startSmoothing();
228 void endSmoothing();
229
230
231 bool bBackgroundAuto;
232
233 mutable std::vector<glm::vec3> linePoints;
234 mutable std::vector<glm::vec3> rectPoints;
235 mutable std::vector<glm::vec3> triPoints;
236 mutable std::vector<glm::vec3> circlePoints;
237 ofPolyline circlePolyline;
238
239 ofMatrixStack matrixStack;
240 bool normalsEnabled;
241 bool lightingEnabled;
242 bool materialBound;
243 std::set<int> textureLocationsEnabled;
244
245 int alphaMaskTextureTarget;
246
247 ofStyle currentStyle;
248 std::deque <ofStyle> styleHistory;
249 of3dGraphics graphics3d;
250 ofBitmapFont bitmapFont;
251 ofPath path;
252 const ofAppBaseWindow * window;
253
254 std::deque<GLuint> framebufferIdStack;
255 GLuint defaultFramebufferId;
256 GLuint currentFramebufferId;
257
258};
Definition of3dGraphics.h:445
A class representing a 3d primitive.
Definition of3dPrimitives.h:12
Definition ofAppBaseWindow.h:21
Definition ofGLBaseTypes.h:95
virtual void draw(const ofTexture &image, float x, float y, float z, float w, float h, float sx, float sy, float sw, float sh) const =0
Draw a texture with this renderer.
material parameter properties that can be applied to vertices in the OpenGL lighting model used in de...
Definition ofMaterialBaseTypes.h:41
virtual void draw(const ofPolyline &poly) const =0
Draw a polyline with this renderer.
A base class representing a drawable video source.
Definition ofVideoBaseTypes.h:103
Definition ofBitmapFont.h:19
A basic camera object for interacting with objects in 3D space.
Definition ofCamera.h:13
Definition ofFbo.h:46
Definition ofGLRenderer.h:15
void disableLight(int lightIndex)
Disable a light at a specific index.
Definition ofGLRenderer.cpp:1833
void enableLight(int lightIndex)
Enable a light at a specific index.
Definition ofGLRenderer.cpp:1827
void setAlphaMaskTex(const ofTexture &tex)
Enable alpha masking using this texture as the mask source.
Definition ofGLRenderer.cpp:1746
void rotateYRad(float radians)
Rotate this renderer's current matrix by degrees about the y axis.
Definition ofGLRenderer.cpp:910
void disableAlphaMask()
Disable this renderer's current alpha mask texture.
Definition ofGLRenderer.cpp:1752
void setBackgroundAuto(bool bManual)
Enable/disable automatic redrawing of the background each frame.
Definition ofGLRenderer.cpp:1120
void drawTriangle(float x1, float y1, float z1, float x2, float y2, float z2, float x3, float y3, float z3) const
Draw a triangle using three 3D points.
Definition ofGLRenderer.cpp:1468
void setCircleResolution(int res)
Set the resolution to use when drawing ellipses with this renderer.
Definition ofGLRenderer.cpp:832
int getViewportWidth() const
Get the renderer's current viewport width.
Definition ofGLRenderer.cpp:724
void disableTextureTarget(int textureTarget, int textureLocation)
Unbind the texture target at the texture location.
Definition ofGLRenderer.cpp:1737
void drawRectangle(float x, float y, float z, float w, float h) const
Draw a rectangle using a 3D point and a width and height.
Definition ofGLRenderer.cpp:1441
void popStyle()
Pop this renderer's current style from its internal style stack.
Definition ofGLRenderer.cpp:1328
void saveScreen(int x, int y, int w, int h, ofPixels &pixels)
Fill an ofPixels object with a subsection of the current screen.
Definition ofGLRenderer.cpp:1926
void rotateXDeg(float radians)
Rotate this renderer's current matrix by degrees about the x axis.
Definition ofGLRenderer.cpp:879
void end(const ofFbo &fbo)
Stop using the specified frame buffer as this renderer's render surface.
Definition ofGLRenderer.cpp:488
void setDepthTest(bool depthTest)
Enable/disable depth testing with this renderer.
Definition ofGLRenderer.cpp:1210
ofStyle getStyle() const
Get this renderer's current style object.
Definition ofGLRenderer.cpp:1312
void begin(const ofFbo &fbo, ofFboMode mode)
Begin using a frame buffer as this renderer's render surface.
Definition ofGLRenderer.cpp:462
void enableSeparateSpecularLight()
Enable seperate specular lighting parameters.
Definition ofGLRenderer.cpp:1796
void drawElementsInstanced(const ofVbo &vbo, GLuint drawMode, int amt, int primCount) const
Draw vertices from a vertex buffer using this renderer.
Definition ofGLRenderer.cpp:416
glm::mat4 getCurrentNormalMatrix() const
Get this renderer's current normal matrix.
Definition ofGLRenderer.cpp:1043
bool isVFlipped() const
Returns true if the renderer's current viewport is vertically flipped.
Definition ofGLRenderer.cpp:749
void setLineWidth(float lineWidth)
Set the line width this renderer should use when drawing lines.
Definition ofGLRenderer.cpp:1201
void setOrientation(ofOrientation orientation, bool vFlip)
set this renderer's orientation.
Definition ofGLRenderer.cpp:744
int getViewportHeight() const
Get the renderer's current viewport width.
Definition ofGLRenderer.cpp:729
void setCurveResolution(int resolution)
Set the resolution used when drawing curves with this renderer.
Definition ofGLRenderer.cpp:1380
void pushView()
Push the current viewport into the renderer's viewport stack.
Definition ofGLRenderer.cpp:658
bool getLightingEnabled()
Returns true if lighting is enabled with this renderer.
Definition ofGLRenderer.cpp:1810
void setColor(int r, int g, int b)
Set the global color this renderer will use when drawing.
Definition ofGLRenderer.cpp:1058
void rotateXRad(float radians)
Rotate this renderer's current matrix by degrees about the x axis.
Definition ofGLRenderer.cpp:905
void enableTextureTarget(const ofTexture &tex, int textureLocation)
Bind the texture at the texture location.
Definition ofGLRenderer.cpp:1723
void drawCircle(float x, float y, float z, float radius) const
Draw a circle using a 3D point and a radius.
Definition ofGLRenderer.cpp:1486
void multViewMatrix(const glm::mat4 &m)
Multiply this renderer's view matrix by m.
Definition ofGLRenderer.cpp:1033
void setCoordHandedness(ofHandednessType handedness)
Set the coordinate handidness of this renderer.
Definition ofGLRenderer.cpp:734
glm::mat4 getCurrentMatrix(ofMatrixMode matrixMode_) const
Queries the current OpenGL matrix state @detail Returns the specified matrix as held by the renderer'...
Definition ofGLRenderer.cpp:965
void loadMatrix(const glm::mat4 &m)
Load a matrix as this renderer's current matrix.
Definition ofGLRenderer.cpp:937
void setBackgroundColor(const ofColor &c)
Set this renderer's background color.
Definition ofGLRenderer.cpp:1135
void rotateYDeg(float radians)
Rotate this renderer's current matrix by degrees about the y axis.
Definition ofGLRenderer.cpp:884
~ofGLRenderer()
Definition ofGLRenderer.h:18
void drawEllipse(float x, float y, float z, float width, float height) const
Draw an ellipse using a 3D point, width, and height.
Definition ofGLRenderer.cpp:1505
void clear()
Clear this renderer's current color and bit depths.
Definition ofGLRenderer.cpp:1096
void viewport(ofRectangle viewport)
Set this renderer's viewport using a rectangle.
Definition ofGLRenderer.cpp:695
bool getBackgroundAuto()
Get the current auto redraw background setting for this renderer.
Definition ofGLRenderer.cpp:1125
void drawInstanced(const ofVbo &vbo, GLuint drawMode, int first, int total, int primCount) const
Draw vertices from a vertext buffer using instanced arrays.
Definition ofGLRenderer.cpp:399
void popView()
Pop the current viewport from the renderer's view stack.
Definition ofGLRenderer.cpp:677
glm::mat4 getCurrentOrientationMatrix() const
Get this renderer's current orientation matrix.
Definition ofGLRenderer.cpp:985
void popMatrix()
Pops this renderer's current matrix stack.
Definition ofGLRenderer.cpp:854
void bindForBlitting(const ofFbo &fboSrc, ofFbo &fboDst, int attachmentPoint)
Bind source and destination frame buffers for blitting.
Definition ofGLRenderer.cpp:514
void enableLighting()
Enable lighting with this renderer.
Definition ofGLRenderer.cpp:1757
void disableSeparateSpecularLight()
Disable seperate specular lighting parameters.
Definition ofGLRenderer.cpp:1803
void setGlobalAmbientColor(const ofColor &c)
Set the global ambient light color.
Definition ofGLRenderer.cpp:1821
int getGLVersionMajor()
Get the major OpenGL version number this renderer is using.
Definition ofGLRenderer.cpp:1902
void draw(const ofMesh &vertexData, ofPolyRenderMode renderType, bool useColors, bool useTextures, bool useNormals) const
Draw a mesh with this renderer.
Definition ofGLRenderer.cpp:85
void scale(float xAmnt, float yAmnt, float zAmnt=1)
Scale this renderer's current matrix by xAmnt, yAmnt, and zAmnt.
Definition ofGLRenderer.cpp:869
ofRectangle getCurrentViewport() const
Get this renderer's current viewport.
Definition ofGLRenderer.cpp:707
void setupGraphicDefaults()
setup the default graphics settings for this renderer.
Definition ofGLRenderer.cpp:816
void loadViewMatrix(const glm::mat4 &m)
Load m into this renderer's matrix stack as a view matrix.
Definition ofGLRenderer.cpp:1011
void drawElements(const ofVbo &vbo, GLuint drawMode, int amt, int offsetelements=0) const
Draw vertices from a vertext buffer with this renderer.
Definition ofGLRenderer.cpp:386
void disableLighting()
Disable lighting with this renderer.
Definition ofGLRenderer.cpp:1787
const of3dGraphics & get3dGraphics() const
Get a const reference of this renderer's 3D graphics object.
Definition ofGLRenderer.cpp:2012
void setup()
Definition ofGLRenderer.cpp:43
void setLightSpotConcentration(int lightIndex, float exponent)
Set the spotlight concentration (exponent) for a light at a specific index.
Definition ofGLRenderer.cpp:1845
void unbind(const ofBaseVideoDraws &video)
Unbind a video previously bound to this renderer with bind().
Definition ofGLRenderer.cpp:445
void enablePointSprites()
Enable point sprites when using this renderer.
Definition ofGLRenderer.cpp:1386
void setBitmapTextMode(ofDrawBitmapMode mode)
Set this renderer's bitmap text mode.
Definition ofGLRenderer.cpp:1307
void setupScreenOrtho(float width=-1, float height=-1, float nearDist=-1, float farDist=1)
Setup the renderer to use an orthographic matrix.
Definition ofGLRenderer.cpp:792
ofRectMode getRectMode()
Get this renderer's current rect mode.
Definition ofGLRenderer.cpp:1196
void loadIdentityMatrix(void)
Load this renderer's identity matrix.
Definition ofGLRenderer.cpp:932
void setLightAttenuation(int lightIndex, float constant, float linear, float quadratic)
Set the light attenuation for a light at a specific index.
Definition ofGLRenderer.cpp:1850
void finishRender()
Stop using this renderer as the rendering surface.
Definition ofGLRenderer.cpp:79
void setSmoothLighting(bool b)
Enable/disable smooth light shading.
Definition ofGLRenderer.cpp:1815
void rotateRad(float radians, float vecX, float vecY, float vecZ)
Rotate this renderer's current matrix by degrees about a euler.
Definition ofGLRenderer.cpp:900
glm::mat4 getCurrentViewMatrix() const
Get this renderer's current view matrix.
Definition ofGLRenderer.cpp:1038
void clearAlpha()
Restore the alpha color to its full opacity value.
Definition ofGLRenderer.cpp:1112
void setLightSpotlightCutOff(int lightIndex, float spotCutOff)
Set the spot light cutoff for a light at a specific index.
Definition ofGLRenderer.cpp:1840
void pushMatrix()
Pushes this renderer's matrix stack down by one.
Definition ofGLRenderer.cpp:849
void setLightSpotDirection(int lightIndex, const glm::vec4 &direction)
Set the spot direction of a light at a specific index.
Definition ofGLRenderer.cpp:1889
int getGLVersionMinor()
Get the minor OpenGL version number this renderer is using.
Definition ofGLRenderer.cpp:1911
void setFillMode(ofFillFlag fill)
set this renderer's fill flag.
Definition ofGLRenderer.cpp:1162
const std::string & getType()
Get the string representation of the renderer type.
Definition ofGLRenderer.h:21
void startRender()
Starts using this renderer as the rendering surface.
Definition ofGLRenderer.cpp:60
ofPath & getPath()
Get a reference to the path used internally by this renderer.
Definition ofGLRenderer.cpp:433
ofColor getBackgroundColor()
Get this renderer's current background color.
Definition ofGLRenderer.cpp:1130
void disablePointSprites()
Disable point sprites when using this renderer.
Definition ofGLRenderer.cpp:1404
void bind(const ofBaseVideoDraws &video)
Bind a video's texture to this renderer.
Definition ofGLRenderer.cpp:438
void setupScreenPerspective(float width=-1, float height=-1, float fov=60, float nearDist=0, float farDist=0)
Setup the renderer to use a perspective matrix.
Definition ofGLRenderer.cpp:759
void setStyle(const ofStyle &style)
Set this renderer's current style object.
Definition ofGLRenderer.cpp:1336
void setLightDiffuseColor(int lightIndex, const ofFloatColor &c)
Set the diffues light color for a light at a specific index.
Definition ofGLRenderer.cpp:1864
void setBlendMode(ofBlendMode blendMode)
Set this renderer's current blend mode.
Definition ofGLRenderer.cpp:1247
void pushStyle()
Push this renderer's current style into its internal style stack.
Definition ofGLRenderer.cpp:1317
void rotateZDeg(float radians)
Rotate this renderer's current matrix by degrees about the z axis.
Definition ofGLRenderer.cpp:889
void setPolyMode(ofPolyWindingMode mode)
Set this renderer's poly winding mode.
Definition ofGLRenderer.cpp:842
void setLightAmbientColor(int lightIndex, const ofFloatColor &c)
Set the ambient light color for a light at a specific index.
Definition ofGLRenderer.cpp:1858
void translate(float x, float y, float z=0)
Translate this renderer's current matrix by x, y, and z.
Definition ofGLRenderer.cpp:864
void setHexColor(int hexColor)
Set the global color this renderer will use when drawing.
Definition ofGLRenderer.cpp:1088
void setRectMode(ofRectMode mode)
Set this renderer's rect mode.
Definition ofGLRenderer.cpp:1191
void enableAntiAliasing()
Enable this renderer to use anti-aliasing if it is supported.
Definition ofGLRenderer.cpp:1414
static const std::string TYPE
Definition ofGLRenderer.h:20
void setupScreen()
setup the default screen settings for this renderer.
Definition ofGLRenderer.cpp:827
void drawString(std::string text, float x, float y, float z) const
Draw text with this renderer using the current bitmap text mode.
Definition ofGLRenderer.cpp:1526
void rotateDeg(float radians, float vecX, float vecY, float vecZ)
Rotate this renderer's current matrix by degrees about a euler.
Definition ofGLRenderer.cpp:874
void disableAntiAliasing()
Disable this renderer from using anti-aliasing.
Definition ofGLRenderer.cpp:1419
ofFillFlag getFillMode()
Get this renderer's current fill flag.
Definition ofGLRenderer.cpp:1182
ofRectangle getNativeViewport() const
Get this renderer's current native viewport.
Definition ofGLRenderer.cpp:713
void setLightSpecularColor(int lightIndex, const ofFloatColor &c)
Set the specular light color for a light at a specific index.
Definition ofGLRenderer.cpp:1870
ofHandednessType getCoordHandedness() const
Get the coordinate handidness of this renderer.
Definition ofGLRenderer.cpp:739
void rotateZRad(float radians)
Rotate this renderer's current matrix by degrees about the z axis.
Definition ofGLRenderer.cpp:915
void drawLine(float x1, float y1, float z1, float x2, float y2, float z2) const
Draw a line between two 3D points.
Definition ofGLRenderer.cpp:1424
void background(const ofColor &c)
Immediately paint a background color to the screen.
Definition ofGLRenderer.cpp:1141
void setLineSmoothing(bool smooth)
Enable/disable line smoothing for this renderer if it's supported.
Definition ofGLRenderer.cpp:1219
void multMatrix(const glm::mat4 &m)
Multiply this renderer's current matrix by m.
Definition ofGLRenderer.cpp:990
bool texturesNeedVFlip() const
Definition ofGLRenderer.cpp:754
void setLightPosition(int lightIndex, const glm::vec4 &position)
Set the position of a light at a specific index.
Definition ofGLRenderer.cpp:1876
void saveFullViewport(ofPixels &pixels)
Fill an ofPixels object with the contents of the current screen.
Definition ofGLRenderer.cpp:1920
void matrixMode(ofMatrixMode mode)
Sets this renderer's current matrix mode.
Definition ofGLRenderer.cpp:926
Definition ofMatrixStack.h:22
A generic 3d object in space with transformation (position, rotation, scale).
Definition ofNode.h:14
ofPath is a way to create a path or multiple paths consisting of points. It allows you to combine mul...
Definition ofPath.h:38
A class representing a 2D rectangle.
Definition ofRectangle.h:87
Definition ofShader.h:35
Definition ofShadow.h:24
Contains general information about the style of ofGraphics elements such as color,...
Definition ofGraphicsBaseTypes.h:51
A wrapper class for an OpenGL texture.
Definition ofTexture.h:253
Definition ofTrueTypeFont.h:164
Definition ofVbo.h:21
Definition ofVboMesh.h:6
unsigned int height
Definition ofAppEGLWindow.cpp:125
unsigned int width
Definition ofAppEGLWindow.cpp:124
ofFboMode
ofFbo mode(s) when binding
Definition ofFbo.h:8
ofDrawBitmapMode
Sets the bitmap drawing mode for text.
Definition ofGraphicsConstants.h:125
ofMatrixMode
represents the available matrix types used internally in ofMatrixStack.
Definition ofGraphicsConstants.h:119
ofHandednessType
represents the available matrix coordinate system handednesses.
Definition ofGraphicsConstants.h:116
ofRectMode
Used to represent the available rectangle drawing modes.
Definition ofGraphicsConstants.h:139
ofBlendMode
Used to represent the available blending modes for drawing.
Definition ofGraphicsConstants.h:57
ofPolyRenderMode
Definition ofGraphicsConstants.h:13
ofPolyWindingMode
represents the available polygon winding modes.
Definition ofGraphicsConstants.h:97
ofFillFlag
Used to represent the available fill modes.
Definition ofGraphicsConstants.h:41
#define a
#define c
#define b
ofOrientation
Used to represent the available screen orientations.
Definition ofWindowSettings.h:25