More compile warning fixes (MSVC 2015)

This commit is contained in:
manuelk 2016-01-29 17:26:20 -08:00 committed by David G. Yu
parent 20b6dd2aa3
commit 223d756a14
2 changed files with 8 additions and 6 deletions

View File

@ -42,10 +42,6 @@
GLFWwindow* g_window=0;
GLFWmonitor* g_primary=0;
#if _MSC_VER
#define snprintf _snprintf
#endif
#include <osd/cpuGLVertexBuffer.h>
#include <far/patchTableFactory.h>
@ -70,6 +66,12 @@ GLFWmonitor* g_primary=0;
#include <set>
#include <fstream>
#include <sstream>
#include <cstdio>
#if _MSC_VER
#define snprintf _snprintf
#endif
//------------------------------------------------------------------------------
int g_level = 3,

View File

@ -454,13 +454,13 @@ public:
void EnableVertexAttributes( ) {
long int offset = 0;
int * offset = 0;
for (AttrList::iterator i=_attrs.begin(); i!=_attrs.end(); ++i) {
glEnableVertexAttribArray( i->location );
glVertexAttribPointer( i->location, i->size,
GL_FLOAT, GL_FALSE, sizeof(GLfloat) * _attrStride, (void*)offset);
GL_FLOAT, GL_FALSE, sizeof(GLfloat) * _attrStride, (GLvoid*)offset);
offset += sizeof(GLfloat) * i->size;
}