diff options
author | 2017-03-29 17:09:40 +0200 | |
---|---|---|
committer | 2017-03-29 17:09:40 +0200 | |
commit | 49f7c99c7786ce257fae28dfeae2f8ee5810424c (patch) | |
tree | 1bbd30dd4dd48596186846c2fc77a8dc748215d2 /3rdparty/bgfx/examples/common/bgfx_utils.h | |
parent | 79f22e060b2c012d628d5d1d83288c1bb6e6acef (diff) |
Update BGFX and BX (nw)
Diffstat (limited to '3rdparty/bgfx/examples/common/bgfx_utils.h')
-rw-r--r-- | 3rdparty/bgfx/examples/common/bgfx_utils.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/3rdparty/bgfx/examples/common/bgfx_utils.h b/3rdparty/bgfx/examples/common/bgfx_utils.h index b6731fc22e9..f948d1bfac2 100644 --- a/3rdparty/bgfx/examples/common/bgfx_utils.h +++ b/3rdparty/bgfx/examples/common/bgfx_utils.h @@ -7,12 +7,27 @@ #define BGFX_UTILS_H_HEADER_GUARD #include <bgfx/bgfx.h> +#include "image.h" +/// 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, uint32_t _flags = BGFX_TEXTURE_NONE, uint8_t _skip = 0, bgfx::TextureInfo* _info = NULL); + +/// +bgfx::ImageContainer* imageLoad(const char* _filePath, bgfx::TextureFormat::Enum _dstFormat); + +/// void calcTangents(void* _vertices, uint16_t _numVertices, bgfx::VertexDecl _decl, const uint16_t* _indices, uint32_t _numIndices); /// Returns true if both internal transient index and vertex buffer have @@ -29,6 +44,7 @@ inline bool checkAvailTransientBuffers(uint32_t _numVertices, const bgfx::Vertex ; } +/// struct MeshState { struct Texture @@ -48,15 +64,25 @@ struct MeshState struct Mesh; +/// Mesh* meshLoad(const char* _filePath); + +/// void meshUnload(Mesh* _mesh); +/// MeshState* meshStateCreate(); + +/// void meshStateDestroy(MeshState* _meshState); +/// void meshSubmit(const Mesh* _mesh, uint8_t _id, bgfx::ProgramHandle _program, const float* _mtx, uint64_t _state = BGFX_STATE_MASK); + +/// void meshSubmit(const Mesh* _mesh, const MeshState*const* _state, uint8_t _numPasses, const float* _mtx, uint16_t _numMatrices = 1); +/// struct Args { Args(int _argc, char** _argv); |