Commit c8207b0b authored by Ilya Prokhorov's avatar Ilya Prokhorov

Great cleanup

parent b5c2a6de
......@@ -58,9 +58,6 @@ public:
shared_ptr<Screenshot> takeScreenshot();
private:
float testCameraRotation = 0;
unique_ptr<FSGLCore> core;
};
......
......@@ -72,7 +72,7 @@ void FSGLAnimation::restartAnimationCounters()
void FSGLAnimation::setCurrentOffset(double offset)
{
this->currentOffset = offset;
}
bool FSGLAnimation::isEnded()
......
......@@ -45,7 +45,7 @@ shared_ptr<FSGLVector> FSGLNodeAnimation::positionVectorFor(shared_ptr<FSGLAnima
auto previousPosition = shared_ptr<FSGLVectorKeyframe>();
auto nextPosition = shared_ptr<FSGLVectorKeyframe>();
for (auto i = 0; i < positions.size(); i++)
for (size_t i = 0; i < positions.size(); i++)
{
auto position = positions[i];
auto time = position->time;
......@@ -98,7 +98,8 @@ shared_ptr<FSGLVector> FSGLNodeAnimation::positionVectorFor(shared_ptr<FSGLAnima
shared_ptr<FSGLQuaternion> FSGLNodeAnimation::rotationFor(shared_ptr<FSGLAnimation> currentAnimation)
{
cout << currentAnimation << endl;
glm::vec3 scale;
glm::quat rotation;
glm::vec3 translation;
......
......@@ -139,7 +139,7 @@ shared_ptr<FSGLObject> FSGLObject::deserializeFromString(shared_ptr<string> seri
return outputObject;
}
shared_ptr<FSGLObject> FSGLObject::deserializeFromFile(shared_ptr<string> path)
shared_ptr<FSGLObject> FSGLObject::deserializeFromFile(shared_ptr<string> )
{
return make_shared<FSGLObject>();
}
......
......@@ -63,7 +63,7 @@ void FSGLVertex::setWeigthForMatrixAtIndex(float vertexWeight, int matrixIndex)
// cout << "animationMatricesIndexes["<< slot <<"] = " << matrixIndex << endl;
for (auto i = 0; i < bonesWeightsVector.size(); i++)
for (size_t i = 0; i < bonesWeightsVector.size(); i++)
{
vertexWeights[i] = bonesWeightsVector[i];
}
......
......@@ -250,7 +250,7 @@ void OGLNewAgeRenderer::removeObject(shared_ptr<FSGLObject> object)
#ifndef FSGL_LEGACY_OPENGL
static void FSGL_openGLDebugCallback(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *message, const void *userParam)
static void FSGL_openGLDebugCallback(GLenum , GLenum type, GLuint , GLenum , GLsizei , const GLchar *message, const void *)
{
if (type != GL_DEBUG_TYPE_OTHER)
{
......@@ -648,12 +648,12 @@ void OGLNewAgeRenderer::renderObject(shared_ptr<FSGLObject> object)
glm::mat4 glmMatrices[64];
auto unitMatrix = make_shared<FSGLMatrix>();
for (auto i =0; i < 64; i++)
for (auto i = 0; i < 64; i++)
{
glmMatrices[i] = unitMatrix->matrix;
}
for (auto i = 0; i < animationTransformationMatrices.size(); i++)
for (size_t i = 0; i < animationTransformationMatrices.size(); i++)
{
auto animationTransformationMatrix = animationTransformationMatrices[i];
......@@ -661,7 +661,7 @@ void OGLNewAgeRenderer::renderObject(shared_ptr<FSGLObject> object)
//cout << "shader transformations enabled for index" << i << endl;
}
glUniformMatrix4fv(bonesMatricesUniform, 64, GL_FALSE, glm::value_ptr(glmMatrices[0]));
glUniformMatrix4fv(bonesMatricesUniform, kMaxBones, GL_FALSE, glm::value_ptr(glmMatrices[0]));
GLint bone0infoSlot = glGetAttribLocation(shader_program, "bone0info");
glVertexAttribPointer(bone0infoSlot, 2, GL_FLOAT, GL_FALSE, FSGLMesh::glVertexSize(), (GLvoid*) (sizeof (GLfloat) * 5));
......
......@@ -17,13 +17,3 @@ void Renderer::preInitialize()
{
};
void Renderer::fillParams(shared_ptr<IOSystemParams> params)
{
};
SDL_Window* Renderer::initializeWindow(shared_ptr<IOSystemParams> params)
{
return nullptr;
};
\ No newline at end of file
......@@ -23,8 +23,8 @@ public:
virtual ~Renderer();
virtual void preInitialize();
virtual void fillParams(shared_ptr<IOSystemParams> params);
virtual SDL_Window* initializeWindow(shared_ptr<IOSystemParams> params);
virtual void fillParams(shared_ptr<IOSystemParams> params) = 0;
virtual SDL_Window* initializeWindow(shared_ptr<IOSystemParams> params) = 0;
virtual void addObject(shared_ptr<FSGLObject> object) = 0;
virtual void removeObject(shared_ptr<FSGLObject> object) = 0;
......@@ -41,4 +41,4 @@ public:
};
};
#endif
\ No newline at end of file
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment