HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
utils.h File Reference
#include "pxr/pxr.h"
#include "pxr/imaging/glf/api.h"
#include "pxr/imaging/garch/gl.h"
#include <string>
+ Include dependency graph for utils.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

PXR_NAMESPACE_OPEN_SCOPE
GLF_API GLenum 
GlfGetBaseFormat (int numComponents)
 
GLF_API int GlfGetNumElements (GLenum format)
 
GLF_API int GlfGetElementSize (GLenum type)
 
GLF_API bool GlfCheckGLFrameBufferStatus (GLuint target, std::string *reason)
 
GLF_API bool GlfIsCompressedFormat (GLenum format)
 
GLF_API size_t GlfGetCompressedTextureSize (int width, int height, GLenum format, GLenum type)
 

Function Documentation

GLF_API bool GlfCheckGLFrameBufferStatus ( GLuint  target,
std::string reason 
)

Checks the valitidy of a GL framebuffer

True if the currently bound GL framebuffer is valid and can be bound or returns the cause of the problem

PXR_NAMESPACE_OPEN_SCOPE GLF_API GLenum GlfGetBaseFormat ( int  numComponents)

Base image format

Returns the base image format for the given number of components

Supported number of components: 1, 2, 3, 4

GLF_API size_t GlfGetCompressedTextureSize ( int  width,
int  height,
GLenum  format,
GLenum  type 
)

Calculate the byte size of compressed textures.

Supported GL compressed formats : GL_COMPRESSED_RGBA_BPTC_UNORM, GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT

GLF_API int GlfGetElementSize ( GLenum  type)

Byte size of a GL type.

Returns the size in bytes of a given GL type.

Supported types are : GL_UNSIGNED_BYTE, GL_BYTE, GL_UNSIGNED_SHORT, GL_SHORT, GL_FLOAT, GL_DOUBLE

GLF_API int GlfGetNumElements ( GLenum  format)

Number of elements.

Returns the number of elements (channels) in a given GL enum format.

Supported formats are : GL_DEPTH_COMPONENT, GL_COLOR_INDEX, GL_ALPHA, GL_RED, GL_LUMINANCE, GL_RG, GL_LUMINANCE_ALPHA, GL_RGB, GL_RGBA

GLF_API bool GlfIsCompressedFormat ( GLenum  format)

Check if the format is compressed.

Supported GL compressed formats : GL_COMPRESSED_RGBA_BPTC_UNORM, GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT