From 6d62a18a51303da845df1c04cd2b357853b7e7ed Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Fri, 13 Jun 2008 21:24:21 +0000 Subject: Apricot Branch: GLSL ==================== * Added support for lamps and shaders. All material diffuse and specular shaders are supported, for lamps especially area light support is not there yet. * Added support for these GLSL shaders in the game engine, though it is incomplete and somewhat of a hack. Specifically all the variables are completely static, which means moving lights, or animating material properties will not work. * Enabling GLSL shaders is now different. They work in textured drawmode, and can be enabled in the Game menu with the option "Blender GLSL Materials" Known issues: * The GLSL shaders don't always update correct on light changes. * The game player appears to crash with these GLSL shaders, while regular blender works fine. --- source/gameengine/Converter/BL_BlenderDataConversion.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source/gameengine/Converter/BL_BlenderDataConversion.cpp') diff --git a/source/gameengine/Converter/BL_BlenderDataConversion.cpp b/source/gameengine/Converter/BL_BlenderDataConversion.cpp index 82d16ffa181..1be462c113f 100644 --- a/source/gameengine/Converter/BL_BlenderDataConversion.cpp +++ b/source/gameengine/Converter/BL_BlenderDataConversion.cpp @@ -509,6 +509,7 @@ BL_Material* ConvertMaterial( } } } + // above one tex the switches here // are not used switch(valid_index) { @@ -829,7 +830,6 @@ RAS_MeshObject* BL_ConvertMesh(Mesh* mesh, Object* blenderobj, RAS_IRenderTools* } } - meshobj->SetName(mesh->id.name); meshobj->m_xyz_index_to_vertex_index_mapping.resize(mesh->totvert); for (int f=0;ftotface;f++,mface++) @@ -891,6 +891,7 @@ RAS_MeshObject* BL_ConvertMesh(Mesh* mesh, Object* blenderobj, RAS_IRenderTools* ma = give_current_material(blenderobj, 1); bl_mat = ConvertMaterial(mesh, ma, tface, mface, mmcol, lightlayer, blenderobj, layers); + bl_mat->glslmat = converter->GetGLSLMaterials(); // set the index were dealing with bl_mat->material_index = (int)mface->mat_nr; -- cgit v1.2.3