本文整理汇总了C++中MeshRenderer::BindVertexArray方法的典型用法代码示例。如果您正苦于以下问题:C++ MeshRenderer::BindVertexArray方法的具体用法?C++ MeshRenderer::BindVertexArray怎么用?C++ MeshRenderer::BindVertexArray使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MeshRenderer
的用法示例。
在下文中一共展示了MeshRenderer::BindVertexArray方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SetDefaultTexturedMeshRenderer
//assumes mesh renderer has already been newed off
void SetDefaultTexturedMeshRenderer(MeshRenderer& meshRenderer){
meshRenderer.m_material->InitializeMaterial("Data/Shaders/basicSampler.vert", "Data/Shaders/basicSampler.frag");
meshRenderer.m_mesh->SetDrawMode(GL_QUADS);
meshRenderer.BindVertexArray();
}
示例2: SetDefaultMeshRenderer
void SetDefaultMeshRenderer(MeshRenderer& meshRenderer){
//meshRenderer = MeshRenderer();
//meshRenderer.m_material = new Material();
meshRenderer.SetDefaultMaterial();
//meshRenderer.m_mesh = new Mesh();
meshRenderer.m_mesh->SetDrawMode(GL_QUADS);
meshRenderer.BindVertexArray();
}
示例3: CreateNewMeshRendererFromWarlockeryModelFile
//assumes only common model file path
MeshRenderer WarlockeryModelLoader::CreateNewMeshRendererFromWarlockeryModelFile(const std::string& fileName){
MeshRenderer meshRenderer = MeshRenderer();
meshRenderer.m_mesh = new Mesh();
meshRenderer.m_mesh->SetDrawMode(GL_TRIANGLES);
LoadWarlockeryModelFileToMesh(fileName, meshRenderer.m_mesh, true);
meshRenderer.m_material = new Material();
std::string modelShaderName = "ModelLighting";
SetCustomModelMaterial(meshRenderer.m_material, modelShaderName + ".vert", modelShaderName + ".frag");
LoadModelTexturesForWarlockeryModelFile(meshRenderer.m_material, fileName);
meshRenderer.BindVertexArray();
return meshRenderer;
}