All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
format.hpp File Reference

Core renderer. More...

Namespaces

 kanzi
 

Enumerations

enum  kanzi::GraphicsFormatUsageFlags { kanzi::GraphicsFormatUsageColorAttachment, kanzi::GraphicsFormatUsageDepthStencilAttachment, kanzi::GraphicsFormatUsageTexture }
 
enum  kanzi::GraphicsDataType {
  kanzi::GraphicsDataTypeNone, kanzi::GraphicsDataTypeUNORM8, kanzi::GraphicsDataTypeSNORM8, kanzi::GraphicsDataTypeUNORM16,
  kanzi::GraphicsDataTypeSNORM16, kanzi::GraphicsDataTypeUNORM5_UNORM6_UNORM5, kanzi::GraphicsDataTypeCOMPRESSED, kanzi::GraphicsDataTypeUINT8,
  kanzi::GraphicsDataTypeSINT8, kanzi::GraphicsDataTypeUINT16, kanzi::GraphicsDataTypeSINT16, kanzi::GraphicsDataTypeUINT32,
  kanzi::GraphicsDataTypeSINT32, kanzi::GraphicsDataTypeSFLOAT16, kanzi::GraphicsDataTypeSFLOAT32, kanzi::GraphicsDataTypeUNORM24,
  kanzi::GraphicsDataTypeUNORM24_UINT8
}
 
enum  kanzi::GraphicsFormat {
  kanzi::GraphicsFormatNone, kanzi::GraphicsFormatLUMINANCE8_UNORM, kanzi::GraphicsFormatALPHA8_UNORM, kanzi::GraphicsFormatLUMINANCE8_ALPHA8_UNORM,
  kanzi::GraphicsFormatR8G8B8_UNORM, kanzi::GraphicsFormatR8G8B8A8_UNORM, kanzi::GraphicsFormatR5G6B5_UNORM, kanzi::GraphicsFormatETC1_R8G8B8_UNORM,
  kanzi::GraphicsFormatETC2_R8G8B8_UNORM, kanzi::GraphicsFormatETC2_R8G8B8A1_UNORM, kanzi::GraphicsFormatETC2_R8G8B8A8_UNORM, kanzi::GraphicsFormatBC2_UNORM,
  kanzi::GraphicsFormatBC3_UNORM, kanzi::GraphicsFormatPVRTC1_RGB_2BPP, kanzi::GraphicsFormatPVRTC1_RGB_4BPP, kanzi::GraphicsFormatPVRTC1_RGBA_2BPP,
  kanzi::GraphicsFormatPVRTC1_RGBA_4BPP, kanzi::GraphicsFormatPVRTC2_RGBA_2BPP, kanzi::GraphicsFormatPVRTC2_RGBA_4BPP, kanzi::GraphicsFormatATC_RGB,
  kanzi::GraphicsFormatATC_RGBA_EXPLICIT_ALPHA, kanzi::GraphicsFormatATC_RGBA_INTERPOLATED_ALPHA, kanzi::GraphicsFormatR16G16B16_SFLOAT, kanzi::GraphicsFormatR16G16B16A16_SFLOAT,
  kanzi::GraphicsFormatD16_UNORM, kanzi::GraphicsFormatD24_UNORM, kanzi::GraphicsFormatD32_SFLOAT, kanzi::GraphicsFormatD24_UNORM_S8_UINT,
  kanzi::GraphicsFormatS8_UINT, kanzi::GraphicsFormatCount, kanzi::GraphicsFormatRangeBegin, kanzi::GraphicsFormatRangeEnd
}
 

Functions

KANZI_API unsigned int kanzi::formatGetBytesPerBlock (GraphicsFormat format)
 Returns number of bytes per block of the specified format. More...
 
KANZI_API unsigned int kanzi::formatGetChannelCount (GraphicsFormat format)
 Returns number of channels in the specified format. More...
 
KANZI_API unsigned int kanzi::formatGetSupportFlags (const Renderer *renderer, GraphicsFormat format)
 Describes what the specified format can be used for in the specified renderer. More...
 
KANZI_API bool kanzi::formatSupportsTexture (const Renderer *renderer, GraphicsFormat format)
 Returns whether format can be used as texture by the specified renderer. More...
 
KANZI_API bool kanzi::formatSupportsColorAttachment (const Renderer *renderer, GraphicsFormat format)
 Returns whether format can be used as color attachment in framebuffers. More...
 
KANZI_API bool kanzi::formatSupportsDepthStencilAttachment (const Renderer *renderer, GraphicsFormat format)
 Returns whether format can be used as depth/stencil attachment in framebuffers. More...
 
KANZI_API bool kanzi::formatIsCompressed (GraphicsFormat format)
 Returns whether format is compressed format or not. More...
 
