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.h
Go to the documentation of this file.
1#pragma once
2
3#include "ofGLBaseTypes.h"
4#include "ofPolyline.h"
5#include "ofShader.h"
6#include "ofMatrixStack.h"
7#include "of3dGraphics.h"
8#include "ofBitmapFont.h"
9#include "ofPath.h"
10//#include "ofMaterialBaseTypes.h"
11
12class ofShapeTessellation;
13class ofFbo;
14class ofVbo;
15static const int OF_NO_TEXTURE=-1;
16
18public:
20
21 void setup(int glVersionMajor, int glVersionMinor);
22
23 static const std::string TYPE;
24 const std::string & getType(){ return TYPE; }
25
26 void startRender();
27 void finishRender();
28
31 void draw(const ofMesh & vertexData, ofPolyRenderMode renderType, bool useColors, bool useTextures, bool useNormals) const;
32 void draw(const of3dPrimitive& model, ofPolyRenderMode renderType) const;
33 void draw(const ofNode& node) const;
34 void draw(const ofPolyline & poly) const;
35 void draw(const ofPath & path) const;
36 void draw(const ofImage & image, float x, float y, float z, float w, float h, float sx, float sy, float sw, float sh) const;
37 void draw(const ofFloatImage & image, float x, float y, float z, float w, float h, float sx, float sy, float sw, float sh) const;
38 void draw(const ofShortImage & image, float x, float y, float z, float w, float h, float sx, float sy, float sw, float sh) const;
39 void draw(const ofTexture & image, float x, float y, float z, float w, float h, float sx, float sy, float sw, float sh) const;
40 void draw(const ofBaseVideoDraws & video, float x, float y, float w, float h) const;
41 void draw(const ofVbo & vbo, GLuint drawMode, int first, int total) const;
42 void drawElements(const ofVbo & vbo, GLuint drawMode, int amt, int offsetelements = 0) const;
43 void drawInstanced(const ofVbo & vbo, GLuint drawMode, int first, int total, int primCount) const;
44 void drawElementsInstanced(const ofVbo & vbo, GLuint drawMode, int amt, int primCount) const;
45 void draw(const ofVboMesh & mesh, ofPolyRenderMode renderType) const;
46 void drawInstanced(const ofVboMesh & mesh, ofPolyRenderMode renderType, int primCount) const;
47 ofPath & getPath();
48
49
50
51 //--------------------------------------------
52 // transformations
53 void pushView();
54 void popView();
55
56 // setup matrices and viewport (upto you to push and pop view before and after)
57 // if width or height are 0, assume windows dimensions (ofGetWidth(), ofGetHeight())
58 // if nearDist or farDist are 0 assume defaults (calculated based on width / height)
60 void viewport(float x = 0, float y = 0, float width = -1, float height = -1, bool vflip=true);
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);
63 void setOrientation(ofOrientation orientation, bool vFlip);
66 int getViewportWidth() const;
67 int getViewportHeight() const;
68 bool isVFlipped() 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 rotateRad(float radians, float vecX, float vecY, float vecZ);
80 void rotateXRad(float radians);
81 void rotateYRad(float radians);
82 void rotateZRad(float radians);
83 void rotateRad(float radians);
84 void matrixMode(ofMatrixMode mode);
85 void loadIdentityMatrix (void);
86 void loadMatrix (const glm::mat4 & m);
87 void loadMatrix (const float * m);
88 void multMatrix (const glm::mat4 & m);
89 void multMatrix (const float * m);
90 void loadViewMatrix(const glm::mat4 & m);
91 void multViewMatrix(const glm::mat4 & m);
92
108 glm::mat4 getCurrentMatrix(ofMatrixMode matrixMode_) const;
109 glm::mat4 getCurrentOrientationMatrix() const;
110 glm::mat4 getCurrentViewMatrix() const;
111 glm::mat4 getCurrentNormalMatrix() const;
112 glm::mat4 getCurrentModelMatrix() const;
113
114 glm::vec3 getCurrentEyePosition() const;
115
116 // screen coordinate things / default gl values
118 void setupScreen();
119
120 // drawing modes
121 void setFillMode(ofFillFlag fill);
123 void setCircleResolution(int res);
124 void setRectMode(ofRectMode mode);
126 void setLineWidth(float lineWidth);
127 void setDepthTest(bool depthTest);
128 void setLineSmoothing(bool smooth);
129 void setBlendMode(ofBlendMode blendMode);
130 void enablePointSprites();
131 void disablePointSprites();
132 void enableAntiAliasing();
133 void disableAntiAliasing();
134
135 // color options
136 void setColor(int r, int g, int b); // 0-255
137 void setColor(int r, int g, int b, int a); // 0-255
138 void setColor(const ofColor & color);
139 void setColor(const ofColor & color, int _a);
140 void setColor(int gray); // new set a color as grayscale with one argument
141 void setHexColor( int hexColor ); // hex, like web 0xFF0033;
142
144
145 // bg color
147 void setBackgroundColor(const ofColor & c);
148 void background(const ofColor & c);
149 void background(float brightness);
150 void background(int hexColor, float _a=255.0f);
151 void background(int r, int g, int b, int a=255);
152
153 bool getBackgroundAuto();
154 void setBackgroundAuto(bool bManual); // default is true
155
156 void clear();
157 void clear(float r, float g, float b, float a=0);
158 void clear(float brightness, float a=0);
159 void clearAlpha();
160
161
162 // drawing
163 void drawLine(float x1, float y1, float z1, float x2, float y2, float z2) const;
164 void drawRectangle(float x, float y, float z, float w, float h) const;
165 void drawTriangle(float x1, float y1, float z1, float x2, float y2, float z2, float x3, float y3, float z3) const;
166 void drawCircle(float x, float y, float z, float radius) const;
167 void drawEllipse(float x, float y, float z, float width, float height) const;
168 void drawString(std::string text, float x, float y, float z) const;
169 void drawString(const ofTrueTypeFont & font, std::string text, float x, float y) const;
170
171
172 void enableTextureTarget(const ofTexture & tex, int textureLocation);
173 void disableTextureTarget(int textureTarget, int textureLocation);
174 void setAlphaMaskTex(const ofTexture & tex);
175 void disableAlphaMask();
177
178 const ofShader & getCurrentShader() const;
179
180 void bind(const ofBaseMaterial & material);
181 void bind(const ofShadow & shadow);
182 void bind(const ofShadow & shadow, GLenum aCubeFace);
183 void bind(const ofShader & shader);
184 void bind(const ofTexture & texture, int location);
185 void bind(const ofBaseVideoDraws & video);
186 void bind(const ofCamera & camera, const ofRectangle & viewport);
187 void unbind(const ofBaseMaterial & material);
188 void unbind(const ofShadow & shadow);
189 void unbind(const ofShadow & shadow, GLenum aCubeFace);
190 void unbind(const ofShader & shader);
191 void unbind(const ofTexture & texture, int location);
192 void unbind(const ofBaseVideoDraws & video);
193 void unbind(const ofCamera & camera);
194
195 void bind(const ofFbo & fbo);
196#ifndef TARGET_OPENGLES
197 void bindForBlitting(const ofFbo & fboSrc, ofFbo & fboDst, int attachmentPoint);
198#endif
199 void unbind(const ofFbo & fbo);
200
201 void begin(const ofFbo & fbo, ofFboMode mode);
202 void end(const ofFbo & fbo);
203
204 ofStyle getStyle() const;
205 void pushStyle();
206 void popStyle();
207 void setStyle(const ofStyle & style);
208 void setCurveResolution(int resolution);
210
211 const ofShader * getVideoShader(const ofBaseVideoDraws & video) const;
212 void setVideoShaderUniforms(const ofBaseVideoDraws & video, const ofShader & shader) const;
213
214 void enableLighting();
215 void disableLighting();
216 bool getLightingEnabled();
219 void setSmoothLighting(bool b){}
221 void enableLight(int lightIndex);
222 void disableLight(int lightIndex);
223 void setLightSpotlightCutOff(int lightIndex, float spotCutOff){}
224 void setLightSpotConcentration(int lightIndex, float exponent){}
225 void setLightAttenuation(int lightIndex, float constant, float linear, float quadratic ){}
226 void setLightAmbientColor(int lightIndex, const ofFloatColor& c){}
227 void setLightDiffuseColor(int lightIndex, const ofFloatColor& c){}
228 void setLightSpecularColor(int lightIndex, const ofFloatColor& c){}
229 void setLightPosition(int lightIndex, const glm::vec4 & position){}
230 void setLightSpotDirection(int lightIndex, const glm::vec4 & direction){}
231
232 std::string defaultVertexShaderHeader(GLenum textureTarget);
233 std::string defaultFragmentShaderHeader(GLenum textureTarget);
234
235 int getGLVersionMajor();
236 int getGLVersionMinor();
237
238 void saveScreen(int x, int y, int w, int h, ofPixels & pixels);
239 void saveFullViewport(ofPixels & pixels);
240
241 const of3dGraphics & get3dGraphics() const;
243
244private:
245
246
247 ofPolyline circlePolyline;
248 mutable ofMesh circleMesh;
249 mutable ofMesh triangleMesh;
250 mutable ofMesh rectMesh;
251 mutable ofMesh lineMesh;
252 mutable ofVbo meshVbo;
253
254 void uploadCurrentMatrix();
255
256
257 void startSmoothing();
258 void endSmoothing();
259
260 void beginDefaultShader();
261 void uploadMatrices();
262 void setDefaultUniforms();
263
264 void setAttributes(bool vertices, bool color, bool tex, bool normals);
265 void setAlphaBitmapText(bool bitmapText);
266
267
268 ofMatrixStack matrixStack;
269
270 bool bBackgroundAuto;
271 int major, minor;
272
273 const ofShader * currentShader;
274
275 bool verticesEnabled, colorsEnabled, texCoordsEnabled, normalsEnabled, bitmapStringEnabled;
276 bool usingCustomShader, settingDefaultShader, usingVideoShader;
277 int currentTextureTarget;
278
279 bool wrongUseLoggedOnce;
280 bool uniqueShader;
281
282 const ofBaseMaterial * currentMaterial;
283 int alphaMaskTextureTarget;
284
285 const ofShadow* currentShadow;
286 bool bIsShadowDepthPass;
287 GLenum shadowCubeFace;
288 bool bCustomShadowShader = false;
289
290 ofStyle currentStyle;
291 std::deque <ofStyle> styleHistory;
292 of3dGraphics graphics3d;
293 ofBitmapFont bitmapFont;
294 ofPath path;
295 const ofAppBaseWindow * window;
296
297 ofShader defaultTexRectColor;
298 ofShader defaultTexRectNoColor;
299 ofShader defaultTex2DColor;
300 ofShader defaultTex2DNoColor;
301 ofShader defaultNoTexColor;
302 ofShader defaultNoTexNoColor;
303 ofShader defaultUniqueShader;
304#ifdef TARGET_ANDROID
305 ofShader defaultOESTexColor;
306 ofShader defaultOESTexNoColor;
307#endif
308
309 ofShader alphaMaskRectShader;
310 ofShader alphaMask2DShader;
311
312 ofShader bitmapStringShader;
313
314 ofShader shaderPlanarYUY2;
315 ofShader shaderNV12;
316 ofShader shaderNV21;
317 ofShader shaderPlanarYUV;
318 ofShader shaderPlanarYUY2Rect;
319 ofShader shaderNV12Rect;
320 ofShader shaderNV21Rect;
321 ofShader shaderPlanarYUVRect;
322
323 glm::vec3 currentEyePos;
324
325 //void setDefaultFramebufferId(const GLuint& fboId_); ///< windowing systems might use this to set the default framebuffer for this renderer.
326
327 //void pushFramebufferId(); // pushes currentFramebuffer onto framebufferStack
328 //const GLuint& popFramebufferId(); /// returns topmost element in framebufferIdStack or 0, removes topmost element from stack.
329 //const GLuint& getFramebufferId(); ///< returns current target bound to GL_FRAMEBUFFER_BINDING, initially set to defaultFramebufferId
330 //void setFramebufferId(const GLuint& fboId_); // sets the current framebuffer id
331
332 // framebuffer binding state
333 std::deque<GLuint> framebufferIdStack;
334 GLuint defaultFramebufferId;
335 GLuint currentFramebufferId;
336};
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 ofGLProgrammableRenderer.h:17
void translate(float x, float y, float z=0)
Translate this renderer's current matrix by x, y, and z.
Definition ofGLProgrammableRenderer.cpp:699
void disableLighting()
Disable lighting with this renderer.
Definition ofGLProgrammableRenderer.cpp:1466
int getViewportWidth() const
Get the renderer's current viewport width.
Definition ofGLProgrammableRenderer.cpp:559
void setFillMode(ofFillFlag fill)
set this renderer's fill flag.
Definition ofGLProgrammableRenderer.cpp:961
void setPolyMode(ofPolyWindingMode mode)
Set this renderer's poly winding mode.
Definition ofGLProgrammableRenderer.cpp:676
std::string defaultFragmentShaderHeader(GLenum textureTarget)
Definition ofGLProgrammableRenderer.cpp:2461
void begin(const ofFbo &fbo, ofFboMode mode)
Begin using a frame buffer as this renderer's render surface.
Definition ofGLProgrammableRenderer.cpp:1325
void enableTextureTarget(const ofTexture &tex, int textureLocation)
Bind the texture at the texture location.
Definition ofGLProgrammableRenderer.cpp:1226
void loadMatrix(const glm::mat4 &m)
Load a matrix as this renderer's current matrix.
Definition ofGLProgrammableRenderer.cpp:749
void setLineWidth(float lineWidth)
Set the line width this renderer should use when drawing lines.
Definition ofGLProgrammableRenderer.cpp:1000
void enableSeparateSpecularLight()
Enable seperate specular lighting parameters.
Definition ofGLProgrammableRenderer.h:217
void multMatrix(const glm::mat4 &m)
Multiply this renderer's current matrix by m.
Definition ofGLProgrammableRenderer.cpp:760
bool isVFlipped() const
Returns true if the renderer's current viewport is vertically flipped.
Definition ofGLProgrammableRenderer.cpp:569
void bindForBlitting(const ofFbo &fboSrc, ofFbo &fboDst, int attachmentPoint)
Bind source and destination frame buffers for blitting.
Definition ofGLProgrammableRenderer.cpp:1370
void rotateRad(float radians, float vecX, float vecY, float vecZ)
Rotate this renderer's current matrix by degrees about a euler.
Definition ofGLProgrammableRenderer.cpp:711
void setColor(int r, int g, int b)
Set the global color this renderer will use when drawing.
Definition ofGLProgrammableRenderer.cpp:861
void disableLight(int lightIndex)
Disable a light at a specific index.
Definition ofGLProgrammableRenderer.cpp:1475
void setLightDiffuseColor(int lightIndex, const ofFloatColor &c)
Set the diffues light color for a light at a specific index.
Definition ofGLProgrammableRenderer.h:227
glm::mat4 getCurrentMatrix(ofMatrixMode matrixMode_) const
Queries the current OpenGL matrix state.
Definition ofGLProgrammableRenderer.cpp:828
void saveScreen(int x, int y, int w, int h, ofPixels &pixels)
Fill an ofPixels object with a subsection of the current screen.
Definition ofGLProgrammableRenderer.cpp:2720
void disableTextureTarget(int textureTarget, int textureLocation)
Unbind the texture target at the texture location.
Definition ofGLProgrammableRenderer.cpp:1245
void clear()
Clear this renderer's current color and bit depths.
Definition ofGLProgrammableRenderer.cpp:895
glm::mat4 getCurrentModelMatrix() const
Definition ofGLProgrammableRenderer.cpp:793
void setCircleResolution(int res)
Set the resolution to use when drawing ellipses with this renderer.
Definition ofGLProgrammableRenderer.cpp:665
void loadIdentityMatrix(void)
Load this renderer's identity matrix.
Definition ofGLProgrammableRenderer.cpp:743
void setLineSmoothing(bool smooth)
Enable/disable line smoothing for this renderer if it's supported.
Definition ofGLProgrammableRenderer.cpp:1024
void setLightSpotDirection(int lightIndex, const glm::vec4 &direction)
Set the spot direction of a light at a specific index.
Definition ofGLProgrammableRenderer.h:230
void startRender()
Starts using this renderer as the rendering surface.
Definition ofGLProgrammableRenderer.cpp:89
void drawString(std::string text, float x, float y, float z) const
Draw text with this renderer using the current bitmap text mode.
void enablePointSprites()
Enable point sprites when using this renderer.
Definition ofGLProgrammableRenderer.cpp:1082
bool getLightingEnabled()
Returns true if lighting is enabled with this renderer.
Definition ofGLProgrammableRenderer.cpp:1480
bool getBackgroundAuto()
Get the current auto redraw background setting for this renderer.
Definition ofGLProgrammableRenderer.cpp:924
void pushStyle()
Push this renderer's current style into its internal style stack.
Definition ofGLProgrammableRenderer.cpp:1137
void drawLine(float x1, float y1, float z1, float x2, float y2, float z2) const
Draw a line between two 3D points.
Definition ofGLProgrammableRenderer.cpp:1662
void drawTriangle(float x1, float y1, float z1, float x2, float y2, float z2, float x3, float y3, float z3) const
Draw a triangle using three 3D points.
Definition ofGLProgrammableRenderer.cpp:1702
void setLightAmbientColor(int lightIndex, const ofFloatColor &c)
Set the ambient light color for a light at a specific index.
Definition ofGLProgrammableRenderer.h:226
void setBlendMode(ofBlendMode blendMode)
Set this renderer's current blend mode.
Definition ofGLProgrammableRenderer.cpp:1039
void pushView()
Push the current viewport into the renderer's viewport stack.
Definition ofGLProgrammableRenderer.cpp:525
void setLightSpotConcentration(int lightIndex, float exponent)
Set the spotlight concentration (exponent) for a light at a specific index.
Definition ofGLProgrammableRenderer.h:224
const of3dGraphics & get3dGraphics() const
Get a const reference of this renderer's 3D graphics object.
Definition ofGLProgrammableRenderer.cpp:2819
void setLightPosition(int lightIndex, const glm::vec4 &position)
Set the position of a light at a specific index.
Definition ofGLProgrammableRenderer.h:229
void draw(const ofMesh &vertexData, ofPolyRenderMode renderType, bool useColors, bool useTextures, bool useNormals) const
Draw a mesh with this renderer.
Definition ofGLProgrammableRenderer.cpp:120
void clearAlpha()
Restore the alpha color to its full opacity value.
Definition ofGLProgrammableRenderer.cpp:911
ofColor getBackgroundColor()
Get this renderer's current background color.
Definition ofGLProgrammableRenderer.cpp:929
void unbind(const ofBaseMaterial &material)
Unbind a material previously bound to this renderer with bind().
Definition ofGLProgrammableRenderer.cpp:1434
ofPath & getPath()
Get a reference to the path used internally by this renderer.
Definition ofGLProgrammableRenderer.cpp:487
void setBackgroundAuto(bool bManual)
Enable/disable automatic redrawing of the background each frame.
Definition ofGLProgrammableRenderer.cpp:919
void disableAlphaMask()
Disable this renderer's current alpha mask texture.
Definition ofGLProgrammableRenderer.cpp:1279
void setup(int glVersionMajor, int glVersionMinor)
Definition ofGLProgrammableRenderer.cpp:2465
void drawCircle(float x, float y, float z, float radius) const
Draw a circle using a 3D point and a radius.
Definition ofGLProgrammableRenderer.cpp:1719
void saveFullViewport(ofPixels &pixels)
Fill an ofPixels object with the contents of the current screen.
Definition ofGLProgrammableRenderer.cpp:2715
void setStyle(const ofStyle &style)
Set this renderer's current style object.
Definition ofGLProgrammableRenderer.cpp:1154
glm::mat4 getCurrentOrientationMatrix() const
Get this renderer's current orientation matrix.
Definition ofGLProgrammableRenderer.cpp:847
ofRectangle getCurrentViewport() const
Get this renderer's current viewport.
Definition ofGLProgrammableRenderer.cpp:549
ofRectangle getNativeViewport() const
Get this renderer's current native viewport.
Definition ofGLProgrammableRenderer.cpp:554
void enableAntiAliasing()
Enable this renderer to use anti-aliasing if it is supported.
Definition ofGLProgrammableRenderer.cpp:1105
int getGLVersionMajor()
Get the major OpenGL version number this renderer is using.
Definition ofGLProgrammableRenderer.cpp:2706
void setHexColor(int hexColor)
Set the global color this renderer will use when drawing.
Definition ofGLProgrammableRenderer.cpp:882
void setRectMode(ofRectMode mode)
Set this renderer's rect mode.
Definition ofGLProgrammableRenderer.cpp:990
glm::mat4 getCurrentViewMatrix() const
Get this renderer's current view matrix.
Definition ofGLProgrammableRenderer.cpp:783
void drawInstanced(const ofVbo &vbo, GLuint drawMode, int first, int total, int primCount) const
Draw vertices from a vertext buffer using instanced arrays.
Definition ofGLProgrammableRenderer.cpp:451
void background(const ofColor &c)
Immediately paint a background color to the screen.
Definition ofGLProgrammableRenderer.cpp:940
int getGLVersionMinor()
Get the minor OpenGL version number this renderer is using.
Definition ofGLProgrammableRenderer.cpp:2710
void drawElementsInstanced(const ofVbo &vbo, GLuint drawMode, int amt, int primCount) const
Draw vertices from a vertex buffer using this renderer.
Definition ofGLProgrammableRenderer.cpp:469
void end(const ofFbo &fbo)
Stop using the specified frame buffer as this renderer's render surface.
Definition ofGLProgrammableRenderer.cpp:1343
void setupScreenPerspective(float width=-1, float height=-1, float fov=60, float nearDist=0, float farDist=0)
Setup the renderer to use a perspective matrix.
Definition ofGLProgrammableRenderer.cpp:591
void setLightSpecularColor(int lightIndex, const ofFloatColor &c)
Set the specular light color for a light at a specific index.
Definition ofGLProgrammableRenderer.h:228
void setDepthTest(bool depthTest)
Enable/disable depth testing with this renderer.
Definition ofGLProgrammableRenderer.cpp:1015
const ofShader & getCurrentShader() const
Definition ofGLProgrammableRenderer.cpp:1119
void bind(const ofBaseMaterial &material)
Bind a material to be used with this renderer.
Definition ofGLProgrammableRenderer.cpp:1404
void pushMatrix()
Pushes this renderer's matrix stack down by one.
Definition ofGLProgrammableRenderer.cpp:683
void viewport(ofRectangle viewport)
Set this renderer's viewport using a rectangle.
Definition ofGLProgrammableRenderer.cpp:537
ofFillFlag getFillMode()
Get this renderer's current fill flag.
Definition ofGLProgrammableRenderer.cpp:981
void multViewMatrix(const glm::mat4 &m)
Multiply this renderer's view matrix by m.
Definition ofGLProgrammableRenderer.cpp:777
void drawElements(const ofVbo &vbo, GLuint drawMode, int amt, int offsetelements=0) const
Draw vertices from a vertext buffer with this renderer.
Definition ofGLProgrammableRenderer.cpp:437
void drawString(const ofTrueTypeFont &font, std::string text, float x, float y) const
Draw text with this renderer using an ofTrueType font.
void rotateZRad(float radians)
Rotate this renderer's current matrix by degrees about the z axis.
Definition ofGLProgrammableRenderer.cpp:727
void setupScreen()
setup the default screen settings for this renderer.
Definition ofGLProgrammableRenderer.cpp:659
ofRectMode getRectMode()
Get this renderer's current rect mode.
Definition ofGLProgrammableRenderer.cpp:995
void loadViewMatrix(const glm::mat4 &m)
Load m into this renderer's matrix stack as a view matrix.
Definition ofGLProgrammableRenderer.cpp:771
void rotateYRad(float radians)
Rotate this renderer's current matrix by degrees about the y axis.
Definition ofGLProgrammableRenderer.cpp:722
void setBackgroundColor(const ofColor &c)
Set this renderer's background color.
Definition ofGLProgrammableRenderer.cpp:934
void setAlphaMaskTex(const ofTexture &tex)
Enable alpha masking using this texture as the mask source.
Definition ofGLProgrammableRenderer.cpp:1268
GLenum getCurrentTextureTarget()
Definition ofGLProgrammableRenderer.cpp:1263
void popView()
Pop the current viewport from the renderer's view stack.
Definition ofGLProgrammableRenderer.cpp:530
void setLightAttenuation(int lightIndex, float constant, float linear, float quadratic)
Set the light attenuation for a light at a specific index.
Definition ofGLProgrammableRenderer.h:225
void setCoordHandedness(ofHandednessType handedness)
Set the coordinate handidness of this renderer.
Definition ofGLProgrammableRenderer.cpp:574
const ofShader * getVideoShader(const ofBaseVideoDraws &video) const
Definition ofGLProgrammableRenderer.cpp:2565
static const std::string TYPE
Definition ofGLProgrammableRenderer.h:23
void matrixMode(ofMatrixMode mode)
Sets this renderer's current matrix mode.
Definition ofGLProgrammableRenderer.cpp:738
void popMatrix()
Pops this renderer's current matrix stack.
Definition ofGLProgrammableRenderer.cpp:688
void setVideoShaderUniforms(const ofBaseVideoDraws &video, const ofShader &shader) const
Definition ofGLProgrammableRenderer.cpp:2635
void drawRectangle(float x, float y, float z, float w, float h) const
Draw a rectangle using a 3D point and a width and height.
Definition ofGLProgrammableRenderer.cpp:1677
int getViewportHeight() const
Get the renderer's current viewport width.
Definition ofGLProgrammableRenderer.cpp:564
void setSmoothLighting(bool b)
Enable/disable smooth light shading.
Definition ofGLProgrammableRenderer.h:219
glm::vec3 getCurrentEyePosition() const
Definition ofGLProgrammableRenderer.cpp:798
void disableSeparateSpecularLight()
Disable seperate specular lighting parameters.
Definition ofGLProgrammableRenderer.h:218
void finishRender()
Stop using this renderer as the rendering surface.
Definition ofGLProgrammableRenderer.cpp:110
void disablePointSprites()
Disable point sprites when using this renderer.
Definition ofGLProgrammableRenderer.cpp:1093
glm::mat4 getCurrentNormalMatrix() const
Get this renderer's current normal matrix.
Definition ofGLProgrammableRenderer.cpp:788
void setLightSpotlightCutOff(int lightIndex, float spotCutOff)
Set the spot light cutoff for a light at a specific index.
Definition ofGLProgrammableRenderer.h:223
void enableLight(int lightIndex)
Enable a light at a specific index.
Definition ofGLProgrammableRenderer.cpp:1470
void setBitmapTextMode(ofDrawBitmapMode mode)
Set this renderer's bitmap text mode.
Definition ofGLProgrammableRenderer.cpp:890
void scale(float xAmnt, float yAmnt, float zAmnt=1)
Scale this renderer's current matrix by xAmnt, yAmnt, and zAmnt.
Definition ofGLProgrammableRenderer.cpp:705
void setupScreenOrtho(float width=-1, float height=-1, float nearDist=-1, float farDist=1)
Setup the renderer to use an orthographic matrix.
Definition ofGLProgrammableRenderer.cpp:627
void setupGraphicDefaults()
setup the default graphics settings for this renderer.
Definition ofGLProgrammableRenderer.cpp:652
ofHandednessType getCoordHandedness() const
Get the coordinate handidness of this renderer.
Definition ofGLProgrammableRenderer.cpp:579
void rotateXRad(float radians)
Rotate this renderer's current matrix by degrees about the x axis.
Definition ofGLProgrammableRenderer.cpp:717
const std::string & getType()
Get the string representation of the renderer type.
Definition ofGLProgrammableRenderer.h:24
void setGlobalAmbientColor(const ofColor &c)
Set the global ambient light color.
Definition ofGLProgrammableRenderer.h:220
void enableLighting()
Enable lighting with this renderer.
Definition ofGLProgrammableRenderer.cpp:1461
void setOrientation(ofOrientation orientation, bool vFlip)
set this renderer's orientation.
Definition ofGLProgrammableRenderer.cpp:584
void drawEllipse(float x, float y, float z, float width, float height) const
Draw an ellipse using a 3D point, width, and height.
Definition ofGLProgrammableRenderer.cpp:1737
std::string defaultVertexShaderHeader(GLenum textureTarget)
Definition ofGLProgrammableRenderer.cpp:2457
ofStyle getStyle() const
Get this renderer's current style object.
Definition ofGLProgrammableRenderer.cpp:1133
void setCurveResolution(int resolution)
Set the resolution used when drawing curves with this renderer.
Definition ofGLProgrammableRenderer.cpp:1198
void popStyle()
Pop this renderer's current style from its internal style stack.
Definition ofGLProgrammableRenderer.cpp:1147
void disableAntiAliasing()
Disable this renderer from using anti-aliasing.
Definition ofGLProgrammableRenderer.cpp:1112
Definition ofMatrixStack.h:22
A generic 3d object in space with transformation (position, rotation, scale).
Definition ofNode.h:14
ofPath is a way to create a path or multiple paths consisting of points. It allows you to combine mul...
Definition ofPath.h:38
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