Ver código fonte

easymesh : Tweak previous crashfix.

legacy
Benjamin ‘Touky’ Huet touky 11 anos atrás
pai
commit
b46adfa65b
2 arquivos alterados com 20 adições e 4 exclusões
  1. +4
    -4
      src/easymesh/easymesh.cpp
  2. +16
    -0
      src/easymesh/easymesh.h

+ 4
- 4
src/easymesh/easymesh.cpp Ver arquivo

@@ -371,10 +371,7 @@ EasyMesh::EasyMesh()
bool EasyMesh::Compile(char const *command)
{
EasyMeshCompiler mc(*this);
bool res = mc.ParseString(command);
delete(m_build_data);
m_build_data = NULL;
return res;
return mc.ParseString(command);
}

//-----------------------------------------------------------------------------
@@ -391,6 +388,9 @@ void EasyMesh::CloseBrace()
//-----------------------------------------------------------------------------
void EasyMesh::MeshConvert(GpuShaderData* new_gpu_sdata)
{
delete(m_build_data);
m_build_data = NULL;

if (new_gpu_sdata)
{
m_gpu_data.AddGpuData(new_gpu_sdata, this);


+ 16
- 0
src/easymesh/easymesh.h Ver arquivo

@@ -21,6 +21,22 @@
namespace lol
{

//Utility enum for renderers
struct MeshRender
{
enum Value
{
NeedInit,
CanRender,
IgnoreRender
}
m_value;

inline MeshRender(Value v) : m_value(v) {}
inline MeshRender() : m_value(NeedInit) {}
inline operator Value() { return m_value; }
};

//Vertex datas for easymesh vertex list.
//TODO : <COORD, NORM, COLOR, UV>
struct VertexData


Carregando…
Cancelar
Salvar