Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/gameengine/Ketsji/KX_PythonInit.cpp')
-rw-r--r--source/gameengine/Ketsji/KX_PythonInit.cpp68
1 files changed, 20 insertions, 48 deletions
diff --git a/source/gameengine/Ketsji/KX_PythonInit.cpp b/source/gameengine/Ketsji/KX_PythonInit.cpp
index a80a7f04e8f..0831788009d 100644
--- a/source/gameengine/Ketsji/KX_PythonInit.cpp
+++ b/source/gameengine/Ketsji/KX_PythonInit.cpp
@@ -28,25 +28,7 @@
* Initialize Python thingies.
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#ifdef WIN32
-#include <windows.h>
-#endif // WIN32
-#ifdef __APPLE__
-#define GL_GLEXT_LEGACY 1
-#include <OpenGL/gl.h>
-#include <OpenGL/glu.h>
-#else
-#include <GL/gl.h>
-/* #if defined(__sun__) && !defined(__sparc__)
-#include <mesa/glu.h>
-#else */
-#include <GL/glu.h>
-/* #endif */
-#endif
+#include "GL/glew.h"
#include <stdlib.h>
@@ -310,17 +292,13 @@ static PyObject* gPyGetCurrentScene(PyObject* self,
static PyObject *pyPrintExt(PyObject *,PyObject *,PyObject *)
{
#define pprint(x) std::cout << x << std::endl;
- bgl::BL_EXTInfo ext = bgl::RAS_EXT_support;
bool count=0;
bool support=0;
pprint("Supported Extensions...");
-#ifdef GL_ARB_shader_objects
- pprint(" GL_ARB_shader_objects supported? "<< (ext._ARB_shader_objects?"yes.":"no."));
+ pprint(" GL_ARB_shader_objects supported? "<< (GLEW_ARB_shader_objects?"yes.":"no."));
count = 1;
-#endif
-#ifdef GL_ARB_vertex_shader
- support= ext._ARB_vertex_shader;
+ support= GLEW_ARB_vertex_shader;
pprint(" GL_ARB_vertex_shader supported? "<< (support?"yes.":"no."));
count = 1;
if(support){
@@ -339,9 +317,8 @@ static PyObject *pyPrintExt(PyObject *,PyObject *,PyObject *)
pprint(" Max combined texture units." << max);
pprint("");
}
-#endif
-#ifdef GL_ARB_fragment_shader
- support=ext._ARB_fragment_shader;
+
+ support=GLEW_ARB_fragment_shader;
pprint(" GL_ARB_fragment_shader supported? "<< (support?"yes.":"no."));
count = 1;
if(support){
@@ -351,9 +328,8 @@ static PyObject *pyPrintExt(PyObject *,PyObject *,PyObject *)
pprint(" Max uniform components." << max);
pprint("");
}
-#endif
-#ifdef GL_ARB_texture_cube_map
- support = ext._ARB_texture_cube_map;
+
+ support = GLEW_ARB_texture_cube_map;
pprint(" GL_ARB_texture_cube_map supported? "<< (support?"yes.":"no."));
count = 1;
if(support){
@@ -363,25 +339,21 @@ static PyObject *pyPrintExt(PyObject *,PyObject *,PyObject *)
pprint(" Max cubemap size." << size);
pprint("");
}
-#endif
-#if defined(GL_ARB_multitexture) && defined(WITH_GLEXT)
- if (!getenv("WITHOUT_GLEXT")) {
- support = ext._ARB_multitexture;
- count = 1;
- pprint(" GL_ARB_multitexture supported? "<< (support?"yes.":"no."));
- if(support){
- pprint(" ----------Details----------");
- int units=0;
- glGetIntegerv(GL_MAX_TEXTURE_UNITS_ARB, (GLint*)&units);
- pprint(" Max texture units available. " << units);
- pprint("");
- }
+
+ support = GLEW_ARB_multitexture;
+ count = 1;
+ pprint(" GL_ARB_multitexture supported? "<< (support?"yes.":"no."));
+ if(support){
+ pprint(" ----------Details----------");
+ int units=0;
+ glGetIntegerv(GL_MAX_TEXTURE_UNITS_ARB, (GLint*)&units);
+ pprint(" Max texture units available. " << units);
+ pprint("");
}
-#endif
-#ifdef GL_ARB_texture_env_combine
- pprint(" GL_ARB_texture_env_combine supported? "<< (ext._ARB_texture_env_combine?"yes.":"no."));
+
+ pprint(" GL_ARB_texture_env_combine supported? "<< (GLEW_ARB_texture_env_combine?"yes.":"no."));
count = 1;
-#endif
+
if(!count)
pprint("No extenstions are used in this build");