@@ -420,7 +420,7 @@ void EasyMesh::MeshConvert(Shader* provided_shader) | |||||
} | } | ||||
//----------------------------------------------------------------------------- | //----------------------------------------------------------------------------- | ||||
void EasyMesh::Render(mat4 const &model, float damage) | |||||
void EasyMesh::Render(mat4 const &model) | |||||
{ | { | ||||
m_gpu_data.RenderMeshData(model); | m_gpu_data.RenderMeshData(model); | ||||
} | } | ||||
@@ -871,6 +871,7 @@ void EasyMesh::ComputeNormals(int start, int vcount) | |||||
//----------------------------------------------------------------------------- | //----------------------------------------------------------------------------- | ||||
void EasyMesh::ComputeTexCoord(float uv_scale, int uv_offset) | void EasyMesh::ComputeTexCoord(float uv_scale, int uv_offset) | ||||
{ | { | ||||
UNUSED(uv_scale, uv_offset); | |||||
#if 0 | #if 0 | ||||
VertexDictionnary vert_dict; | VertexDictionnary vert_dict; | ||||
Array<int> tri_list; | Array<int> tri_list; | ||||
@@ -2149,7 +2150,7 @@ void EasyMesh::AppendCog(int nbsides, float h, float d10, float d20, | |||||
for (int n = 0; n < 3 * 12; n++) | for (int n = 0; n < 3 * 12; n++) | ||||
{ | { | ||||
int d = n / 3; | int d = n / 3; | ||||
int m = d % 6; | |||||
int e = d % 6; | |||||
AddVertex(p[d]); | AddVertex(p[d]); | ||||
if (n % 3 == 0) //Top-Bottom logic | if (n % 3 == 0) //Top-Bottom logic | ||||
{ | { | ||||
@@ -2165,14 +2166,14 @@ void EasyMesh::AppendCog(int nbsides, float h, float d10, float d20, | |||||
SetCurVertTexCoord(tmp * vec2(.25f) + add); | SetCurVertTexCoord(tmp * vec2(.25f) + add); | ||||
SetCurVertTexCoord2(tmp * vec2(.25f) + add); | SetCurVertTexCoord2(tmp * vec2(.25f) + add); | ||||
} | } | ||||
else if (m == 0 || m == 1) //inner Logic | |||||
else if (e == 0 || e == 1) //inner Logic | |||||
{ | { | ||||
SetCurVertTexCoord(uv[d]); | SetCurVertTexCoord(uv[d]); | ||||
SetCurVertTexCoord2(uv[d]); | SetCurVertTexCoord2(uv[d]); | ||||
} | } | ||||
else //Cog logic | else //Cog logic | ||||
{ | { | ||||
if (m == 2 && n % 3 == 2) | |||||
if (e == 2 && n % 3 == 2) | |||||
{ | { | ||||
SetCurVertTexCoord(vec2(1.f, (d == 2)?(0.f):(1.f)) * CogUV[0] + CogUV[1]); | SetCurVertTexCoord(vec2(1.f, (d == 2)?(0.f):(1.f)) * CogUV[0] + CogUV[1]); | ||||
SetCurVertTexCoord2(vec2(1.f, (d == 2)?(0.f):(1.f)) * CogUV[0] + CogUV[1]); | SetCurVertTexCoord2(vec2(1.f, (d == 2)?(0.f):(1.f)) * CogUV[0] + CogUV[1]); | ||||
@@ -525,7 +525,7 @@ public: | |||||
bool Compile(char const *command); | bool Compile(char const *command); | ||||
void MeshConvert(GpuShaderData* new_gpu_sdata); | void MeshConvert(GpuShaderData* new_gpu_sdata); | ||||
void MeshConvert(Shader* ProvidedShader = NULL); | void MeshConvert(Shader* ProvidedShader = NULL); | ||||
void Render(mat4 const &model, float damage = 0.f); | |||||
void Render(mat4 const &model); | |||||
private: | private: | ||||
void UpdateVertexDict(Array< int, int > &vertex_dict); | void UpdateVertexDict(Array< int, int > &vertex_dict); | ||||
@@ -209,9 +209,9 @@ void FrameBuffer::Unbind() | |||||
m_data->m_back_surface->Release(); | m_data->m_back_surface->Release(); | ||||
#else | #else | ||||
# if GL_VERSION_1_1 || GL_ES_VERSION_2_0 | # if GL_VERSION_1_1 || GL_ES_VERSION_2_0 | ||||
glBindFramebuffer(GL_FRAMEBUFFER, NULL); | |||||
glBindFramebuffer(GL_FRAMEBUFFER, 0); | |||||
# else | # else | ||||
glBindFramebufferOES(GL_FRAMEBUFFER_OES, NULL); | |||||
glBindFramebufferOES(GL_FRAMEBUFFER_OES, 0); | |||||
# endif | # endif | ||||
#endif | #endif | ||||
} | } | ||||
@@ -42,6 +42,8 @@ private: | |||||
bool DummyImageData::Open(char const *path) | bool DummyImageData::Open(char const *path) | ||||
{ | { | ||||
UNUSED(path); | |||||
size = ivec2(256); | size = ivec2(256); | ||||
format = Image::FORMAT_RGBA; | format = Image::FORMAT_RGBA; | ||||
pixels = (uint8_t *)malloc(256 * 256 * 4 * sizeof(*pixels)); | pixels = (uint8_t *)malloc(256 * 256 * 4 * sizeof(*pixels)); | ||||
@@ -55,7 +55,8 @@ static bool RegisterAllLoaders() | |||||
Image::Image(char const *path) | Image::Image(char const *path) | ||||
{ | { | ||||
static bool unused = RegisterAllLoaders(); | |||||
static bool init = RegisterAllLoaders(); | |||||
UNUSED(init); | |||||
data = ImageLoader::Load(path); | data = ImageLoader::Load(path); | ||||
} | } | ||||
@@ -44,6 +44,7 @@ SubMesh::~SubMesh() | |||||
void SubMesh::Render(mat4 const &model) | void SubMesh::Render(mat4 const &model) | ||||
{ | { | ||||
/* FIXME: TODO */ | |||||
} | } | ||||
} /* namespace lol */ | } /* namespace lol */ | ||||
@@ -239,9 +239,6 @@ void Video::SetClearDepth(float f) | |||||
void Video::SetDebugRenderMode(DebugRenderMode d) | void Video::SetDebugRenderMode(DebugRenderMode d) | ||||
{ | { | ||||
if (d == DebugRenderMode::Max) | |||||
return; | |||||
switch(d) | switch(d) | ||||
{ | { | ||||
//All these modes are handled in the shaders. | //All these modes are handled in the shaders. | ||||
@@ -289,6 +286,8 @@ void Video::SetDebugRenderMode(DebugRenderMode d) | |||||
#endif | #endif | ||||
break; | break; | ||||
} | } | ||||
default: | |||||
return; /* Unknown render mode */ | |||||
} | } | ||||
VideoData::render_mode = d; | VideoData::render_mode = d; | ||||
} | } | ||||