remove OpenGL/glu.h from gl3 headers (warning), replace some OpenGL definitions ARB/non-ARB

This commit is contained in:
=
2014-07-27 11:19:11 -07:00
parent 811087b099
commit c487170196
6 changed files with 24 additions and 17 deletions

View File

@@ -1,4 +1,6 @@
#include "GpuSoftBodyDemo.h"
#define USE_BARREL_VERTICES
#include "OpenGLWindow/ShapeData.h"
#include "OpenGLWindow/GLInstancingRenderer.h"
#include "Bullet3Common/b3Quaternion.h"

View File

@@ -29,10 +29,17 @@ float MOUSE_MOVE_MULTIPLIER = 0.4f;
#include "b3gWindowInterface.h"
#include "Bullet3Common/b3MinMax.h"
#ifndef __APPLE__
#ifndef glVertexAttribDivisor
#define glVertexAttribDivisor glVertexAttribDivisorARB
#endif //glVertexAttribDivisor
#ifndef GL_COMPARE_REF_TO_TEXTURE
#define GL_COMPARE_REF_TO_TEXTURE GL_COMPARE_R_TO_TEXTURE
#endif //GL_COMPARE_REF_TO_TEXTURE
#ifndef glDrawElementsInstanced
#define glDrawElementsInstanced glDrawElementsInstancedARB
#endif
#endif //__APPLE__
#include "GLInstancingRenderer.h"
#include <string.h>
@@ -1563,7 +1570,7 @@ void GLInstancingRenderer::renderSceneInternal(int renderMode)
// glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
// glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_FUNC, GL_LEQUAL);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_MODE, GL_COMPARE_R_TO_TEXTURE);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_MODE, GL_COMPARE_REF_TO_TEXTURE);
m_data->m_shadowMap=new GLRenderToTexture();
m_data->m_shadowMap->init(shadowMapWidth, shadowMapHeight,m_data->m_shadowTexture,RENDERTEXTURE_DEPTH);
@@ -1709,13 +1716,13 @@ b3Assert(glGetError() ==GL_NO_ERROR);
glEnableVertexAttribArray(4);
glEnableVertexAttribArray(5);
glEnableVertexAttribArray(6);
glVertexAttribDivisorARB(0, 0);
glVertexAttribDivisorARB(1, 1);
glVertexAttribDivisorARB(2, 1);
glVertexAttribDivisorARB(3, 0);
glVertexAttribDivisorARB(4, 0);
glVertexAttribDivisorARB(5, 1);
glVertexAttribDivisorARB(6, 1);
glVertexAttribDivisor(0, 0);
glVertexAttribDivisor(1, 1);
glVertexAttribDivisor(2, 1);
glVertexAttribDivisor(3, 0);
glVertexAttribDivisor(4, 0);
glVertexAttribDivisor(5, 1);
glVertexAttribDivisor(6, 1);

View File

@@ -22,7 +22,7 @@ subject to the following restrictions:
#if defined(__APPLE__) && !defined (VMDMESA)
#include <OpenGL/OpenGL.h>
//#include <OpenGL/gl.h>
#include <OpenGL/glu.h>
//#include <OpenGL/glu.h>
//#import <Cocoa/Cocoa.h>
#include <OpenGL/gl3.h>
#else

View File

@@ -1,7 +1,7 @@
#ifndef SHAPE_DATA_H
#define SHAPE_DATA_H
#if USE_BARREL_VERTICES
#ifdef USE_BARREL_VERTICES
static float barrel_vertices[] = {
0.0f,-0.5f,0.0f, 1.0f, 0.0f,-1.0f,0.0f, 0.5f, 0.5f,
0.282362f,-0.5f,-0.205148f, 1.0f, 0.0f,-1.0f,0.0f, 0.5f, 0.5f,

View File

@@ -20,8 +20,8 @@
#include "Bullet3Common/b3Vector3.h"
#include "Bullet3Common/b3Logging.h"
#include "OpenGLTrueTypeFont/fontstash.h"
#include "OpenGLWindow/TwFonts.h"
#include "../btgui/OpenGLTrueTypeFont/fontstash.h"
#include "../btgui/OpenGLWindow/TwFonts.h"
#include "OpenGLTrueTypeFont/opengl_fontstashcallbacks.h"
#include <assert.h>

View File

@@ -4,8 +4,6 @@
kind "StaticLib"
targetdir "../../bin"
includedirs {".."}
files {