Sfoglia il codice sorgente

easymesh : Tweak previous crashfix.

legacy
Benjamin ‘Touky’ Huet touky 11 anni fa
parent
commit
b46adfa65b
2 ha cambiato i file con 20 aggiunte e 4 eliminazioni
  1. +4
    -4
      src/easymesh/easymesh.cpp
  2. +16
    -0
      src/easymesh/easymesh.h

+ 4
- 4
src/easymesh/easymesh.cpp Vedi File

@@ -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 Vedi File

@@ -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


Caricamento…
Annulla
Salva