2012-12-28 20:09:34 -05:00
|
|
|
/*
|
2015-01-01 18:04:46 -05:00
|
|
|
* Copyright 2011-2015 Branimir Karadzic. All rights reserved.
|
2012-12-28 20:09:34 -05:00
|
|
|
* License: http://www.opensource.org/licenses/BSD-2-Clause
|
|
|
|
*/
|
|
|
|
|
2013-11-14 00:54:36 -05:00
|
|
|
#ifndef BGFX_VERTEXDECL_H_HEADER_GUARD
|
|
|
|
#define BGFX_VERTEXDECL_H_HEADER_GUARD
|
2013-01-13 13:47:30 -05:00
|
|
|
|
2012-12-28 20:09:34 -05:00
|
|
|
#include <bgfx.h>
|
2014-08-17 20:20:15 -04:00
|
|
|
#include <bx/readerwriter.h>
|
2012-12-28 20:09:34 -05:00
|
|
|
|
|
|
|
namespace bgfx
|
|
|
|
{
|
2014-05-26 17:09:26 -04:00
|
|
|
///
|
|
|
|
void initAttribTypeSizeTable(RendererType::Enum _type);
|
|
|
|
|
2012-12-31 21:48:52 -05:00
|
|
|
/// Returns attribute name.
|
2012-12-28 20:09:34 -05:00
|
|
|
const char* getAttribName(Attrib::Enum _attr);
|
2012-12-31 21:48:52 -05:00
|
|
|
|
|
|
|
/// Dump vertex declaration into debug output.
|
2012-12-28 20:09:34 -05:00
|
|
|
void dump(const VertexDecl& _decl);
|
|
|
|
|
2014-08-17 20:20:15 -04:00
|
|
|
///
|
|
|
|
Attrib::Enum idToAttrib(uint16_t id);
|
|
|
|
|
|
|
|
///
|
|
|
|
uint16_t attribToId(Attrib::Enum _attr);
|
|
|
|
|
|
|
|
///
|
|
|
|
AttribType::Enum idToAttribType(uint16_t id);
|
|
|
|
|
|
|
|
///
|
|
|
|
int32_t write(bx::WriterI* _writer, const bgfx::VertexDecl& _decl);
|
|
|
|
|
|
|
|
///
|
|
|
|
int32_t read(bx::ReaderI* _reader, bgfx::VertexDecl& _decl);
|
|
|
|
|
2012-12-28 20:09:34 -05:00
|
|
|
} // namespace bgfx
|
2013-01-13 13:47:30 -05:00
|
|
|
|
2013-11-14 00:54:36 -05:00
|
|
|
#endif // BGFX_VERTEXDECL_H_HEADER_GUARD
|