Browse Source

Update EasyMesh.Convert() method.

Now takes an optional shader
legacy
jeunathe jnat 12 years ago
parent
commit
504f9a4ca2
2 changed files with 8 additions and 3 deletions
  1. +7
    -2
      src/easymesh/easymesh.cpp
  2. +1
    -1
      src/easymesh/easymesh.h

+ 7
- 2
src/easymesh/easymesh.cpp View File

@@ -62,9 +62,14 @@ void EasyMesh::CloseBrace()
m_cursors.Pop();
}

void EasyMesh::MeshConvert()
void EasyMesh::MeshConvert(Shader* ProvidedShader)
{
m_gpu.shader = Shader::Create(lolfx_shiny);
if(ProvidedShader == NULL)
{
m_gpu.shader = Shader::Create(lolfx_shiny);
}else{
m_gpu.shader = ProvidedShader;
}

m_gpu.modelview = m_gpu.shader->GetUniformLocation("in_ModelView");
m_gpu.view = m_gpu.shader->GetUniformLocation("in_View");


+ 1
- 1
src/easymesh/easymesh.h View File

@@ -29,7 +29,7 @@ public:
EasyMesh();

bool Compile(char const *command);
void MeshConvert();
void MeshConvert(Shader* ProvidedShader = NULL);
void Render(mat4 const &model, float damage = 0.f);

void OpenBrace();


Loading…
Cancel
Save