From cb89decfdcf5e6b2f26376d416633f4ccf0c532d Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Thu, 4 Sep 2008 20:51:28 +0000 Subject: Merge of first part of changes from the apricot branch, especially the features that are needed to run the game. Compile tested with scons, make, but not cmake, that seems to have an issue not related to these changes. The changes include: * GLSL support in the viewport and game engine, enable in the game menu in textured draw mode. * Synced and merged part of the duplicated blender and gameengine/ gameplayer drawing code. * Further refactoring of game engine drawing code, especially mesh storage changed a lot. * Optimizations in game engine armatures to avoid recomputations. * A python function to get the framerate estimate in game. * An option take object color into account in materials. * An option to restrict shadow casters to a lamp's layers. * Increase from 10 to 18 texture slots for materials, lamps, word. An extra texture slot shows up once the last slot is used. * Memory limit for undo, not enabled by default yet because it needs the .B.blend to be changed. * Multiple undo for image painting. * An offset for dupligroups, so not all objects in a group have to be at the origin. --- extern/glew/SConscript | 2 +- extern/glew/include/GL/glew.h | 7 ++++++- extern/glew/src/glew.c | 2 ++ 3 files changed, 9 insertions(+), 2 deletions(-) (limited to 'extern/glew') diff --git a/extern/glew/SConscript b/extern/glew/SConscript index 32b3b478113..3badbeb040e 100644 --- a/extern/glew/SConscript +++ b/extern/glew/SConscript @@ -9,4 +9,4 @@ sources = ['src/glew.c'] defs = '' incs = 'include' -env.BlenderLib ( 'extern_glew', sources, Split(incs), Split(defs), libtype=['intern', 'player'], priority=[25, 50]) +env.BlenderLib ( 'extern_glew', sources, Split(incs), Split(defs), libtype=['blender', 'player'], priority=[50, 50]) diff --git a/extern/glew/include/GL/glew.h b/extern/glew/include/GL/glew.h index fd3fe10b938..6b88e6eb4c9 100644 --- a/extern/glew/include/GL/glew.h +++ b/extern/glew/include/GL/glew.h @@ -58,8 +58,11 @@ ** version 1.2.1 Specification. */ -/* added this here for blender, should be moved elsewhere */ +#define BLENDER_CHANGES + +#ifdef BLENDER_CHANGES #define GLEW_STATIC +#endif #ifndef __glew_h__ #define __glew_h__ @@ -1805,6 +1808,7 @@ typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4UIVPROC) (GLuint index, const GLuin typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4USVPROC) (GLuint index, const GLushort* v); typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* pointer); +#ifndef BLENDER_CHANGES #define glAttachShader GLEW_GET_FUN(__glewAttachShader) #define glBindAttribLocation GLEW_GET_FUN(__glewBindAttribLocation) #define glBlendEquationSeparate GLEW_GET_FUN(__glewBlendEquationSeparate) @@ -1898,6 +1902,7 @@ typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint si #define glVertexAttrib4uiv GLEW_GET_FUN(__glewVertexAttrib4uiv) #define glVertexAttrib4usv GLEW_GET_FUN(__glewVertexAttrib4usv) #define glVertexAttribPointer GLEW_GET_FUN(__glewVertexAttribPointer) +#endif #define GLEW_VERSION_2_0 GLEW_GET_VAR(__GLEW_VERSION_2_0) diff --git a/extern/glew/src/glew.c b/extern/glew/src/glew.c index 593f0e58f7c..f20463630dc 100644 --- a/extern/glew/src/glew.c +++ b/extern/glew/src/glew.c @@ -1836,6 +1836,7 @@ static GLboolean _glewInit_GL_VERSION_2_0 (GLEW_CONTEXT_ARG_DEF_INIT) { GLboolean r = GL_FALSE; +#ifndef BLENDER_CHANGES r = ((glAttachShader = (PFNGLATTACHSHADERPROC)glewGetProcAddress((const GLubyte*)"glAttachShader")) == NULL) || r; r = ((glBindAttribLocation = (PFNGLBINDATTRIBLOCATIONPROC)glewGetProcAddress((const GLubyte*)"glBindAttribLocation")) == NULL) || r; r = ((glBlendEquationSeparate = (PFNGLBLENDEQUATIONSEPARATEPROC)glewGetProcAddress((const GLubyte*)"glBlendEquationSeparate")) == NULL) || r; @@ -1929,6 +1930,7 @@ static GLboolean _glewInit_GL_VERSION_2_0 (GLEW_CONTEXT_ARG_DEF_INIT) r = ((glVertexAttrib4uiv = (PFNGLVERTEXATTRIB4UIVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib4uiv")) == NULL) || r; r = ((glVertexAttrib4usv = (PFNGLVERTEXATTRIB4USVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib4usv")) == NULL) || r; r = ((glVertexAttribPointer = (PFNGLVERTEXATTRIBPOINTERPROC)glewGetProcAddress((const GLubyte*)"glVertexAttribPointer")) == NULL) || r; +#endif return r; } -- cgit v1.2.3