KANZI_API int kanzi::formatGetCompressedGLFormat (GraphicsFormat format)
 Returns the GL API internal format enumeration of the kanzi::Format. More...
 
KANZI_API bool kanzi::formatIsBackwardsCompatible (GraphicsFormat oldFormat, GraphicsFormat newFormat)
 Tells whether format is backwards-compatible with another format (so that no conversion is necessary). More...
 
KANZI_API GraphicsFormat kanzi::formatGetFallback (GraphicsFormat format)
 Returns the default fallback format. More...
 
KANZI_API GraphicsFormat kanzi::formatGetFallback (const Renderer *renderer, GraphicsFormat format, unsigned int usageFlags)
 Returns a fallback format which supports specified usage flags. More...
 
KANZI_API GraphicsFormat kanzi::formatGetCommon (GraphicsFormat lhs, GraphicsFormat rhs)
 Returns a common superset of two formats, or Format::Nothing if formats cannot be combined. More...
 
KANZI_API GraphicsFormat kanzi::formatGetUncompressed (GraphicsFormat format)
 Returns uncompressed version of format. More...
 
KANZI_API GraphicsFormat kanzi::formatGetDepthStencilRenderbuffer (const Renderer *renderer, bool depth, bool stencil)
 Returns a depth/stencil renderbuffer format which is supported by renderer. More...
 
KANZI_API GraphicsFormat kanzi::formatGetDepthStencilTexture (const Renderer *renderer, bool depth, bool stencil)
 Returns a depth/stencil texture format which is supported by renderer. More...
 
KANZI_API GraphicsDataType kanzi::formatGetDataType (GraphicsFormat format)
 Returns data type of the format. More...
 
KANZI_API void kanzi::formatGetBlockSize (GraphicsFormat format, unsigned int &blockWidth, unsigned int &blockHeight)
 Returns image size in blocks. More...
 
KANZI_API unsigned int kanzi::formatGetDataSizeBlocks (int imageWidth, int imageHeight, GraphicsFormat format)
 Returns data size in blocks for image with specified dimensions and format. More...
 
KANZI_API unsigned int kanzi::formatGetDataSizeBytes (int width, int height, GraphicsFormat format)
 Returns data size in bytes for image with specified dimensions and format. More...
 
KANZI_API unsigned int kanzi::dataTypeGetGLAttributeType (const Renderer *renderer, GraphicsDataType dataType)
 Returns GL API attribute type for given DataType. More...
 
KANZI_API bool kanzi::formatHasRed (GraphicsFormat format)
 Returns true if format has red component. More...
 
KANZI_API bool kanzi::formatHasGreen (GraphicsFormat format)
 Returns true if format has green component. More...
 
KANZI_API bool kanzi::formatHasBlue (GraphicsFormat format)
 Returns true if format has blue component. More...
 
KANZI_API bool kanzi::formatHasAlpha (GraphicsFormat format)
 Returns true if format has alpha component. More...
 
KANZI_API bool kanzi::formatHasDepth (GraphicsFormat format)
 Returns true if format has depth component. More...
 
KANZI_API bool kanzi::formatHasStencil (GraphicsFormat format)
 Returns true if format has depth component. More...
 
KANZI_API unsigned int kanzi::formatGetRedSize (GraphicsFormat format)
 Returns number of bits in the red component of the format. More...
 
KANZI_API unsigned int kanzi::formatGetGreenSize (GraphicsFormat format)
 Returns number of bits in the green component of the format. More...
 
KANZI_API unsigned int kanzi::formatGetBlueSize (GraphicsFormat format)
 Returns number of bits in the blue component of the format. More...
 
KANZI_API unsigned int kanzi::formatGetAlphaSize (GraphicsFormat format)
 Returns number of bits in the alpha component of the format. More...
 
KANZI_API unsigned int kanzi::formatGetDepthSize (GraphicsFormat format)
 Returns number of bits in the depth component of the format. More...
 
KANZI_API unsigned int kanzi::formatGetStencilSize (GraphicsFormat format)
 Returns number of bits in the stencil component of the format. More...
 
KANZI_API void kanzi::formatGetGLFormatTriplet (const Renderer *renderer, GraphicsFormat format, GraphicsFormatUsageFlags usageFlags, 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 kanzi::graphicsDataTypeGetByteCount (GraphicsDataType dataType)
 
KANZI_API kzString kanzi::graphicsDataTypeStr (GraphicsDataType dataType)
 
KANZI_API kzString kanzi::formatStr (GraphicsFormat format)
 

Detailed Description

Core renderer.

Contains the graphics state machine.

Copyright 2008-2020 by Rightware. All rights reserved.