#include <bgfx/bgfx.h>
#include <bimg/bimg.h>
#include <bimg/encode.h>
#include <bimg/decode.h>
#include <bx/bounds.h>
#include <bx/pixelformat.h>
#include <bx/string.h>
#include <tinystl/allocator.h>
#include <tinystl/vector.h>
Go to the source code of this file.
|
bool | saveToFile (bgfx::ViewId viewId, const char *_filePath, bgfx::FrameBufferHandle fbo, uint32_t width, uint32_t height) |
|
void * | load (const char *_filePath, uint32_t *_size=NULL) |
|
void | unload (void *_ptr) |
|
bgfx::ShaderHandle | loadShader (const char *_name) |
|
bgfx::ProgramHandle | loadProgram (const char *_vsName, const char *_fsName) |
|
bgfx::TextureHandle | loadTexture (const char *_name, uint64_t _flags=BGFX_TEXTURE_NONE|BGFX_SAMPLER_NONE, uint8_t _skip=0, bgfx::TextureInfo *_info=NULL, bimg::Orientation::Enum *_orientation=NULL) |
|
bimg::ImageContainer * | imageLoad (const void *data, uint32_t size, bgfx::TextureFormat::Enum _dstFormat=bgfx::TextureFormat::Count) |
|
bimg::ImageContainer * | imageLoad (const char *_filePath, bgfx::TextureFormat::Enum _dstFormat=bgfx::TextureFormat::Count) |
|
bool | imageSave (const char *saveAs, bimg::ImageContainer *image) |
|
void | calcTangents (void *_vertices, uint16_t _numVertices, bgfx::VertexLayout _layout, const uint16_t *_indices, uint32_t _numIndices) |
|
bool | checkAvailTransientBuffers (uint32_t _numVertices, const bgfx::VertexLayout &_layout, uint32_t _numIndices) |
|
uint32_t | encodeNormalRgba8 (float _x, float _y=0.0f, float _z=0.0f, float _w=0.0f) |
|
◆ calcTangents()
void calcTangents |
( |
void * | _vertices, |
|
|
uint16_t | _numVertices, |
|
|
bgfx::VertexLayout | _layout, |
|
|
const uint16_t * | _indices, |
|
|
uint32_t | _numIndices ) |
◆ checkAvailTransientBuffers()
bool checkAvailTransientBuffers |
( |
uint32_t | _numVertices, |
|
|
const bgfx::VertexLayout & | _layout, |
|
|
uint32_t | _numIndices ) |
|
inline |
Returns true if both internal transient index and vertex buffer have enough space.
- Parameters
-
[in] | _numVertices | Number of vertices. |
[in] | _layout | Vertex layout. |
[in] | _numIndices | Number of indices. |
Definition at line 61 of file bgfx_utils.h.
◆ encodeNormalRgba8()
uint32_t encodeNormalRgba8 |
( |
float | _x, |
|
|
float | _y = 0.0f, |
|
|
float | _z = 0.0f, |
|
|
float | _w = 0.0f ) |
|
inline |
◆ imageLoad() [1/2]
bimg::ImageContainer * imageLoad |
( |
const char * | _filePath, |
|
|
bgfx::TextureFormat::Enum | _dstFormat = bgfx::TextureFormat::Count ) |
◆ imageLoad() [2/2]
bimg::ImageContainer * imageLoad |
( |
const void * | data, |
|
|
uint32_t | size, |
|
|
bgfx::TextureFormat::Enum | _dstFormat = bgfx::TextureFormat::Count ) |
◆ imageSave()
bool imageSave |
( |
const char * | saveAs, |
|
|
bimg::ImageContainer * | image ) |
◆ load()
void * load |
( |
const char * | _filePath, |
|
|
uint32_t * | _size = NULL ) |
◆ loadProgram()
bgfx::ProgramHandle loadProgram |
( |
const char * | _vsName, |
|
|
const char * | _fsName ) |
◆ loadShader()
bgfx::ShaderHandle loadShader |
( |
const char * | _name | ) |
|
◆ loadTexture()
bgfx::TextureHandle loadTexture |
( |
const char * | _name, |
|
|
uint64_t | _flags = BGFX_TEXTURE_NONE|BGFX_SAMPLER_NONE, |
|
|
uint8_t | _skip = 0, |
|
|
bgfx::TextureInfo * | _info = NULL, |
|
|
bimg::Orientation::Enum * | _orientation = NULL ) |
◆ saveToFile()
bool saveToFile |
( |
bgfx::ViewId | viewId, |
|
|
const char * | _filePath, |
|
|
bgfx::FrameBufferHandle | fbo, |
|
|
uint32_t | width, |
|
|
uint32_t | height ) |
◆ unload()
void unload |
( |
void * | _ptr | ) |
|