bgfx_utils.h 892 B

12345678910111213141516171819202122
  1. /*
  2. * Copyright 2011-2014 Branimir Karadzic. All rights reserved.
  3. * License: http://www.opensource.org/licenses/BSD-2-Clause
  4. */
  5. #ifndef BGFX_UTILS_H_HEADER_GUARD
  6. #define BGFX_UTILS_H_HEADER_GUARD
  7. #include <bgfx.h>
  8. void* load(const char* _filePath);
  9. bgfx::ShaderHandle loadShader(const char* _name);
  10. bgfx::ProgramHandle loadProgram(const char* _vsName, const char* _fsName);
  11. bgfx::TextureHandle loadTexture(const char* _name, uint32_t _flags = BGFX_TEXTURE_NONE, uint8_t _skip = 0, bgfx::TextureInfo* _info = NULL);
  12. void calcTangents(void* _vertices, uint16_t _numVertices, bgfx::VertexDecl _decl, const uint16_t* _indices, uint32_t _numIndices);
  13. struct Mesh;
  14. Mesh* meshLoad(const char* _filePath);
  15. void meshUnload(Mesh* _mesh);
  16. void meshSubmit(Mesh* _mesh, uint8_t _id, bgfx::ProgramHandle _program, float* _mtx, uint64_t _state = BGFX_STATE_MASK);
  17. #endif // BGFX_UTILS_H_HEADER_GUARD