#include <kanzi/rendering/renderer.hpp>
Public Member Functions | |
Renderer (const KzcMemoryManager *memoryManager) | |
Creates a new renderer object. More... | |
~Renderer () | |
void | resetFrame () |
Resets frame for core renderer, that is, counters for logging rendering infos (triangle count etc.). More... | |
void | reset () |
Resets renderer, e.g. More... | |
void | initialize (kzUint vertexBufferPoolSize, kzUint indexBufferPoolSize) |
Initializes renderer object. More... | |
void | uninitialize () |
Uninitializes renderer object. More... | |
void | setActiveSurface (KzsSurface *surface) |
Sets active surface context for renderer. More... | |
KzsSurface * | getActiveSurface () const |
Gets active surface context from renderer. More... | |
void | enableState (State state) |
Enables a specific renderer state. More... | |
void | disableState (State state) |
Disables a specific renderer state. More... | |
void | setState (State state, bool enable) |
Enables or disables the state of a specific renderer state. More... | |
bool | getState (State state) const |
Returns state of a specific renderer state. More... | |
void | clear () |
Clears a context using specified flags. More... | |
void | resetClearTarget () |
Resets a clear target for renderer. More... | |
void | addClearTarget (GraphicsClearTarget target) |
Sets a clearing target for renderer. More... | |
void | removeClearTarget (GraphicsClearTarget target) |
Removes a clearing target for renderer. More... | |
bool | hasClearTarget (GraphicsClearTarget target) const |
Sees if renderer has specific clear target. More... | |
bool | isClearEnabled () const |
See if clear is enabled. More... | |
void | setClearColor (KzcColorRGBA colorRGBA) |
Set clear color for renderer. More... | |
void | setColorWriteMode (GraphicsColorWriteMode colorWriteMode) |
Set a color write mode for renderer. More... | |
GraphicsColorWriteMode | getColorWriteMode () const |
Gets current color write mode from renderer. More... | |
void | setScissorTest (bool enabled, int x, int y, int width, int height) |
Sets scissor test for renderer. More... | |
void | getScissorTest (int *out_x, int *out_y, int *out_width, int *out_height) const |
Gets scissor specific values from renderer. More... | |
void | setClearDepthValue (float clearDepthValue) |
Set clear depth for renderer. More... | |
void | setClearStencil (int stencilClearValue) |
Set clear stencil for renderer. More... | |
void | setViewport (int x, int y, int width, int height) |
Sets an active view port for renderer. More... | |
void | setVertexBuffer (unsigned int value) |
Sets a vertex buffer for renderer. More... | |
void | setIndexBuffer (unsigned int value) |
Sets an index buffer for renderer. More... | |
void | drawBuffers () |
Render buffers that are currently bound. More... | |
void | setVertexCount (unsigned int vertexCount) |
Sets vertex count for renderer. More... | |
void | setIndexCount (unsigned int indexCount) |
Sets the index count for renderer. More... | |
void | setIndexData (void *indexData) |
Sets index data for renderer. More... | |
void | setPrimitiveType (GraphicsPrimitiveType prmitiveType) |
Sets the primitive type for renderer. More... | |
int | getUniformLocationSlow (kzString uniformName) const |
Finds uniform location for given uniform from active shader. More... | |
unsigned int | getUniformArrayLength (kzString uniformName) const |
Returns array uniform length for given uniform. More... | |
void | setUniformInteger (int value, int uniformLocation) |
Sets integer uniform for renderer, using currently bound shader. More... | |
void | setUniformFloat (float value, int uniformLocation) |
Sets float uniform for renderer, using currently bound shader. More... | |
void | setUniformFloatArray (Shader::FixedUniform fixedUniform, unsigned int count, const float *value) |
Sets uniform float array for renderer. More... | |
void | setUniformFloatArray (int uniformLocation, unsigned int count, const float *value) |
Sets uniform float array for renderer. More... | |
void | setUniformVec2 (const KzcVector2 *value, int uniformLocation) |
Sets uniform vec2 for renderer, using currently bound shader. More... | |
void | setUniformVec3 (const KzcVector3 *value, int uniformLocation) |
Sets uniform vec3 for renderer, using currently bound shader. More... | |
void | setUniformVec3Array (int uniformLocation, unsigned int count, const KzcVector3 *value) |
Sets uniform vec3 array for renderer. More... | |
void | setUniformVec4 (const KzcVector4 *value, int uniformLocation) |
Sets uniform vec4 for renderer, using currently bound shader. More... | |
void | setUniformVecArray (Shader::FixedUniform fixedUniform, unsigned int count, unsigned int dimension, const float *values) |
Sets arbitrary vector array with dimension to renderer, using currently bound shader. More... | |
void | setUniformVecArray (int uniformLocation, unsigned int count, unsigned int dimension, const float *values) |
Sets arbitrary vector array with dimension to renderer, using currently bound shader. More... | |
void | setUniformColorRGBA (const KzcColorRGBA *value, int uniformLocation) |
Sets uniform colorRGBA for renderer, using currently bound shader. More... | |
void | setUniformVec4Array (int uniformLocation, unsigned int count, const KzcVector4 *value) |
Sets uniform vec4 array for renderer. More... | |
void | setUniformMatrix3x3 (const KzcMatrix3x3 *value, int uniformLocation) |
Sets matrix3x3 uniform for renderer, using currently bound shader. More... | |
void | setUniformMatrix4x4 (const KzcMatrix4x4 *value, int uniformLocation) |
Sets matrix4x4 uniform for renderer, using currently bound shader. More... | |
void | setActiveScalar (GraphicsScalar scalar, float value) |
Switches an scalar value for renderer if necessary, e.g. More... | |
float | getActiveScalar (GraphicsScalar scalar) const |
Returns a current scalar value from renderer. More... | |
void | setBlendMode (GraphicsBlendMode blendMode) |
Sets a blend mode for renderer. More... | |
GraphicsBlendMode | getBlendMode () const |
Gets a blend mode for renderer. More... | |
void | setCullMode (GraphicsCullMode cullMode) |
Sets a cull mode for renderer. More... | |
GraphicsCullMode | getCullMode () const |
Gets a cull mode for renderer. More... | |
void | setDepthTest (GraphicsCompareFunction depthMode) |
Sets a depth pass mode for renderer. More... | |
GraphicsCompareFunction | getDepthTest () const |
Gets a depth pass mode for renderer. More... | |
void | setStencilFunction (GraphicsCompareFunction stencilCompareFunction, unsigned int referenceValue, unsigned int maskValue) |
Sets a stencil function for renderer. More... | |
void | setStencilOperation (GraphicsStencilOperation stencilFailOperation, GraphicsStencilOperation stencilPassDepthFailOperation, GraphicsStencilOperation stencilPassDepthPassOperation) |
Sets a stencil operation for renderer. More... | |
void | getStencilFunction (GraphicsCompareFunction *out_stencilCompareFunction, unsigned int *out_referenceValue, unsigned int *out_maskValue) const |
Gets stencil function from renderer. More... | |
void | getStencilOperation (GraphicsStencilOperation *out_stencilFailOperation, GraphicsStencilOperation *out_stencilPassDepthFailOperation, GraphicsStencilOperation *out_stencilPassDepthPassOperation) const |
Gets a stencil operation from renderer. More... | |
void | setMatrix (FixedMatrix matrixType, const KzcMatrix4x4 *matrix) |
Sets matrix for a renderer. More... | |
KzcMatrix4x4 | getMatrix (FixedMatrix matrixType) const |
Gets a matrix from renderer. More... | |
void | calculateProjectionCameraWorldMatrix () |
Calculates projection * camera * world matrix. More... | |
void | applyTransformation () |
Applies transformations from renderer to GPU. More... | |
void | setActiveTextureUnit (unsigned int textureUnit) |
Sets texture unit active. More... | |
void | applyTextureSizeUniforms (int textureWidthUniformLocation, int textureHeightUniformLocation, unsigned int textureWidth, unsigned int textureHeight) |
Applies texture uniforms for the renderer. More... | |
void | applyTexture (int textureUniformLocation, unsigned int textureHandle, Texture::Target target) |
Applies texture for renderer using currently bound shader (required) and texture uniform (required). More... | |
void | setUniformTexture (int uniformLocation) |
Sets texture uniform location for renderer, effectively used for storing the integer in renderer to retrieve it when binding textures. More... | |
int | getUniformTexture () const |
Gets texture uniform location from renderer. More... | |
void | detachTextureHandle (unsigned int textureHandle) |
Detaches texture handle from all texture units it has been applied for. More... | |
void | detachTexture () |
Detaches texture from rendering. More... | |
void | invalidateTextureHandle (unsigned int textureHandle) |
Invalidates texture handle from renderer without affecting GL state. More... | |
void | bindTexture (Texture::Target target, unsigned int textureHandle) |
Binds texture for renderer. More... | |
unsigned int | generateTexture () |
Generates new texture for renderer. More... | |
void | setTextureImage2D (Texture::ImageTarget imageTarget, unsigned int mipmapLevel, GraphicsFormat format, unsigned int width, unsigned int height, const void *data) |
Uploads texture data to GPU. More... | |
void | setTextureSubImage2D (Texture::ImageTarget imageTarget, unsigned int mipmapLevel, GraphicsFormat format, unsigned int x, unsigned int y, unsigned int width, unsigned int height, const void *data) |
Uploads texture subimage data to GPU. More... | |
void | setCompressedTextureImage2D (Texture::ImageTarget target, unsigned int mipLevel, GraphicsFormat format, unsigned int width, unsigned int height, const void *data) |
Uploads compressed texture data to GPU. More... | |
void | generateMipmap (Texture::Target target) |
Generates mipmaps for currently bound texture. More... | |
void | deleteTexture (unsigned int textureHandle) |
Deletes texture via renderer. More... | |
void | setTextureAddressingMode (Texture::Target target, Sampler::AddressingMode texAddress) |
Sets wrap mode for currently bound texture in current texture unit. More... | |
void | setTextureFilter (Texture::Target target, Sampler::Filter minFilter, Sampler::Filter magFilter, Sampler::MipmapMode mipmapMode, float anisotropy) |
Sets texture filter for currently bound texture in current texture unit. More... | |
void | setPixelStorePack (unsigned int packBytes) |
Sets pack storage for renderer. More... | |
void | setPixelStoreUnpack (unsigned int unpackBytes) |
Sets unpack storage for renderer. More... | |
unsigned int | createShader (ShaderType type) |
Creates shader. More... | |
unsigned int | createShaderProgram () |
Creates shader program. More... | |
void | refreshRenderContext (bool geometryRendering) |
Refreshes render context to contain all proper states. More... | |
void | attachShaderToProgram (unsigned int programHandle, unsigned int shaderHandle) |
Attaches shader to program. More... | |
void | detachShaderFromProgram (unsigned int programHandle, unsigned int shaderHandle) |
Detaches shader from program. More... | |
void | bindAttributeToLocation (unsigned int programHandle, unsigned int locationIndex, kzString attributeName) |
Binds attribute to given location index, for example "kzPosition" to 0. More... | |
bool | linkShaderProgram (unsigned int programHandle, kzString shaderName) |
Links shader program with given handle. More... | |
bool | compileSourceShader (ShaderType shaderType, unsigned int shaderHandle, const char *const shaderCode, string_view shaderName) |
Compiles source shader and deploys it to GPU. More... | |
bool | deployBinaryShader (unsigned int count, const unsigned int *shaders, unsigned int binaryFormat, const void *data, unsigned int dataSize) |
Deploys binary shaders. More... | |
bool | deployBinaryProgram (unsigned int program, unsigned int binaryFormat, const void *data, unsigned int dataSize) |
Loads a program binary. More... | |
void | deleteShaderProgram (unsigned int programHandle) |
Deletes shader program and attached shaders. More... | |
void | deleteShader (unsigned int shaderHandle) |
Deletes shader. More... | |
int | getFixedUniformLocation (Shader::FixedUniform fixedUniform) const |
Returns fixed shader uniform location of given fixed uniform. More... | |
unsigned int | generateFramebuffer () |
Generates new texture for renderer. More... | |
void | deleteFramebuffer (unsigned int frameBufferHandle) |
Deletes framebuffer. More... | |
void | bindFramebuffer (unsigned int frameBufferHandle) |
Binds framebuffer. More... | |
bool | isFramebufferComplete () |
Checks if the framebuffer is complete. More... | |
void | framebufferCheckErrors () |
Check framebuffer completeness and log possible errors . More... | |
void | framebufferTexture2D (Texture::ImageTarget imageTarget, Surface::APIAttachment attachment, unsigned int textureHandle, unsigned int mipmapLevel) |
Attaches texture to frame buffer. More... | |
void | framebufferRenderbuffer (Surface::APIAttachment attachment, unsigned int renderBufferHandle) |
Attaches renderbuffer to framebuffer. More... | |
unsigned int | generateRenderbuffer () |
Generates new texture for renderer. More... | |
void | deleteRenderbuffer (unsigned int renderBufferHandle) |
Deletes framebuffer. More... | |
void | bindRenderbuffer (unsigned int renderBufferHandle) |
Binds framebuffer. More... | |
void | renderbufferStorage (GraphicsFormat format, unsigned int width, unsigned int height, unsigned int sampleCount) |
Sets storage for render buffer. More... | |
unsigned int | generateBuffer () |
Generates new index or vertex buffer or uniform buffer handle. More... | |
void | setVertexBufferData (unsigned int dataSize, const void *data) |
Sets static vertex buffer data. More... | |
void | setIndexBufferData (unsigned int dataSize, const void *data) |
Sets static index buffer data. More... | |
void | setVertexBufferSubData (unsigned int offset, unsigned int size, const void *data) |
Uploads vertex buffer subdata with given offset and size. More... | |
void | setIndexBufferSubData (unsigned int offset, unsigned int size, const void *data) |
Uploads index buffer subdata with given offset and size. More... | |
void | deleteBuffer (unsigned int handle) |
Deletes vertex or index buffer. More... | |
void | enableVertexAttributeArray (unsigned int attributeHandle) |
Sets vertex attribute array to be enabled. More... | |
void | disableVertexAttributeArray (unsigned int attributeHandle) |
Sets vertex attribute array to be disabled. More... | |
void | applyVertexAttributeArrays () |
Update vertex attribute configurations to the graphics driver. More... | |
void | setVertexBufferPointer (unsigned int attributeHandle, int dimension, GraphicsDataType attributeDataType, int stride, const void *pointer) |
Sets vertex buffer object pointer for currently enabled vertex attribute array. More... | |
void | setActiveShaderHandle (unsigned int activeShaderHandle, int const *fixedUniformMap, int const *vertexAttributeMap) |
Sets active shader for renderer. More... | |
unsigned int | getActiveShaderHandle () const |
Gets active shader handle from renderer. More... | |
const int * | getActiveShaderAttributeMap () const |
Gets active vertex attribute map from renderer. More... | |
const int * | getActiveFixedUniformMap () const |
Gets active fixed uniform map from renderer. More... | |
void | setDefaultFramebuffer (unsigned int frameBufferHandle) |
Specifies default frame buffer (screen) for renderer. More... | |
void | setActiveFramebuffer (unsigned int frameBufferHandle) |
Sets active frame buffer for renderer. More... | |
void | resetActiveFramebuffer () |
Resets active frame buffer for renderer to default (screen). More... | |
void | setActiveFramebufferCallback (FramebufferCallback callbackFunction) |
Sets callback function that is called after setActiveFramebuffer. More... | |
unsigned int | getActiveFramebuffer () const |
Gets active frame buffer handle from. More... | |
void | readPixels (int x, int y, int width, int height, GraphicsFormat format, void *pixels) |
Reads the pixels from the current frame buffer. More... | |
GraphicsFormat | getNativePixelReadFormat () |
Returns native pixel read format from renderer. More... | |
void | beginMaterialSetup () |
Begins a material for renderer. More... | |
void | endMaterialSetup () |
Ends a material for renderer. More... | |
void | beginVertexArray () |
Begins set of vertex arrays. More... | |
void | setVertexArrayData (VertexAttribute::Semantic attribute, const void *data) |
Sets vertex array data. More... | |
void | endVertexArray (GraphicsPrimitiveType primitiveType, unsigned int count) |
Ends vertex array. More... | |
unsigned int | getCurrentVertexArrayFlags () const |
Gets the current vertex array flags from renderer. More... | |
const void * | getCurrentVertexArrayAttributeData (VertexAttribute::Semantic attribute) const |
Gets current vertex array data from renderer. More... | |
void | setLineWidth (float lineWidth) |
Sets line rendering width for renderer. More... | |
void | getViewport (float *out_x, float *out_y, float *out_width, float *out_height) const |
Gets view port from renderer. More... | |
void | flush () const |
Flushes the GPU pipeline, forces all commands to be executed in finite time. More... | |
void | pushStatistics () |
void | popStatistics () |
unsigned int | getIndexCount () const |
Gets index count from renderer. More... | |
unsigned int | getTriangleCount () const |
Gets triangle count from renderer. More... | |
unsigned int | getVertexCount () const |
Gets vertex count from renderer. More... | |
unsigned int | getBatchCount () const |
Gets batch count from renderer (number of draw calls, such as drawElements and drawArrays). More... | |
unsigned int | getShaderSwitchCount () const |
Gets shader switches. More... | |
unsigned int | getUniformSendCount () const |
Gets uniform sending count from renderer. More... | |
unsigned int | getTextureSwitchCount () const |
Gets number of texture switches from renderer. More... | |
unsigned int | getFramebufferSwitchCount () const |
Gets number of framebuffer switches from renderer. More... | |
unsigned int | getBufferSwitchCount () const |
Gets number of buffer switches (VBO + IBO) from renderer. More... | |
unsigned int | getHeavyweightCallCount () const |
Returns potential heavyweight calls such as buffer or texture updates and glFinish from renderer. More... | |
bool | isShaderBinarySupported () const |
Is shader binary supported. More... | |
ProgramBinary | getProgramBinarySupport () const |
Return support for program binaries. More... | |
bool | isShaderBinaryFormatSupported (unsigned int glShaderBinaryFormat) const |
Checks if GL shader binary format is supported. More... | |
bool | isProgramBinaryFormatSupported (unsigned int glProgramBinaryFormat) const |
Checks if GL program binary format is supported. More... | |
void | setGPUCallsEnabled (bool enabled) |
Sets GPU calls enabled / disabled. More... | |
bool | GPUCallsIsEnabled () const |
Checks if GPU calls are enabled. More... | |
bool | isCoverageBufferSupported () const |
Is coverage buffer supported or not. More... | |
bool | isHalfFloatTextureFormatSupported () const |
Is half float texture format supported. More... | |
bool | isHalfFloatTextureFormatLinearSupported () const |
Is half float texture format with linear filtering supported . More... | |
bool | isHalfFloatColorAttachmentSupported () const |
Is half float color attachment supported. More... | |
bool | isHalfFloatVertexAttributeSupported () const |
Is half float vertex attribute supported. More... | |
bool | isExternalTextureSupported () const |
Returns if external texture extension is supported. More... | |
bool | isNativePixmapEnabled () const |
Returns if native pixmap texture extension is supported and enabled. More... | |
void | setNativePixmapEnabled (bool enabled) |
Sets whether native pixmap texture extension is enabled. More... | |
bool | isMapBufferRangeSupported () const |
Returns if map buffer range extension is supported. More... | |
void * | createImageObject (void *dataPointer, int target, int *attributes) |
Creates image object, returns KZ_NULL if no hardware support. More... | |
void | deleteImageObject (void *imageObject) |
Deletes image object created with createImageObject. More... | |
void | setImageTargetTexture (Texture::Target target, void *imageObject) |
Sets image object bound to currently bound texture (type). More... | |
float | getMaximumAnisotropy () const |
Gets maximum anisotropy. More... | |
unsigned int | getMaximumTextureSize (Texture::Target target) const |
Gets maximum texture side size. More... | |
unsigned int | getMaximumRenderbufferSize () const |
Gets maximum renderbuffer size. More... | |
unsigned int | getMaximumViewportWidth () const |
Gets maximum viewport width. More... | |
unsigned int | getMaximumViewportHeight () const |
Gets maximum viewport height. More... | |
int | getColorReadFormat () |
Returns GL constant for the color read format used in reading back data form framebuffer (RendererReadPixels). More... | |
int | getColorReadType () |
Returns GL constant for the color read type used in reading back data form framebuffer (RendererReadPixels). More... | |
void | invalidateAllocations () |
Invalidates all handles from renderer without affecting GL state. More... | |
::KzcGPUBufferManager * | getGPUBufferManager () const |
Gets GPU buffer manager from renderer. More... | |
void | logOpenGLInformation (unsigned int flags) const |
Logs information about renderer capabilities. More... | |
void | enableWorkaround (Workaround workaround) |
Enable a renderer workaround. More... | |
void | disableWorkaround (Workaround workaround) |
Disable a renderer workaround. More... | |
bool | isWorkaroundEnabled (Workaround workaround) const |
Return if workaround is enabled or not. More... | |
void | setWorkaroundEnable (Workaround workaround, bool enabled) |
Set workaround enable state to true or false. More... | |
void | clearUniformCaches () |
Free memory used by uniform caches. More... | |
Friends | |
KANZI_API GraphicsFormat | formatGetDepthStencilRenderbuffer (const Renderer *renderer, bool depth, bool stencil) |
Returns a depth/stencil renderbuffer format which is supported by renderer. More... | |
KANZI_API GraphicsFormat | formatGetDepthStencilTexture (const Renderer *renderer, bool depth, bool stencil) |
Returns a depth/stencil texture format which is supported by renderer. More... | |
KANZI_API unsigned int | formatGetSupportFlags (const Renderer *renderer, GraphicsFormat format) |
Describes what the specified format can be used for in the specified renderer. More... | |
KANZI_API void | formatGetGLFormatTriplet (const Renderer *renderer, GraphicsFormat format, GraphicsFormatUsageFlags, unsigned int *out_glFormat, unsigned int *out_glInternalFormat, unsigned int *out_glType) |
Returns GL API format, internal format, type triplet for given Format. More... | |
KANZI_API unsigned int | dataTypeGetGLAttributeType (const Renderer *renderer, GraphicsDataType dataType) |
Returns GL API attribute type for given DataType. More... | |
typedef void(* kanzi::Renderer::FramebufferCallback)(unsigned int frameBufferHandle) |
Callback prototype for setActiveFramebuffer.
Renderer state enumerations.
Enumerator | |
---|---|
StateDepthTest |
Renderer state for depth testing. |
StateCullFace |
Renderer state for cull face. |
StateBlend |
Renderer state for blending. |
StateDepthWrite |
Renderer state for depth write. |
StateStencilTest |
Renderer state for stencil test. |
StateStencilWrite |
Renderer state for stencil write. |
StateMultisample |
Renderer state for multi-sampling. |
StateScissorTest |
Renderer state for scissor test. |
StateCoverageWrite |
Renderer state for coverage write. |
StateCount |
Maximum count of renderer states. |
List of active matrices renderer keeps track of.
Enumerator | |
---|---|
FixedMatrixProjection |
Projection matrix. |
FixedMatrixCamera |
Camera matrix. |
FixedMatrixWorld |
Current world matrix. |
FixedMatrixCameraWorld |
Current camera x world matrix. |
FixedMatrixProjectionCameraWorld |
Current projection x camera x world matrix. |
FixedMatrixCount |
Maximum amount of matrices. |
kanzi::Renderer::Renderer | ( | const KzcMemoryManager * | memoryManager | ) |
Creates a new renderer object.
kanzi::Renderer::~Renderer | ( | ) |
void kanzi::Renderer::resetFrame | ( | ) |
Resets frame for core renderer, that is, counters for logging rendering infos (triangle count etc.).
void kanzi::Renderer::reset | ( | ) |
Resets renderer, e.g.
resets its caches and states and syncs renderer variables with actual GL states.
Initializes renderer object.
Requires graphics context.
void kanzi::Renderer::uninitialize | ( | ) |
Uninitializes renderer object.
void kanzi::Renderer::setActiveSurface | ( | KzsSurface * | surface | ) |
Sets active surface context for renderer.
KzsSurface* kanzi::Renderer::getActiveSurface | ( | ) | const |
Gets active surface context from renderer.
void kanzi::Renderer::enableState | ( | State | state | ) |
Enables a specific renderer state.
void kanzi::Renderer::disableState | ( | State | state | ) |
Disables a specific renderer state.
void kanzi::Renderer::setState | ( | State | state, |
bool | enable | ||
) |
Enables or disables the state of a specific renderer state.
bool kanzi::Renderer::getState | ( | State | state | ) | const |
Returns state of a specific renderer state.
void kanzi::Renderer::clear | ( | ) |
Clears a context using specified flags.
void kanzi::Renderer::resetClearTarget | ( | ) |
Resets a clear target for renderer.
void kanzi::Renderer::addClearTarget | ( | GraphicsClearTarget | target | ) |
Sets a clearing target for renderer.
void kanzi::Renderer::removeClearTarget | ( | GraphicsClearTarget | target | ) |
Removes a clearing target for renderer.
bool kanzi::Renderer::hasClearTarget | ( | GraphicsClearTarget | target | ) | const |
Sees if renderer has specific clear target.
bool kanzi::Renderer::isClearEnabled | ( | ) | const |
See if clear is enabled.
void kanzi::Renderer::setClearColor | ( | KzcColorRGBA | colorRGBA | ) |
Set clear color for renderer.
void kanzi::Renderer::setColorWriteMode | ( | GraphicsColorWriteMode | colorWriteMode | ) |
Set a color write mode for renderer.
GraphicsColorWriteMode kanzi::Renderer::getColorWriteMode | ( | ) | const |
Gets current color write mode from renderer.
void kanzi::Renderer::setScissorTest | ( | bool | enabled, |
int | x, | ||
int | y, | ||
int | width, | ||
int | height | ||
) |
Sets scissor test for renderer.
void kanzi::Renderer::getScissorTest | ( | int * | out_x, |
int * | out_y, | ||
int * | out_width, | ||
int * | out_height | ||
) | const |
Gets scissor specific values from renderer.
KZ_NULL if not requiring some specific value.
void kanzi::Renderer::setClearDepthValue | ( | float | clearDepthValue | ) |
Set clear depth for renderer.
void kanzi::Renderer::setClearStencil | ( | int | stencilClearValue | ) |
Set clear stencil for renderer.
void kanzi::Renderer::setViewport | ( | int | x, |
int | y, | ||
int | width, | ||
int | height | ||
) |
Sets an active view port for renderer.
void kanzi::Renderer::setVertexBuffer | ( | unsigned int | value | ) |
Sets a vertex buffer for renderer.
void kanzi::Renderer::setIndexBuffer | ( | unsigned int | value | ) |
Sets an index buffer for renderer.
void kanzi::Renderer::drawBuffers | ( | ) |
Render buffers that are currently bound.
void kanzi::Renderer::setVertexCount | ( | unsigned int | vertexCount | ) |
Sets vertex count for renderer.
void kanzi::Renderer::setIndexCount | ( | unsigned int | indexCount | ) |
Sets the index count for renderer.
void kanzi::Renderer::setIndexData | ( | void * | indexData | ) |
Sets index data for renderer.
void kanzi::Renderer::setPrimitiveType | ( | GraphicsPrimitiveType | prmitiveType | ) |
Sets the primitive type for renderer.
int kanzi::Renderer::getUniformLocationSlow | ( | kzString | uniformName | ) | const |
Finds uniform location for given uniform from active shader.
The data will be stored to uniform cache and fetched from in subsequent calls.
unsigned int kanzi::Renderer::getUniformArrayLength | ( | kzString | uniformName | ) | const |
Returns array uniform length for given uniform.
If uniform with given name is not found, returns 0. If uniform is not an array, returns 1.
void kanzi::Renderer::setUniformInteger | ( | int | value, |
int | uniformLocation | ||
) |
Sets integer uniform for renderer, using currently bound shader.
void kanzi::Renderer::setUniformFloat | ( | float | value, |
int | uniformLocation | ||
) |
Sets float uniform for renderer, using currently bound shader.
void kanzi::Renderer::setUniformFloatArray | ( | Shader::FixedUniform | fixedUniform, |
unsigned int | count, | ||
const float * | value | ||
) |
Sets uniform float array for renderer.
void kanzi::Renderer::setUniformFloatArray | ( | int | uniformLocation, |
unsigned int | count, | ||
const float * | value | ||
) |
Sets uniform float array for renderer.
void kanzi::Renderer::setUniformVec2 | ( | const KzcVector2 * | value, |
int | uniformLocation | ||
) |
Sets uniform vec2 for renderer, using currently bound shader.
void kanzi::Renderer::setUniformVec3 | ( | const KzcVector3 * | value, |
int | uniformLocation | ||
) |
Sets uniform vec3 for renderer, using currently bound shader.
void kanzi::Renderer::setUniformVec3Array | ( | int | uniformLocation, |
unsigned int | count, | ||
const KzcVector3 * | value | ||
) |
Sets uniform vec3 array for renderer.
void kanzi::Renderer::setUniformVec4 | ( | const KzcVector4 * | value, |
int | uniformLocation | ||
) |
Sets uniform vec4 for renderer, using currently bound shader.
void kanzi::Renderer::setUniformVecArray | ( | Shader::FixedUniform | fixedUniform, |
unsigned int | count, | ||
unsigned int | dimension, | ||
const float * | values | ||
) |
Sets arbitrary vector array with dimension to renderer, using currently bound shader.
void kanzi::Renderer::setUniformVecArray | ( | int | uniformLocation, |
unsigned int | count, | ||
unsigned int | dimension, | ||
const float * | values | ||
) |
Sets arbitrary vector array with dimension to renderer, using currently bound shader.
void kanzi::Renderer::setUniformColorRGBA | ( | const KzcColorRGBA * | value, |
int | uniformLocation | ||
) |
Sets uniform colorRGBA for renderer, using currently bound shader.
void kanzi::Renderer::setUniformVec4Array | ( | int | uniformLocation, |
unsigned int | count, | ||
const KzcVector4 * | value | ||
) |
Sets uniform vec4 array for renderer.
void kanzi::Renderer::setUniformMatrix3x3 | ( | const KzcMatrix3x3 * | value, |
int | uniformLocation | ||
) |
Sets matrix3x3 uniform for renderer, using currently bound shader.
void kanzi::Renderer::setUniformMatrix4x4 | ( | const KzcMatrix4x4 * | value, |
int | uniformLocation | ||
) |
Sets matrix4x4 uniform for renderer, using currently bound shader.
void kanzi::Renderer::setActiveScalar | ( | GraphicsScalar | scalar, |
float | value | ||
) |
Switches an scalar value for renderer if necessary, e.g.
depth clear value.
float kanzi::Renderer::getActiveScalar | ( | GraphicsScalar | scalar | ) | const |
Returns a current scalar value from renderer.
void kanzi::Renderer::setBlendMode | ( | GraphicsBlendMode | blendMode | ) |
Sets a blend mode for renderer.
GraphicsBlendMode kanzi::Renderer::getBlendMode | ( | ) | const |
Gets a blend mode for renderer.
void kanzi::Renderer::setCullMode | ( | GraphicsCullMode | cullMode | ) |
Sets a cull mode for renderer.
GraphicsCullMode kanzi::Renderer::getCullMode | ( | ) | const |
Gets a cull mode for renderer.
void kanzi::Renderer::setDepthTest | ( | GraphicsCompareFunction | depthMode | ) |
Sets a depth pass mode for renderer.
GraphicsCompareFunction kanzi::Renderer::getDepthTest | ( | ) | const |
Gets a depth pass mode for renderer.
void kanzi::Renderer::setStencilFunction | ( | GraphicsCompareFunction | stencilCompareFunction, |
unsigned int | referenceValue, | ||
unsigned int | maskValue | ||
) |
Sets a stencil function for renderer.
void kanzi::Renderer::setStencilOperation | ( | GraphicsStencilOperation | stencilFailOperation, |
GraphicsStencilOperation | stencilPassDepthFailOperation, | ||
GraphicsStencilOperation | stencilPassDepthPassOperation | ||
) |
Sets a stencil operation for renderer.
void kanzi::Renderer::getStencilFunction | ( | GraphicsCompareFunction * | out_stencilCompareFunction, |
unsigned int * | out_referenceValue, | ||
unsigned int * | out_maskValue | ||
) | const |
Gets stencil function from renderer.
void kanzi::Renderer::getStencilOperation | ( | GraphicsStencilOperation * | out_stencilFailOperation, |
GraphicsStencilOperation * | out_stencilPassDepthFailOperation, | ||
GraphicsStencilOperation * | out_stencilPassDepthPassOperation | ||
) | const |
Gets a stencil operation from renderer.
void kanzi::Renderer::setMatrix | ( | FixedMatrix | matrixType, |
const KzcMatrix4x4 * | matrix | ||
) |
Sets matrix for a renderer.
KzcMatrix4x4 kanzi::Renderer::getMatrix | ( | FixedMatrix | matrixType | ) | const |
Gets a matrix from renderer.
void kanzi::Renderer::calculateProjectionCameraWorldMatrix | ( | ) |
Calculates projection * camera * world matrix.
void kanzi::Renderer::applyTransformation | ( | ) |
Applies transformations from renderer to GPU.
void kanzi::Renderer::setActiveTextureUnit | ( | unsigned int | textureUnit | ) |
Sets texture unit active.
void kanzi::Renderer::applyTextureSizeUniforms | ( | int | textureWidthUniformLocation, |
int | textureHeightUniformLocation, | ||
unsigned int | textureWidth, | ||
unsigned int | textureHeight | ||
) |
Applies texture uniforms for the renderer.
void kanzi::Renderer::applyTexture | ( | int | textureUniformLocation, |
unsigned int | textureHandle, | ||
Texture::Target | target | ||
) |
Applies texture for renderer using currently bound shader (required) and texture uniform (required).
void kanzi::Renderer::setUniformTexture | ( | int | uniformLocation | ) |
Sets texture uniform location for renderer, effectively used for storing the integer in renderer to retrieve it when binding textures.
int kanzi::Renderer::getUniformTexture | ( | ) | const |
Gets texture uniform location from renderer.
void kanzi::Renderer::detachTextureHandle | ( | unsigned int | textureHandle | ) |
Detaches texture handle from all texture units it has been applied for.
void kanzi::Renderer::detachTexture | ( | ) |
Detaches texture from rendering.
void kanzi::Renderer::invalidateTextureHandle | ( | unsigned int | textureHandle | ) |
Invalidates texture handle from renderer without affecting GL state.
void kanzi::Renderer::bindTexture | ( | Texture::Target | target, |
unsigned int | textureHandle | ||
) |
Binds texture for renderer.
unsigned int kanzi::Renderer::generateTexture | ( | ) |
Generates new texture for renderer.
void kanzi::Renderer::setTextureImage2D | ( | Texture::ImageTarget | imageTarget, |
unsigned int | mipmapLevel, | ||
GraphicsFormat | format, | ||
unsigned int | width, | ||
unsigned int | height, | ||
const void * | data | ||
) |
Uploads texture data to GPU.
void kanzi::Renderer::setTextureSubImage2D | ( | Texture::ImageTarget | imageTarget, |
unsigned int | mipmapLevel, | ||
GraphicsFormat | format, | ||
unsigned int | x, | ||
unsigned int | y, | ||
unsigned int | width, | ||
unsigned int | height, | ||
const void * | data | ||
) |
Uploads texture subimage data to GPU.
void kanzi::Renderer::setCompressedTextureImage2D | ( | Texture::ImageTarget | target, |
unsigned int | mipLevel, | ||
GraphicsFormat | format, | ||
unsigned int | width, | ||
unsigned int | height, | ||
const void * | data | ||
) |
Uploads compressed texture data to GPU.
void kanzi::Renderer::generateMipmap | ( | Texture::Target | target | ) |
Generates mipmaps for currently bound texture.
void kanzi::Renderer::deleteTexture | ( | unsigned int | textureHandle | ) |
Deletes texture via renderer.
void kanzi::Renderer::setTextureAddressingMode | ( | Texture::Target | target, |
Sampler::AddressingMode | texAddress | ||
) |
Sets wrap mode for currently bound texture in current texture unit.
void kanzi::Renderer::setTextureFilter | ( | Texture::Target | target, |
Sampler::Filter | minFilter, | ||
Sampler::Filter | magFilter, | ||
Sampler::MipmapMode | mipmapMode, | ||
float | anisotropy | ||
) |
Sets texture filter for currently bound texture in current texture unit.
anisotropy | Set anisotropic filtering level of texture. Values <= 1.0f disable the feature. |
void kanzi::Renderer::setPixelStorePack | ( | unsigned int | packBytes | ) |
Sets pack storage for renderer.
Specifies how the pixel data is aligned.
void kanzi::Renderer::setPixelStoreUnpack | ( | unsigned int | unpackBytes | ) |
Sets unpack storage for renderer.
Specifies how the pixel data is aligned.
unsigned int kanzi::Renderer::createShader | ( | ShaderType | type | ) |
Creates shader.
unsigned int kanzi::Renderer::createShaderProgram | ( | ) |
Creates shader program.
Returns the handle to the program.
void kanzi::Renderer::refreshRenderContext | ( | bool | geometryRendering | ) |
Refreshes render context to contain all proper states.
void kanzi::Renderer::attachShaderToProgram | ( | unsigned int | programHandle, |
unsigned int | shaderHandle | ||
) |
Attaches shader to program.
void kanzi::Renderer::detachShaderFromProgram | ( | unsigned int | programHandle, |
unsigned int | shaderHandle | ||
) |
Detaches shader from program.
void kanzi::Renderer::bindAttributeToLocation | ( | unsigned int | programHandle, |
unsigned int | locationIndex, | ||
kzString | attributeName | ||
) |
Binds attribute to given location index, for example "kzPosition" to 0.
bool kanzi::Renderer::linkShaderProgram | ( | unsigned int | programHandle, |
kzString | shaderName | ||
) |
Links shader program with given handle.
bool kanzi::Renderer::compileSourceShader | ( | ShaderType | shaderType, |
unsigned int | shaderHandle, | ||
const char *const | shaderCode, | ||
string_view | shaderName | ||
) |
Compiles source shader and deploys it to GPU.
bool kanzi::Renderer::deployBinaryShader | ( | unsigned int | count, |
const unsigned int * | shaders, | ||
unsigned int | binaryFormat, | ||
const void * | data, | ||
unsigned int | dataSize | ||
) |
Deploys binary shaders.
bool kanzi::Renderer::deployBinaryProgram | ( | unsigned int | program, |
unsigned int | binaryFormat, | ||
const void * | data, | ||
unsigned int | dataSize | ||
) |
Loads a program binary.
Uses a different OpenGL extension depending on the platform.
void kanzi::Renderer::deleteShaderProgram | ( | unsigned int | programHandle | ) |
Deletes shader program and attached shaders.
void kanzi::Renderer::deleteShader | ( | unsigned int | shaderHandle | ) |
Deletes shader.
int kanzi::Renderer::getFixedUniformLocation | ( | Shader::FixedUniform | fixedUniform | ) | const |
Returns fixed shader uniform location of given fixed uniform.
unsigned int kanzi::Renderer::generateFramebuffer | ( | ) |
Generates new texture for renderer.
void kanzi::Renderer::deleteFramebuffer | ( | unsigned int | frameBufferHandle | ) |
Deletes framebuffer.
void kanzi::Renderer::bindFramebuffer | ( | unsigned int | frameBufferHandle | ) |
Binds framebuffer.
bool kanzi::Renderer::isFramebufferComplete | ( | ) |
Checks if the framebuffer is complete.
void kanzi::Renderer::framebufferCheckErrors | ( | ) |
Check framebuffer completeness and log possible errors .
void kanzi::Renderer::framebufferTexture2D | ( | Texture::ImageTarget | imageTarget, |
Surface::APIAttachment | attachment, | ||
unsigned int | textureHandle, | ||
unsigned int | mipmapLevel | ||
) |
Attaches texture to frame buffer.
void kanzi::Renderer::framebufferRenderbuffer | ( | Surface::APIAttachment | attachment, |
unsigned int | renderBufferHandle | ||
) |
Attaches renderbuffer to framebuffer.
unsigned int kanzi::Renderer::generateRenderbuffer | ( | ) |
Generates new texture for renderer.
void kanzi::Renderer::deleteRenderbuffer | ( | unsigned int | renderBufferHandle | ) |
Deletes framebuffer.
void kanzi::Renderer::bindRenderbuffer | ( | unsigned int | renderBufferHandle | ) |
Binds framebuffer.
void kanzi::Renderer::renderbufferStorage | ( | GraphicsFormat | format, |
unsigned int | width, | ||
unsigned int | height, | ||
unsigned int | sampleCount | ||
) |
Sets storage for render buffer.
unsigned int kanzi::Renderer::generateBuffer | ( | ) |
Generates new index or vertex buffer or uniform buffer handle.
void kanzi::Renderer::setVertexBufferData | ( | unsigned int | dataSize, |
const void * | data | ||
) |
Sets static vertex buffer data.
void kanzi::Renderer::setIndexBufferData | ( | unsigned int | dataSize, |
const void * | data | ||
) |
Sets static index buffer data.
void kanzi::Renderer::setVertexBufferSubData | ( | unsigned int | offset, |
unsigned int | size, | ||
const void * | data | ||
) |
Uploads vertex buffer subdata with given offset and size.
void kanzi::Renderer::setIndexBufferSubData | ( | unsigned int | offset, |
unsigned int | size, | ||
const void * | data | ||
) |
Uploads index buffer subdata with given offset and size.
void kanzi::Renderer::deleteBuffer | ( | unsigned int | handle | ) |
Deletes vertex or index buffer.
void kanzi::Renderer::enableVertexAttributeArray | ( | unsigned int | attributeHandle | ) |
Sets vertex attribute array to be enabled.
attributeHandle | index to attribute to enable |
void kanzi::Renderer::disableVertexAttributeArray | ( | unsigned int | attributeHandle | ) |
Sets vertex attribute array to be disabled.
attributeHandle | index to attribute to disable |
void kanzi::Renderer::applyVertexAttributeArrays | ( | ) |
Update vertex attribute configurations to the graphics driver.
This should be called before each draw call if vertex attribute configuration has been changed with any of enableVertexAttributeArray(), disableVertexAttributeArray() or setVertexBufferPointer().
void kanzi::Renderer::setVertexBufferPointer | ( | unsigned int | attributeHandle, |
int | dimension, | ||
GraphicsDataType | attributeDataType, | ||
int | stride, | ||
const void * | pointer | ||
) |
Sets vertex buffer object pointer for currently enabled vertex attribute array.
void kanzi::Renderer::setActiveShaderHandle | ( | unsigned int | activeShaderHandle, |
int const * | fixedUniformMap, | ||
int const * | vertexAttributeMap | ||
) |
Sets active shader for renderer.
unsigned int kanzi::Renderer::getActiveShaderHandle | ( | ) | const |
Gets active shader handle from renderer.
const int* kanzi::Renderer::getActiveShaderAttributeMap | ( | ) | const |
Gets active vertex attribute map from renderer.
const int* kanzi::Renderer::getActiveFixedUniformMap | ( | ) | const |
Gets active fixed uniform map from renderer.
void kanzi::Renderer::setDefaultFramebuffer | ( | unsigned int | frameBufferHandle | ) |
Specifies default frame buffer (screen) for renderer.
void kanzi::Renderer::setActiveFramebuffer | ( | unsigned int | frameBufferHandle | ) |
Sets active frame buffer for renderer.
void kanzi::Renderer::resetActiveFramebuffer | ( | ) |
Resets active frame buffer for renderer to default (screen).
void kanzi::Renderer::setActiveFramebufferCallback | ( | FramebufferCallback | callbackFunction | ) |
Sets callback function that is called after setActiveFramebuffer.
unsigned int kanzi::Renderer::getActiveFramebuffer | ( | ) | const |
Gets active frame buffer handle from.
void kanzi::Renderer::readPixels | ( | int | x, |
int | y, | ||
int | width, | ||
int | height, | ||
GraphicsFormat | format, | ||
void * | pixels | ||
) |
Reads the pixels from the current frame buffer.
GraphicsFormat kanzi::Renderer::getNativePixelReadFormat | ( | ) |
Returns native pixel read format from renderer.
void kanzi::Renderer::beginMaterialSetup | ( | ) |
Begins a material for renderer.
void kanzi::Renderer::endMaterialSetup | ( | ) |
Ends a material for renderer.
void kanzi::Renderer::beginVertexArray | ( | ) |
Begins set of vertex arrays.
void kanzi::Renderer::setVertexArrayData | ( | VertexAttribute::Semantic | attribute, |
const void * | data | ||
) |
Sets vertex array data.
void kanzi::Renderer::endVertexArray | ( | GraphicsPrimitiveType | primitiveType, |
unsigned int | count | ||
) |
Ends vertex array.
Renders the specified vertex lists and finishes the usage.
unsigned int kanzi::Renderer::getCurrentVertexArrayFlags | ( | ) | const |
Gets the current vertex array flags from renderer.
const void* kanzi::Renderer::getCurrentVertexArrayAttributeData | ( | VertexAttribute::Semantic | attribute | ) | const |
Gets current vertex array data from renderer.
Reset when switching the shader.
void kanzi::Renderer::setLineWidth | ( | float | lineWidth | ) |
Sets line rendering width for renderer.
void kanzi::Renderer::getViewport | ( | float * | out_x, |
float * | out_y, | ||
float * | out_width, | ||
float * | out_height | ||
) | const |
Gets view port from renderer.
If out_x, out_y, out_width or out_height are specified as KZ_NULL, they're not used.
void kanzi::Renderer::flush | ( | ) | const |
Flushes the GPU pipeline, forces all commands to be executed in finite time.
void kanzi::Renderer::pushStatistics | ( | ) |
void kanzi::Renderer::popStatistics | ( | ) |
unsigned int kanzi::Renderer::getIndexCount | ( | ) | const |
Gets index count from renderer.
unsigned int kanzi::Renderer::getTriangleCount | ( | ) | const |
Gets triangle count from renderer.
unsigned int kanzi::Renderer::getVertexCount | ( | ) | const |
Gets vertex count from renderer.
unsigned int kanzi::Renderer::getBatchCount | ( | ) | const |
Gets batch count from renderer (number of draw calls, such as drawElements and drawArrays).
unsigned int kanzi::Renderer::getShaderSwitchCount | ( | ) | const |
Gets shader switches.
unsigned int kanzi::Renderer::getUniformSendCount | ( | ) | const |
Gets uniform sending count from renderer.
unsigned int kanzi::Renderer::getTextureSwitchCount | ( | ) | const |
Gets number of texture switches from renderer.
unsigned int kanzi::Renderer::getFramebufferSwitchCount | ( | ) | const |
Gets number of framebuffer switches from renderer.
unsigned int kanzi::Renderer::getBufferSwitchCount | ( | ) | const |
Gets number of buffer switches (VBO + IBO) from renderer.
unsigned int kanzi::Renderer::getHeavyweightCallCount | ( | ) | const |
Returns potential heavyweight calls such as buffer or texture updates and glFinish from renderer.
Potential due to GPU implementation may decide when heavyweight occurs (e.g. reading cannot be performed before write operation finishes).
bool kanzi::Renderer::isShaderBinarySupported | ( | ) | const |
Is shader binary supported.
ProgramBinary kanzi::Renderer::getProgramBinarySupport | ( | ) | const |
Return support for program binaries.
bool kanzi::Renderer::isShaderBinaryFormatSupported | ( | unsigned int | glShaderBinaryFormat | ) | const |
Checks if GL shader binary format is supported.
glShaderBinaryFormat | GL shader binary format to check |
bool kanzi::Renderer::isProgramBinaryFormatSupported | ( | unsigned int | glProgramBinaryFormat | ) | const |
Checks if GL program binary format is supported.
glProgramBinaryFormat | GL program binary format to check |
void kanzi::Renderer::setGPUCallsEnabled | ( | bool | enabled | ) |
Sets GPU calls enabled / disabled.
bool kanzi::Renderer::GPUCallsIsEnabled | ( | ) | const |
Checks if GPU calls are enabled.
bool kanzi::Renderer::isCoverageBufferSupported | ( | ) | const |
Is coverage buffer supported or not.
bool kanzi::Renderer::isHalfFloatTextureFormatSupported | ( | ) | const |
Is half float texture format supported.
bool kanzi::Renderer::isHalfFloatTextureFormatLinearSupported | ( | ) | const |
Is half float texture format with linear filtering supported .
bool kanzi::Renderer::isHalfFloatColorAttachmentSupported | ( | ) | const |
Is half float color attachment supported.
bool kanzi::Renderer::isHalfFloatVertexAttributeSupported | ( | ) | const |
Is half float vertex attribute supported.
bool kanzi::Renderer::isExternalTextureSupported | ( | ) | const |
Returns if external texture extension is supported.
bool kanzi::Renderer::isNativePixmapEnabled | ( | ) | const |
Returns if native pixmap texture extension is supported and enabled.
void kanzi::Renderer::setNativePixmapEnabled | ( | bool | enabled | ) |
Sets whether native pixmap texture extension is enabled.
The extension needs to also be supported to be considered enabled.
bool kanzi::Renderer::isMapBufferRangeSupported | ( | ) | const |
Returns if map buffer range extension is supported.
void* kanzi::Renderer::createImageObject | ( | void * | dataPointer, |
int | target, | ||
int * | attributes | ||
) |
Creates image object, returns KZ_NULL if no hardware support.
Image object can be bound as texture input. Requires surface to be set for renderer via setSurface, otherwise throws an error.
void kanzi::Renderer::deleteImageObject | ( | void * | imageObject | ) |
Deletes image object created with createImageObject.
void kanzi::Renderer::setImageTargetTexture | ( | Texture::Target | target, |
void * | imageObject | ||
) |
Sets image object bound to currently bound texture (type).
float kanzi::Renderer::getMaximumAnisotropy | ( | ) | const |
Gets maximum anisotropy.
unsigned int kanzi::Renderer::getMaximumTextureSize | ( | Texture::Target | target | ) | const |
Gets maximum texture side size.
unsigned int kanzi::Renderer::getMaximumRenderbufferSize | ( | ) | const |
Gets maximum renderbuffer size.
unsigned int kanzi::Renderer::getMaximumViewportWidth | ( | ) | const |
Gets maximum viewport width.
unsigned int kanzi::Renderer::getMaximumViewportHeight | ( | ) | const |
Gets maximum viewport height.
int kanzi::Renderer::getColorReadFormat | ( | ) |
Returns GL constant for the color read format used in reading back data form framebuffer (RendererReadPixels).
int kanzi::Renderer::getColorReadType | ( | ) |
Returns GL constant for the color read type used in reading back data form framebuffer (RendererReadPixels).
void kanzi::Renderer::invalidateAllocations | ( | ) |
Invalidates all handles from renderer without affecting GL state.
::KzcGPUBufferManager* kanzi::Renderer::getGPUBufferManager | ( | ) | const |
Gets GPU buffer manager from renderer.
void kanzi::Renderer::logOpenGLInformation | ( | unsigned int | flags | ) | const |
Logs information about renderer capabilities.
|
inline |
Enable a renderer workaround.
|
inline |
Disable a renderer workaround.
|
inline |
Return if workaround is enabled or not.
|
inline |
Set workaround enable state to true or false.
void kanzi::Renderer::clearUniformCaches | ( | ) |
Free memory used by uniform caches.
|
friend |
Returns a depth/stencil renderbuffer format which is supported by renderer.
|
friend |
Returns a depth/stencil texture format which is supported by renderer.
|
friend |
Describes what the specified format can be used for in the specified renderer.
|
friend |
Returns GL API format, internal format, type triplet for given Format.
|
friend |
Returns GL API attribute type for given DataType.
array<bool, GraphicsFormatCount> kanzi::Renderer::textureFormat |
Texture compression.
bool kanzi::Renderer::halfFloatVertexAttribute |
Half float vertex attribute.
bool kanzi::Renderer::halfFloatTextureFormat |
Half float texture format.
bool kanzi::Renderer::halfFloatTextureFormatLinear |
Half float texture format with linear filtering.
bool kanzi::Renderer::halfFloatColorAttachment |
Half float color attachment.
bool kanzi::Renderer::coverageBuffer |
Coverage buffer.
bool kanzi::Renderer::uniformBuffer |
Uniform buffer.
bool kanzi::Renderer::depth16Renderbuffer |
bool kanzi::Renderer::depth16Texture |
bool kanzi::Renderer::depth24Renderbuffer |
bool kanzi::Renderer::depth24Texture |
bool kanzi::Renderer::depth24Stencil8Renderbuffer |
bool kanzi::Renderer::depth24Stencil8Texture |
bool kanzi::Renderer::depth32Renderbuffer |
bool kanzi::Renderer::depth32fRenderbuffer |
bool kanzi::Renderer::depth32fTexture |
bool kanzi::Renderer::stencil8Renderbuffer |
bool kanzi::Renderer::stencil8Texture |
bool kanzi::Renderer::externalTexture |
External texture.
bool kanzi::Renderer::nativePixmap |
EGL native pixmaps.
bool kanzi::Renderer::mapBufferRange |
Map buffer range.
bool kanzi::Renderer::texStorage |
Texture storage (immutable textures)
bool kanzi::Renderer::textureFilterAnisotropic |
Anisotropic texture filtering.
bool kanzi::Renderer::rgb8Renderbuffer |
bool kanzi::Renderer::rgb8Texture |
bool kanzi::Renderer::rgba8Renderbuffer |
bool kanzi::Renderer::rgba8Texture |
bool kanzi::Renderer::discardFramebuffer |
bool kanzi::Renderer::shaderBinary |
ProgramBinary kanzi::Renderer::programBinary |
vector<unsigned int> kanzi::Renderer::shaderBinaryFormats |
vector<unsigned int> kanzi::Renderer::programBinaryFormats |
vector<string> kanzi::Renderer::extensions |