diff options
author | Ton Roosendaal <ton@blender.org> | 2006-07-31 23:23:42 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2006-07-31 23:23:42 +0400 |
commit | c2edcd48794b210c9b3fcd439830211350f8d140 (patch) | |
tree | bd0a192c20bd6e861b39e1ae319e463d9718b8b2 /source/blender/src/glutil.c | |
parent | e168d67b3205977777715f143554a15f259c0a40 (diff) |
Siggraph show commit!
- pending commit for OSX intel systems, with intel graphics. These now call
an extra swapbuffers after glFlush(). Code is ifdeffed, and doesnt affect
other systems.
- show-off commit: option to have transparent nodes over the composite
result. Only draws Image for active Viewer Node now, and image doesnt
translate nor zoom (which isnt bad though).
Set in themes the alpha color of "node backdrop" to make nodes
transparent.
Diffstat (limited to 'source/blender/src/glutil.c')
-rw-r--r-- | source/blender/src/glutil.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/source/blender/src/glutil.c b/source/blender/src/glutil.c index ef6728c1a0a..dced81579c3 100644 --- a/source/blender/src/glutil.c +++ b/source/blender/src/glutil.c @@ -32,6 +32,7 @@ * ***** END GPL/BL DUAL LICENSE BLOCK ***** */ +#include <stdio.h> #include <math.h> #include "MEM_guardedalloc.h" @@ -46,6 +47,7 @@ #include "BIF_gl.h" #include "BIF_glutil.h" +#include "BIF_mywindow.h" /* Invert line handling */ @@ -621,6 +623,24 @@ void bglPolygonOffset(float dist) } } +static int is_a_really_crappy_intel_card(void) +{ + static int well_is_it= -1; + + /* Do you understand the implication? Do you? */ + if (well_is_it==-1) + well_is_it= (strcmp((char*) glGetString(GL_VENDOR), "Intel Inc.") == 0); + + return well_is_it; +} +void bglFlush(void) +{ + glFlush(); +#ifdef __APPLE__ + if(is_a_really_crappy_intel_card()) + myswapbuffers(); //hack to get mac intel graphics to show frontbuffer +#endif +} |