Example #1
0
VertexLoader::VertexLoader(const TVtxDesc &vtx_desc, const VAT &vtx_attr)
    : VertexLoaderBase(vtx_desc, vtx_attr)
{
    VertexLoader_Normal::Init();
    VertexLoader_Position::Init();
    VertexLoader_TextCoord::Init();

    CompileVertexTranslator();
}
Example #2
0
VertexLoader::VertexLoader(const TVtxDesc &vtx_desc, const VAT &vtx_attr)
: VertexLoaderBase(vtx_desc, vtx_attr)
{
	VertexLoader_Normal::Init();

	CompileVertexTranslator();

	// generate frac factors
	m_posScale = 1.0f / (1U << m_VtxAttr.PosFrac);
	for (int i = 0; i < 8; i++)
		m_tcScale[i] = 1.0f / (1U << m_VtxAttr.texCoord[i].Frac);
}