bgfx/src/vertexdecl.h

41 lines
853 B
C
Raw Normal View History

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
*/
#ifndef BGFX_VERTEXDECL_H_HEADER_GUARD
#define BGFX_VERTEXDECL_H_HEADER_GUARD
2012-12-28 20:09:34 -05:00
#include <bgfx.h>
#include <bx/readerwriter.h>
2012-12-28 20:09:34 -05:00
namespace bgfx
{
///
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);
///
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
#endif // BGFX_VERTEXDECL_H_HEADER_GUARD