QGraphicsContext Class

(Qt3D::Render::QGraphicsContext)

Public Functions

QGraphicsContext()
~QGraphicsContext()
void activateRenderTarget(RenderTarget * renderTarget, const AttachmentPack & attachments, GLuint defaultFboId)
void activateShader(RenderShader * shader)
int activateTexture(TextureScope scope, RenderTexture * tex, int onUnit = -1)
GLuint activeFBO() const
RenderMaterial * 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)
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)
QOpenGLFilter * contextInfo() const
void cullFace(GLenum mode)
RenderStateSet * currentStateSet() const
void deactivateTexture(RenderTexture * 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(RenderBuffer * buf)
int id() const
bool makeCurrent(QSurface * surface)
GLint maxClipPlaneCount()
QOpenGLContext * openGLContext()
void releaseOpenGL()
void setActiveMaterial(RenderMaterial * 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 RenderAttribute * attribute, RenderBuffer * buffer, const QString & shaderName)
void specifyIndices(RenderBuffer * buffer)
bool supportsVAO() const
void updateBuffer(RenderBuffer * 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

QGraphicsContext::QGraphicsContext()

QGraphicsContext::~QGraphicsContext()

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

void QGraphicsContext::activateShader(RenderShader * shader)

int QGraphicsContext::activateTexture(TextureScope scope, RenderTexture * tex, int onUnit = -1)

GLuint QGraphicsContext::activeFBO() const

RenderMaterial * QGraphicsContext::activeMaterial() const

See also setActiveMaterial().

QOpenGLShaderProgram * QGraphicsContext::activeShader()

void QGraphicsContext::alphaTest(GLenum mode1, GLenum mode2)

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

void QGraphicsContext::bindBufferBase(GLenum target, GLuint bindingIndex, GLuint buffer)

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

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

void QGraphicsContext::bindUniformBlock(GLuint programId, GLuint uniformBlockIndex, GLuint uniformBlockBinding)

void QGraphicsContext::blendEquation(GLenum mode)

GLuint QGraphicsContext::boundFrameBufferObject()

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

[static] GLuint QGraphicsContext::byteSizeFromType(GLint type)

void QGraphicsContext::clearBackBuffer(QClearBuffer::BufferType buffers)

void QGraphicsContext::clearColor(const QColor & color)

QOpenGLShaderProgram * QGraphicsContext::containsProgram(const ProgramDNA & dna)

QOpenGLFilter * QGraphicsContext::contextInfo() const

void QGraphicsContext::cullFace(GLenum mode)

RenderStateSet * QGraphicsContext::currentStateSet() const

See also setCurrentStateSet().

void QGraphicsContext::deactivateTexture(RenderTexture * tex)

GLuint QGraphicsContext::defaultFBO() const

void QGraphicsContext::depthMask(GLenum mode)

void QGraphicsContext::depthTest(GLenum mode)

void QGraphicsContext::disableAlphaCoverage()

void QGraphicsContext::disableClipPlane(int clipPlane)

void QGraphicsContext::disablePrimitiveRestart()

void QGraphicsContext::doneCurrent()

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

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

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

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

[static] GLint QGraphicsContext::elementType(GLint type)

void QGraphicsContext::enableAlphaCoverage()

void QGraphicsContext::enableClipPlane(int clipPlane)

void QGraphicsContext::enablePrimitiveRestart(int restartIndex)

void QGraphicsContext::endDrawing(bool swapBuffers)

void QGraphicsContext::executeCommand(const RenderCommand * command)

void QGraphicsContext::frontFace(GLenum mode)

QOpenGLBuffer QGraphicsContext::glBufferForRenderBuffer(RenderBuffer * buf)

[static] GLint QGraphicsContext::glDataTypeFromAttributeDataType(QAttribute::DataType dataType)

int QGraphicsContext::id() const

bool QGraphicsContext::makeCurrent(QSurface * surface)

GLint QGraphicsContext::maxClipPlaneCount()

QOpenGLContext * QGraphicsContext::openGLContext()

See also setOpenGLContext().

void QGraphicsContext::releaseOpenGL()

void QGraphicsContext::setActiveMaterial(RenderMaterial * rmat)

See also activeMaterial().

void QGraphicsContext::setCurrentStateSet(RenderStateSet * ss)

See also currentStateSet().

void QGraphicsContext::setOpenGLContext(QOpenGLContext * ctx, QSurface * surface)

See also openGLContext().

void QGraphicsContext::setRenderer(Renderer * renderer)

void QGraphicsContext::setUniforms(QUniformPack & uniforms)

void QGraphicsContext::setVerticesPerPatch(GLint verticesPerPatch)

void QGraphicsContext::setViewport(const QRectF & viewport)

See also viewport().

void QGraphicsContext::specifyAttribute(const RenderAttribute * attribute, RenderBuffer * buffer, const QString & shaderName)

void QGraphicsContext::specifyIndices(RenderBuffer * buffer)

bool QGraphicsContext::supportsVAO() const

[static] GLint QGraphicsContext::tupleSizeFromType(GLint type)

void QGraphicsContext::updateBuffer(RenderBuffer * buffer)

QRectF QGraphicsContext::viewport() const

See also setViewport().

© 2016 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.