fixed annoying warnings
This commit is contained in:
parent
cf07f30a00
commit
3ed4b73c05
@ -10,7 +10,7 @@ FILE(GLOB RES_SRC_FILE shaders/*.glsl)
|
||||
SET(RESOURCE_DST_FILE shaders.cpp)
|
||||
|
||||
# choose source file
|
||||
file(GLOB LIB_SRC_LIST src/*.cpp src/glew.c)
|
||||
file(GLOB LIB_SRC_LIST src/*.cpp)
|
||||
list(APPEND LIB_SRC_LIST ${RESOURCE_DST_FILE})
|
||||
file(GLOB LIB_HEAD_LIST src/*.h)
|
||||
|
||||
|
14
src/mesh.cpp
14
src/mesh.cpp
@ -37,8 +37,8 @@ Mesh::Mesh() :
|
||||
isBillboard(false),
|
||||
isShadowCaster(true),
|
||||
depth(0),
|
||||
vao(0),
|
||||
primitive_type(GL_TRIANGLES)
|
||||
primitive_type(GL_TRIANGLES),
|
||||
vao(0)
|
||||
{
|
||||
clearBuffers();
|
||||
}
|
||||
@ -290,12 +290,14 @@ void Mesh::mergeVertices()
|
||||
for(std::size_t i=0; i<indices.size(); ++i)
|
||||
{
|
||||
std::pair<std::set<int,VertexComparator>::iterator, bool> ret = vertexSet.insert(indices[i]);
|
||||
deleted[indices[i]] = !ret.second && *(ret.first) != indices[i];
|
||||
std::set<int,VertexComparator>::iterator it = ret.first;
|
||||
bool success = ret.second;
|
||||
deleted[indices[i]] = !success && *it != int(indices[i]);
|
||||
if(deleted[indices[i]])
|
||||
{
|
||||
if(!tangents.empty())
|
||||
tangents[*(ret.first)].tangent += tangents[indices[i]].tangent;
|
||||
indices[i] = *(ret.first);
|
||||
tangents[*it].tangent += tangents[indices[i]].tangent;
|
||||
indices[i] = *it;
|
||||
}
|
||||
}
|
||||
int offset = 0;
|
||||
@ -330,7 +332,7 @@ void Mesh::mergeVertices()
|
||||
normals.resize(normals.size()-offset);
|
||||
if(!tangents.empty())
|
||||
tangents.resize(tangents.size()-offset);
|
||||
for(int i=0; i<tangents.size(); ++i)
|
||||
for(int i=0; i<int(tangents.size()); ++i)
|
||||
{
|
||||
glm::vec3 &T = tangents[i].tangent;
|
||||
const glm::vec3 &N = normals[i];
|
||||
|
@ -15,11 +15,11 @@ const GLfloat PostEffectModule::vertices[] = {
|
||||
};
|
||||
|
||||
PostEffectModule::PostEffectModule(int width, int height) :
|
||||
outputFBO(FrameBuffer::screen),
|
||||
frameBuffers(NULL),
|
||||
outputFBO(FrameBuffer::screen),
|
||||
blur(NULL),
|
||||
redux(NULL),
|
||||
blurSource(NULL),
|
||||
redux(NULL),
|
||||
bloom_threshold(0.7f)
|
||||
{
|
||||
for(int i=0; i<NB_SHADERS; ++i)
|
||||
|
@ -34,7 +34,7 @@ void SparrowRenderer::initGL(int w, int h, bool forceCrappy)
|
||||
strcmp("3.30",(const char *)glGetString(GL_SHADING_LANGUAGE_VERSION)) <= 0;
|
||||
|
||||
#ifdef RENDER_DEBUG
|
||||
printf("Using SparrowRenderer %d.%d\n\n", VERSION_MAJOR, VERSION_MINOR);
|
||||
printf("Using SparrowRenderer %d.%d\n\n", SparrowRenderer_VERSION_MAJOR, SparrowRenderer_VERSION_MINOR);
|
||||
if(modernOpenglAvailable)
|
||||
printf("Modern OpenGL available.\n");
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user