remove OpenGL/glu.h from gl3 headers (warning), replace some OpenGL definitions ARB/non-ARB
This commit is contained in:
@@ -1,4 +1,6 @@
|
|||||||
|
|
||||||
#include "GpuSoftBodyDemo.h"
|
#include "GpuSoftBodyDemo.h"
|
||||||
|
#define USE_BARREL_VERTICES
|
||||||
#include "OpenGLWindow/ShapeData.h"
|
#include "OpenGLWindow/ShapeData.h"
|
||||||
#include "OpenGLWindow/GLInstancingRenderer.h"
|
#include "OpenGLWindow/GLInstancingRenderer.h"
|
||||||
#include "Bullet3Common/b3Quaternion.h"
|
#include "Bullet3Common/b3Quaternion.h"
|
||||||
@@ -414,4 +416,4 @@ void GpuSoftClothDemo::setupScene(const ConstructionInfo& ci)
|
|||||||
err = glGetError();
|
err = glGetError();
|
||||||
assert(err==GL_NO_ERROR);
|
assert(err==GL_NO_ERROR);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,10 +29,17 @@ float MOUSE_MOVE_MULTIPLIER = 0.4f;
|
|||||||
#include "b3gWindowInterface.h"
|
#include "b3gWindowInterface.h"
|
||||||
#include "Bullet3Common/b3MinMax.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
|
#ifndef glDrawElementsInstanced
|
||||||
#define glDrawElementsInstanced glDrawElementsInstancedARB
|
#define glDrawElementsInstanced glDrawElementsInstancedARB
|
||||||
#endif
|
#endif
|
||||||
|
#endif //__APPLE__
|
||||||
#include "GLInstancingRenderer.h"
|
#include "GLInstancingRenderer.h"
|
||||||
|
|
||||||
#include <string.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_S, GL_CLAMP_TO_EDGE);
|
||||||
// glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, 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_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=new GLRenderToTexture();
|
||||||
m_data->m_shadowMap->init(shadowMapWidth, shadowMapHeight,m_data->m_shadowTexture,RENDERTEXTURE_DEPTH);
|
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(4);
|
||||||
glEnableVertexAttribArray(5);
|
glEnableVertexAttribArray(5);
|
||||||
glEnableVertexAttribArray(6);
|
glEnableVertexAttribArray(6);
|
||||||
glVertexAttribDivisorARB(0, 0);
|
glVertexAttribDivisor(0, 0);
|
||||||
glVertexAttribDivisorARB(1, 1);
|
glVertexAttribDivisor(1, 1);
|
||||||
glVertexAttribDivisorARB(2, 1);
|
glVertexAttribDivisor(2, 1);
|
||||||
glVertexAttribDivisorARB(3, 0);
|
glVertexAttribDivisor(3, 0);
|
||||||
glVertexAttribDivisorARB(4, 0);
|
glVertexAttribDivisor(4, 0);
|
||||||
glVertexAttribDivisorARB(5, 1);
|
glVertexAttribDivisor(5, 1);
|
||||||
glVertexAttribDivisorARB(6, 1);
|
glVertexAttribDivisor(6, 1);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ subject to the following restrictions:
|
|||||||
#if defined(__APPLE__) && !defined (VMDMESA)
|
#if defined(__APPLE__) && !defined (VMDMESA)
|
||||||
#include <OpenGL/OpenGL.h>
|
#include <OpenGL/OpenGL.h>
|
||||||
//#include <OpenGL/gl.h>
|
//#include <OpenGL/gl.h>
|
||||||
#include <OpenGL/glu.h>
|
//#include <OpenGL/glu.h>
|
||||||
//#import <Cocoa/Cocoa.h>
|
//#import <Cocoa/Cocoa.h>
|
||||||
#include <OpenGL/gl3.h>
|
#include <OpenGL/gl3.h>
|
||||||
#else
|
#else
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#ifndef SHAPE_DATA_H
|
#ifndef SHAPE_DATA_H
|
||||||
#define SHAPE_DATA_H
|
#define SHAPE_DATA_H
|
||||||
|
|
||||||
#if USE_BARREL_VERTICES
|
#ifdef USE_BARREL_VERTICES
|
||||||
static float 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.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,
|
0.282362f,-0.5f,-0.205148f, 1.0f, 0.0f,-1.0f,0.0f, 0.5f, 0.5f,
|
||||||
|
|||||||
@@ -20,8 +20,8 @@
|
|||||||
#include "Bullet3Common/b3Vector3.h"
|
#include "Bullet3Common/b3Vector3.h"
|
||||||
#include "Bullet3Common/b3Logging.h"
|
#include "Bullet3Common/b3Logging.h"
|
||||||
|
|
||||||
#include "OpenGLTrueTypeFont/fontstash.h"
|
#include "../btgui/OpenGLTrueTypeFont/fontstash.h"
|
||||||
#include "OpenGLWindow/TwFonts.h"
|
#include "../btgui/OpenGLWindow/TwFonts.h"
|
||||||
#include "OpenGLTrueTypeFont/opengl_fontstashcallbacks.h"
|
#include "OpenGLTrueTypeFont/opengl_fontstashcallbacks.h"
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
|
|||||||
@@ -4,11 +4,9 @@
|
|||||||
|
|
||||||
kind "StaticLib"
|
kind "StaticLib"
|
||||||
|
|
||||||
targetdir "../../bin"
|
|
||||||
|
|
||||||
includedirs {".."}
|
includedirs {".."}
|
||||||
|
|
||||||
files {
|
files {
|
||||||
"**.cpp",
|
"**.cpp",
|
||||||
"**.h"
|
"**.h"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user