GraphicsContext Class | Qt 3D 5.6

Qt 5.6 | Qt 3D | C++ Classes | GraphicsContext

Qt 5.6.2 Reference Documentation

# GraphicsContext Class

(Qt3DRender::Render::GraphicsContext)

- List of all members, including inherited members

## Public Functions

| GraphicsContext()
| ~GraphicsContext()
void | activateRenderTarget(RenderTarget *renderTarget, const AttachmentPack &attachments, GLuint defaultFboId)
void | activateShader(Shader *shader)
int | activateTexture(TextureScope scope, Texture *tex, int onUnit = -1)
GLuint | activeFBO() const
Material * | activeMaterial() const
QOpenGLShaderProgram * | activeShader()
void | alphaTest(GLenum mode1, GLenum mode2)
bool | beginDrawing(QSurface *surface, const QColor &color)
void | bindBufferBase(GLenum target, GLuint bindingIndex, GLuint buffer)
void | bindFragOutputs(GLuint shader, const QHash<QString, int> &outputs)
void | bindUniform(const QVariant &v, const ShaderUniform &description)
void | bindUniformBlock(GLuint programId, GLuint uniformBlockIndex, GLuint uniformBlockBinding)
void | blendEquation(GLenum mode)
void | blendFunci(GLuint buf, GLenum sfactor, GLenum dfactor)
GLuint | boundFrameBufferObject()
void | buildUniformBuffer(const QVariant &v, const ShaderUniform &description, QByteArray &buffer)
void | clearBackBuffer(QClearBuffer::BufferType buffers)
void | clearColor(const QColor &color)
QOpenGLShaderProgram * | containsProgram(const ProgramDNA &dna)
QGraphicsApiFilter * | contextInfo() const
void | cullFace(GLenum mode)
RenderStateSet * | currentStateSet() const
void | deactivateTexture(Texture *tex)
GLuint | defaultFBO() const
void | depthMask(GLenum mode)
void | depthTest(GLenum mode)
void | disableAlphaCoverage()
void | disableClipPlane(int clipPlane)
void | disablePrimitiveRestart()
void | doneCurrent()
void | drawArrays(GLenum primitiveType, GLint first, GLsizei count)
void | drawArraysInstanced(GLenum primitiveType, GLint first, GLsizei count, GLsizei instances)
void | drawElements(GLenum primitiveType, GLsizei primitiveCount, GLint indexType, void *indices, GLint baseVertex = 0)
void | drawElementsInstanced(GLenum primitiveType, GLsizei primitiveCount, GLint indexType, void *indices, GLsizei instances, GLint baseVertex = 0, GLint baseInstance = 0)
void | enableAlphaCoverage()
void | enableClipPlane(int clipPlane)
void | enablePrimitiveRestart(int restartIndex)
void | endDrawing(bool swapBuffers)
void | executeCommand(const RenderCommand *command)
void | frontFace(GLenum mode)
QOpenGLBuffer | glBufferForRenderBuffer(Buffer *buf)
int | id() const
bool | makeCurrent(QSurface *surface)
GLint | maxClipPlaneCount()
QOpenGLContext * | openGLContext()
void | pointSize(bool programmable, GLfloat value)
void | releaseOpenGL()
void | setActiveMaterial(Material *rmat)
void | setCurrentStateSet(RenderStateSet *ss)
void | setOpenGLContext(QOpenGLContext *ctx, QSurface *surface)
void | setRenderer(Renderer *renderer)
void | setUniforms(QUniformPack &uniforms)
void | setVerticesPerPatch(GLint verticesPerPatch)
void | setViewport(const QRectF &viewport)
void | specifyAttribute(const Attribute *attribute, Buffer *buffer, const QString &shaderName)
void | specifyIndices(Buffer *buffer)
bool | supportsVAO() const
void | updateBuffer(Buffer *buffer)
QRectF | viewport() const

## Static Public Members

GLuint | byteSizeFromType(GLint type)
GLint | elementType(GLint type)
GLint | glDataTypeFromAttributeDataType(QAttribute::DataType dataType)
GLint | tupleSizeFromType(GLint type)

## Member Function Documentation

### GraphicsContext::GraphicsContext()

Default constructs an instance of GraphicsContext.

### GraphicsContext::~GraphicsContext()

Destroys the instance of GraphicsContext.

### void GraphicsContext::activateRenderTarget(RenderTarget *renderTarget, const AttachmentPack &attachments, GLuint defaultFboId)

### void GraphicsContext::activateShader(Shader *shader)

### int GraphicsContext::activateTexture(TextureScope scope, Texture *tex, int onUnit = -1)

### GLuint GraphicsContext::activeFBO() const

### Material *GraphicsContext::activeMaterial() const

See also setActiveMaterial().

