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:
authorErwin Coumans <blender@erwincoumans.com>2006-01-15 14:34:55 +0300
committerErwin Coumans <blender@erwincoumans.com>2006-01-15 14:34:55 +0300
commit6f3e5931052727358201e6648bd6011d99085414 (patch)
treeb3893dc8bacb90a02dc9c9ed251b590a429496fe /source/gameengine/Ketsji/KX_PythonInit.cpp
parente35f73cd00f878706cd953fc3514e0b68b1b6f65 (diff)
more graphics patches from Snailrose,
remove constraint fixed, Bullet timestep now subdivides Blender game engine timestep, so it runs 60 hertz, SphereShape reverted to old style, so no support for non-uniform scaled spheres for now,
Diffstat (limited to 'source/gameengine/Ketsji/KX_PythonInit.cpp')
-rw-r--r--source/gameengine/Ketsji/KX_PythonInit.cpp100
1 files changed, 74 insertions, 26 deletions
diff --git a/source/gameengine/Ketsji/KX_PythonInit.cpp b/source/gameengine/Ketsji/KX_PythonInit.cpp
index e2a11c0035e..ba4f0e55615 100644
--- a/source/gameengine/Ketsji/KX_PythonInit.cpp
+++ b/source/gameengine/Ketsji/KX_PythonInit.cpp
@@ -277,39 +277,74 @@ 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."));
+#ifdef GL_ARB_shader_objects
+ pprint(" GL_ARB_shader_objects supported? "<< (ext._ARB_shader_objects?"yes.":"no."));
count = 1;
- #endif
- #ifdef GL_ARB_vertex_shader
- pprint(" GL_ARB_vertex_shader supported? "<< (ext._ARB_vertex_shader? "yes.":"no."));
- count = 1;
- #endif
- #ifdef GL_ARB_fragment_shader
- pprint(" GL_ARB_fragment_shader supported? "<< (ext._ARB_fragment_shader? "yes.":"no."));
- count = 1;
- #endif
- #ifdef GL_ARB_texture_cube_map
- pprint(" GL_ARB_texture_cube_map supported? "<< (ext._ARB_texture_cube_map? "yes.":"no."));
+#endif
+
+#ifdef GL_ARB_vertex_shader
+ support= ext._ARB_vertex_shader;
+ pprint(" GL_ARB_vertex_shader supported? "<< (support?"yes.":"no."));
count = 1;
- #endif
- #ifdef GL_EXT_texture3D
- pprint(" GL_EXT_texture3D supported? "<< (ext._EXT_texture3D? "yes.":"no."));
+ if(support){
+ pprint(" ----------Details----------");
+ int max=0;
+ glGetIntegerv(GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB, (GLint*)&max);
+ pprint(" Max uniform components." << max);
+
+ glGetIntegerv(GL_MAX_VARYING_FLOATS_ARB, (GLint*)&max);
+ pprint(" Max varying floats." << max);
+
+ glGetIntegerv(GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB, (GLint*)&max);
+ pprint(" Max vertex texture units." << max);
+
+ glGetIntegerv(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB, (GLint*)&max);
+ pprint(" Max combined texture units." << max);
+ pprint("");
+ }
+#endif
+#ifdef GL_ARB_fragment_shader
+ support=ext._ARB_fragment_shader;
+ pprint(" GL_ARB_fragment_shader supported? "<< (support?"yes.":"no."));
count = 1;
- #endif
- #ifdef GL_EXT_blend_color
- pprint(" GL_EXT_blend_color supported? "<< (ext._EXT_blend_color? "yes.":"no."));
+ if(support){
+ pprint(" ----------Details----------");
+ int max=0;
+ glGetIntegerv(GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB, (GLint*)&max);
+ pprint(" Max uniform components." << max);
+ pprint("");
+ }
+#endif
+#ifdef GL_ARB_texture_cube_map
+ support = ext._ARB_texture_cube_map;
+ pprint(" GL_ARB_texture_cube_map supported? "<< (support?"yes.":"no."));
count = 1;
- #endif
- #ifdef GL_ARB_multitexture
- pprint(" GL_ARB_multitexture supported? "<< (ext._ARB_multitexture? "yes.":"no."));
+ if(support){
+ pprint(" ----------Details----------");
+ int size=0;
+ glGetIntegerv(GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB, (GLint*)&size);
+ pprint(" Max cubemap size." << size);
+ pprint("");
+ }
+#endif
+#ifdef GL_ARB_multitexture
+ support = ext._ARB_multitexture;
count = 1;
- #endif
- #ifdef GL_ARB_texture_env_combine
- pprint(" GL_ARB_texture_env_combine supported? "<< (ext._ARB_texture_env_combine? "yes.":"no."));
+ 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."));
count = 1;
- #endif
+#endif
if(!count)
pprint("No extenstions are used in this build");
@@ -707,6 +742,19 @@ PyObject* initGameLogic(KX_Scene* scene) // quick hack to get gravity hook
KX_MACRO_addTypesToDict(d, KX_ACTIONACT_LOOPEND, BL_ActionActuator::KX_ACT_ACTION_LOOPEND);
KX_MACRO_addTypesToDict(d, KX_ACTIONACT_PROPERTY, BL_ActionActuator::KX_ACT_ACTION_PROPERTY);
+ /*8. GL_BlendFunc */
+ KX_MACRO_addTypesToDict(d, BL_ZERO, GL_ZERO);
+ KX_MACRO_addTypesToDict(d, BL_ONE, GL_ONE);
+ KX_MACRO_addTypesToDict(d, BL_SRC_COLOR, GL_SRC_COLOR);
+ KX_MACRO_addTypesToDict(d, BL_ONE_MINUS_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR);
+ KX_MACRO_addTypesToDict(d, BL_DST_COLOR, GL_DST_COLOR);
+ KX_MACRO_addTypesToDict(d, BL_ONE_MINUS_DST_COLOR, GL_ONE_MINUS_DST_COLOR);
+ KX_MACRO_addTypesToDict(d, BL_SRC_ALPHA, GL_SRC_ALPHA);
+ KX_MACRO_addTypesToDict(d, BL_ONE_MINUS_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+ KX_MACRO_addTypesToDict(d, BL_DST_ALPHA, GL_DST_ALPHA);
+ KX_MACRO_addTypesToDict(d, BL_ONE_MINUS_DST_ALPHA, GL_ONE_MINUS_DST_ALPHA);
+ KX_MACRO_addTypesToDict(d, BL_SRC_ALPHA_SATURATE, GL_SRC_ALPHA_SATURATE);
+
// Check for errors
if (PyErr_Occurred())
{