mirror of https://github.com/axmolengine/axmol.git
18 lines
433 B
C++
18 lines
433 B
C++
#include "VertexLayout.h"
|
|
#include <cassert>
|
|
|
|
CC_BACKEND_BEGIN
|
|
|
|
void VertexLayout::setAtrribute(const std::string &name, unsigned int index, VertexFormat format, unsigned int offset, bool needToBeNormallized)
|
|
{
|
|
_attributes[name] = {name, index, format, offset, needToBeNormallized};
|
|
}
|
|
|
|
void VertexLayout::setLayout(unsigned int stride, VertexStepMode stepMode)
|
|
{
|
|
_stride = stride;
|
|
_stepMode = stepMode;
|
|
}
|
|
|
|
CC_BACKEND_END
|