Pārlūkot izejas kodu

build: fix a few compiler warnings here and there.

legacy
Sam Hocevar sam pirms 11 gadiem
vecāks
revīzija
1c3ca01ea0
7 mainītis faili ar 15 papildinājumiem un 11 dzēšanām
  1. +5
    -4
      src/easymesh/easymesh.cpp
  2. +1
    -1
      src/easymesh/easymesh.h
  3. +2
    -2
      src/gpu/framebuffer.cpp
  4. +2
    -0
      src/image/codec/dummy-image.cpp
  5. +2
    -1
      src/image/image.cpp
  6. +1
    -0
      src/mesh/mesh.cpp
  7. +2
    -3
      src/video.cpp

+ 5
- 4
src/easymesh/easymesh.cpp Parādīt failu

@@ -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);
}
@@ -871,6 +871,7 @@ void EasyMesh::ComputeNormals(int start, int vcount)
//-----------------------------------------------------------------------------
void EasyMesh::ComputeTexCoord(float uv_scale, int uv_offset)
{
UNUSED(uv_scale, uv_offset);
#if 0
VertexDictionnary vert_dict;
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++)
{
int d = n / 3;
int m = d % 6;
int e = d % 6;
AddVertex(p[d]);
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);
SetCurVertTexCoord2(tmp * vec2(.25f) + add);
}
else if (m == 0 || m == 1) //inner Logic
else if (e == 0 || e == 1) //inner Logic
{
SetCurVertTexCoord(uv[d]);
SetCurVertTexCoord2(uv[d]);
}
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]);
SetCurVertTexCoord2(vec2(1.f, (d == 2)?(0.f):(1.f)) * CogUV[0] + CogUV[1]);


+ 1
- 1
src/easymesh/easymesh.h Parādīt failu

@@ -525,7 +525,7 @@ public:
bool Compile(char const *command);
void MeshConvert(GpuShaderData* new_gpu_sdata);
void MeshConvert(Shader* ProvidedShader = NULL);
void Render(mat4 const &model, float damage = 0.f);
void Render(mat4 const &model);

private:
void UpdateVertexDict(Array< int, int > &vertex_dict);


+ 2
- 2
src/gpu/framebuffer.cpp Parādīt failu

@@ -209,9 +209,9 @@ void FrameBuffer::Unbind()
m_data->m_back_surface->Release();
#else
# if GL_VERSION_1_1 || GL_ES_VERSION_2_0
glBindFramebuffer(GL_FRAMEBUFFER, NULL);
glBindFramebuffer(GL_FRAMEBUFFER, 0);
# else
glBindFramebufferOES(GL_FRAMEBUFFER_OES, NULL);
glBindFramebufferOES(GL_FRAMEBUFFER_OES, 0);
# endif
#endif
}


+ 2
- 0
src/image/codec/dummy-image.cpp Parādīt failu

@@ -42,6 +42,8 @@ private:

bool DummyImageData::Open(char const *path)
{
UNUSED(path);

size = ivec2(256);
format = Image::FORMAT_RGBA;
pixels = (uint8_t *)malloc(256 * 256 * 4 * sizeof(*pixels));


+ 2
- 1
src/image/image.cpp Parādīt failu

@@ -55,7 +55,8 @@ static bool RegisterAllLoaders()

Image::Image(char const *path)
{
static bool unused = RegisterAllLoaders();
static bool init = RegisterAllLoaders();
UNUSED(init);

data = ImageLoader::Load(path);
}


+ 1
- 0
src/mesh/mesh.cpp Parādīt failu

@@ -44,6 +44,7 @@ SubMesh::~SubMesh()

void SubMesh::Render(mat4 const &model)
{
/* FIXME: TODO */
}

} /* namespace lol */


+ 2
- 3
src/video.cpp Parādīt failu

@@ -239,9 +239,6 @@ void Video::SetClearDepth(float f)

void Video::SetDebugRenderMode(DebugRenderMode d)
{
if (d == DebugRenderMode::Max)
return;

switch(d)
{
//All these modes are handled in the shaders.
@@ -289,6 +286,8 @@ void Video::SetDebugRenderMode(DebugRenderMode d)
#endif
break;
}
default:
return; /* Unknown render mode */
}
VideoData::render_mode = d;
}


Notiek ielāde…
Atcelt
Saglabāt