class methods
- ofGLRenderer()
- ~ofGLRenderer()
- background()
- begin()
- bind()
- bindForBlitting()
- clear()
- clearAlpha()
- disableAlphaMask()
- disableAntiAliasing()
- disableLight()
- disableLighting()
- disablePointSprites()
- disableSeparateSpecularLight()
- disableTextureTarget()
- draw()
- drawCircle()
- drawElements()
- drawElementsInstanced()
- drawEllipse()
- drawInstanced()
- drawLine()
- drawRectangle()
- drawString()
- drawTriangle()
- enableAntiAliasing()
- enableLight()
- enableLighting()
- enablePointSprites()
- enableSeparateSpecularLight()
- enableTextureTarget()
- end()
- finishRender()
- get3dGraphics()
- getBackgroundAuto()
- getBackgroundColor()
- getCoordHandedness()
- getCurrentMatrix()
- getCurrentNormalMatrix()
- getCurrentOrientationMatrix()
- getCurrentViewMatrix()
- getCurrentViewport()
- getFillMode()
- getGLVersionMajor()
- getGLVersionMinor()
- getLightingEnabled()
- getNativeViewport()
- getPath()
- getRectMode()
- getStyle()
- getType()
- getViewportHeight()
- getViewportWidth()
- isVFlipped()
- loadIdentityMatrix()
- loadMatrix()
- loadViewMatrix()
- matrixMode()
- multMatrix()
- multViewMatrix()
- popMatrix()
- popStyle()
- popView()
- pushMatrix()
- pushStyle()
- pushView()
- rotateDeg()
- rotateRad()
- rotateXDeg()
- rotateXRad()
- rotateYDeg()
- rotateYRad()
- rotateZDeg()
- rotateZRad()
- saveFullViewport()
- saveScreen()
- scale()
- setAlphaMaskTex()
- setBackgroundAuto()
- setBackgroundColor()
- setBitmapTextMode()
- setBlendMode()
- setCircleResolution()
- setColor()
- setCoordHandedness()
- setCurveResolution()
- setDepthTest()
- setFillMode()
- setGlobalAmbientColor()
- setHexColor()
- setLightAmbientColor()
- setLightAttenuation()
- setLightDiffuseColor()
- setLightPosition()
- setLightSpecularColor()
- setLightSpotConcentration()
- setLightSpotDirection()
- setLightSpotlightCutOff()
- setLineSmoothing()
- setLineWidth()
- setOrientation()
- setPolyMode()
- setRectMode()
- setSmoothLighting()
- setStyle()
- setup()
- setupGraphicDefaults()
- setupScreen()
- setupScreenOrtho()
- setupScreenPerspective()
- startRender()
- texturesNeedVFlip()
- translate()
- unbind()
- viewport()
variables
Extends
This class extends others, you can call their methods on an instance of ofGLRenderer too:
The ofGLRenderer is a renderer for OF that supports OpenGL 2 and lower. It's the more classic, "direct mode" version of OpenGL that you may be familiar with but that also uses vertex arrays underneath to store all of the vertices that you create for the basic OF drawing operations. This is the default renderer that is created when you create your OF app:
ofSetupOpenGL(1024,768, OF_WINDOW); // by default this makes a ofGLRenderer
// this kicks off the running of my app
// can be OF_WINDOW or OF_FULLSCREEN
// pass in width and height too:
ofRunApp( new testApp());
This renderer does not work so well with mobile devices (more specifically with GLES) or on ARM6/7 Linux devices (Raspberry Pi, for instance) but it is the classic version that will be supported on all laptops and desktop machines. Most of the calls to this renderer are handled by other functions, so most of this documentation will simply link to the end user functions that you should call, since you probably don't want to call the renderer directly.
bindForBlitting(...)
void ofGLRenderer::bindForBlitting(const ofFbo &fboSrc, ofFbo &fboDst, int attachmentPoint)
disableTextureTarget(...)
void ofGLRenderer::disableTextureTarget(int textureTarget, int textureLocation)
draw(...)
void ofGLRenderer::draw(const of3dPrimitive &model, ofPolyRenderMode renderType)
Draws a of3dPrimitive. Called internally.
draw(...)
void ofGLRenderer::draw(const ofBaseVideoDraws &video, float x, float y, float w, float h)
draw(...)
void ofGLRenderer::draw(const ofFloatImage &image, float x, float y, float z, float w, float h, float sx, float sy, float sw, float sh)
Draws an texture.
draw(...)
void ofGLRenderer::draw(const ofImage &image, float x, float y, float z, float w, float h, float sx, float sy, float sw, float sh)
Draws an texture.
draw(...)
void ofGLRenderer::draw(const ofMesh &vertexData, ofPolyRenderMode renderType, bool useColors, bool useTextures, bool useNormals)
Handles drawing ofPolylines. This is called when you call line.draw().
draw(...)
void ofGLRenderer::draw(const ofPath &path)
Handles drawing ofPath. This is called when you call ofPath::draw().
draw(...)
void ofGLRenderer::draw(const ofShortImage &image, float x, float y, float z, float w, float h, float sx, float sy, float sw, float sh)
Draws an ofMesh.
draw(...)
void ofGLRenderer::draw(const ofTexture &image, float x, float y, float z, float w, float h, float sx, float sy, float sw, float sh)
drawCircle(...)
void ofGLRenderer::drawCircle(float x, float y, float z, float radius)
See ofDrawCircle
drawElements(...)
void ofGLRenderer::drawElements(const ofVbo &vbo, GLuint drawMode, int amt, int offsetelements=0)
drawElementsInstanced(...)
void ofGLRenderer::drawElementsInstanced(const ofVbo &vbo, GLuint drawMode, int amt, int primCount)
drawEllipse(...)
void ofGLRenderer::drawEllipse(float x, float y, float z, float width, float height)
See ofDrawEllipse
drawInstanced(...)
void ofGLRenderer::drawInstanced(const ofVbo &vbo, GLuint drawMode, int first, int total, int primCount)
drawInstanced(...)
void ofGLRenderer::drawInstanced(const ofVboMesh &mesh, ofPolyRenderMode renderType, int primCount)
drawLine(...)
void ofGLRenderer::drawLine(float x1, float y1, float z1, float x2, float y2, float z2)
See ofLine
drawRectangle(...)
void ofGLRenderer::drawRectangle(float x, float y, float z, float w, float h)
See ofRect
drawString(...)
void ofGLRenderer::drawString(const ofTrueTypeFont &font, string text, float x, float y)
drawString(...)
void ofGLRenderer::drawString(string text, float x, float y, float z)
Draws a characters to the screen.
drawTriangle(...)
void ofGLRenderer::drawTriangle(float x1, float y1, float z1, float x2, float y2, float z2, float x3, float y3, float z3)
Draw a Triangle.
enableTextureTarget(...)
void ofGLRenderer::enableTextureTarget(const ofTexture &tex, int textureLocation)
setCoordHandedness(...)
void ofGLRenderer::setCoordHandedness(ofHandednessType handedness)
setDepthTest(...)
void ofGLRenderer::setDepthTest(bool depthTest)
See ofDisableDepthTest and ofEnableDepthTest
setLightAmbientColor(...)
void ofGLRenderer::setLightAmbientColor(int lightIndex, const ofFloatColor &c)
setLightAttenuation(...)
void ofGLRenderer::setLightAttenuation(int lightIndex, float constant, float linear, float quadratic)
setLightDiffuseColor(...)
void ofGLRenderer::setLightDiffuseColor(int lightIndex, const ofFloatColor &c)
setLightPosition(...)
void ofGLRenderer::setLightPosition(int lightIndex, const glm::vec4 &position)
setLightSpecularColor(...)
void ofGLRenderer::setLightSpecularColor(int lightIndex, const ofFloatColor &c)
setLightSpotConcentration(...)
void ofGLRenderer::setLightSpotConcentration(int lightIndex, float exponent)
setLightSpotDirection(...)
void ofGLRenderer::setLightSpotDirection(int lightIndex, const glm::vec4 &direction)
setLightSpotlightCutOff(...)
void ofGLRenderer::setLightSpotlightCutOff(int lightIndex, float spotCutOff)
setupScreenOrtho(...)
void ofGLRenderer::setupScreenOrtho(float width, float height, float nearDist, float farDist)
setupScreenPerspective(...)
void ofGLRenderer::setupScreenPerspective(float width, float height, float fov, float nearDist, float farDist)
viewport(...)
void ofGLRenderer::viewport(float x, float y, float width, float height, bool vflip=true)
Last updated 화요일, 19 11월 2024 17:25:17 UTC - 2537ee49f6d46d5fe98e408849448314fd1f180e
If you have any doubt about the usage of this module you can ask in the forum.
If you want to contribute better documentation or start documenting this section you can do so here
If you find anything wrong with this docs you can report any error by opening an issue