### QOpenGLShaderProgram *GraphicsContext::activeShader()

### void GraphicsContext::alphaTest(GLenum mode1, GLenum mode2)

### bool GraphicsContext::beginDrawing(QSurface *surface, const QColor &color)

### void GraphicsContext::bindBufferBase(GLenum target, GLuint bindingIndex, GLuint buffer)

### void GraphicsContext::bindFragOutputs(GLuint shader, const QHash<QString, int> &outputs)

### void GraphicsContext::bindUniform(const QVariant &v, const ShaderUniform &description)

### void GraphicsContext::bindUniformBlock(GLuint programId, GLuint uniformBlockIndex, GLuint uniformBlockBinding)

### void GraphicsContext::blendEquation(GLenum mode)

### void GraphicsContext::blendFunci(GLuint buf, GLenum sfactor, GLenum dfactor)

### GLuint GraphicsContext::boundFrameBufferObject()

### void GraphicsContext::buildUniformBuffer(const QVariant &v, const ShaderUniform &description, QByteArray &buffer)

### `[static]` GLuint GraphicsContext::byteSizeFromType(GLint type)

### void GraphicsContext::clearBackBuffer(QClearBuffer::BufferType buffers)

### void GraphicsContext::clearColor(const QColor &color)

### QOpenGLShaderProgram *GraphicsContext::containsProgram(const ProgramDNA &dna)

### QGraphicsApiFilter *GraphicsContext::contextInfo() const

### void GraphicsContext::cullFace(GLenum mode)

### RenderStateSet *GraphicsContext::currentStateSet() const

See also setCurrentStateSet().

### void GraphicsContext::deactivateTexture(Texture *tex)

### GLuint GraphicsContext::defaultFBO() const

### void GraphicsContext::depthMask(GLenum mode)

### void GraphicsContext::depthTest(GLenum mode)

### void GraphicsContext::disableAlphaCoverage()

### void GraphicsContext::disableClipPlane(int clipPlane)

### void GraphicsContext::disablePrimitiveRestart()

### void GraphicsContext::doneCurrent()

### void GraphicsContext::drawArrays(GLenum primitiveType, GLint first, GLsizei count)

### void GraphicsContext::drawArraysInstanced(GLenum primitiveType, GLint first, GLsizei count, GLsizei instances)

### void GraphicsContext::drawElements(GLenum primitiveType, GLsizei primitiveCount, GLint indexType, void *indices, GLint baseVertex = 0)

### void GraphicsContext::drawElementsInstanced(GLenum primitiveType, GLsizei primitiveCount, GLint indexType, void *indices, GLsizei instances, GLint baseVertex = 0, GLint baseInstance = 0)

### `[static]` GLint GraphicsContext::elementType(GLint type)

### void GraphicsContext::enableAlphaCoverage()

### void GraphicsContext::enableClipPlane(int clipPlane)

### void GraphicsContext::enablePrimitiveRestart(int restartIndex)

### void GraphicsContext::endDrawing(bool swapBuffers)

### void GraphicsContext::executeCommand(const RenderCommand *command)

### void GraphicsContext::frontFace(GLenum mode)

### QOpenGLBuffer GraphicsContext::glBufferForRenderBuffer(Buffer *buf)

### `[static]` GLint GraphicsContext::glDataTypeFromAttributeDataType(QAttribute::DataType dataType)

### int GraphicsContext::id() const

### bool GraphicsContext::makeCurrent(QSurface *surface)

### GLint GraphicsContext::maxClipPlaneCount()

### QOpenGLContext *GraphicsContext::openGLContext()

See also setOpenGLContext().

### void GraphicsContext::pointSize(bool programmable, GLfloat value)

### void GraphicsContext::releaseOpenGL()

### void GraphicsContext::setActiveMaterial(Material *rmat)

See also activeMaterial().

### void GraphicsContext::setCurrentStateSet(RenderStateSet *ss)

See also currentStateSet().

### void GraphicsContext::setOpenGLContext(QOpenGLContext *ctx, QSurface *surface)

See also openGLContext().

### void GraphicsContext::setRenderer(Renderer *renderer)

### void GraphicsContext::setUniforms(QUniformPack &uniforms)

### void GraphicsContext::setVerticesPerPatch(GLint verticesPerPatch)

### void GraphicsContext::setViewport(const QRectF &viewport)

See also viewport().

### void GraphicsContext::specifyAttribute(const Attribute *attribute, Buffer *buffer, const QString &shaderName)

### void GraphicsContext::specifyIndices(Buffer *buffer)

### bool GraphicsContext::supportsVAO() const

### `[static]` GLint GraphicsContext::tupleSizeFromType(GLint type)

### void GraphicsContext::updateBuffer(Buffer *buffer)

### QRectF GraphicsContext::viewport() const

See also setViewport().