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:
authorSergey Sharybin <sergey.vfx@gmail.com>2012-02-25 22:09:39 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2012-02-25 22:09:39 +0400
commit79f9964cdb99d44dc41785d37a9712ad97b51d4d (patch)
treefad96a833511fcfc592eb4b3784f0d743a73d8d6 /source/blender/gpu
parent3fc2fbc333e47c2bbc3cabd33a2cd6ada3c714fd (diff)
Changes in double side lighting usage
Disabled double-side lighting by default and changed areas which are using double sided lighting to switch it off just after doing stuff which requires double side. This makes code a bit more simple to follow (no all that disabling double side lighting all over the code and so). This change also fixes crash of blender caused by intel gme965 driver which leads to stack corruption in some place when double side lighting isn't disabled (probably driver still kind of using double side in some areas or so). Hopefully it'll also fix #30293: Converting Text to Mesh Thanks to Campbell to assist writing this patch!
Diffstat (limited to 'source/blender/gpu')
-rw-r--r--source/blender/gpu/intern/gpu_extensions.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/gpu/intern/gpu_extensions.c b/source/blender/gpu/intern/gpu_extensions.c
index a3e3eb19a5b..002563ada4b 100644
--- a/source/blender/gpu/intern/gpu_extensions.c
+++ b/source/blender/gpu/intern/gpu_extensions.c
@@ -179,6 +179,10 @@ void GPU_extensions_init(void)
GG.npotdisabled = 1;
}
+ /* make sure double side isn't used by defautl and only getting enabled in places where it's
+ * really needed to prevent different unexpected behaviors like with intel gme965 card (sergey) */
+ glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, 0);
+
GG.os = GPU_OS_UNIX;
#ifdef _WIN32
GG.os = GPU_OS_WIN;