diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-02-01 02:45:51 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-02-01 02:45:51 +0300 |
commit | 87bbb2d827064a4fd59ffc77cc2dcbc31f02ce4f (patch) | |
tree | 5d9ddb0e6859850825de07d18475797957d1a969 /source/blender/editors | |
parent | 873f2c71252da872f3fd1d9aa2140e3067ba6890 (diff) |
WM Draw Methods now has a new option Automatic (default). This will
set the draw method to triple buffer or overlap depending on the
configuration. Ideally I could get all cases working well with triple
buffer but it's hard in practice. At the moment there are two cases
that use overlap instead:
* opensource ATI drives on linux
* windows software renderer
Also added a utility function to check GPU device/os/driver.
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/include/BIF_glutil.h | 1 | ||||
-rw-r--r-- | source/blender/editors/interface/resources.c | 5 | ||||
-rw-r--r-- | source/blender/editors/screen/glutil.c | 13 | ||||
-rw-r--r-- | source/blender/editors/space_node/node_draw.c | 4 |
4 files changed, 7 insertions, 16 deletions
diff --git a/source/blender/editors/include/BIF_glutil.h b/source/blender/editors/include/BIF_glutil.h index e394de613e4..53c725b811c 100644 --- a/source/blender/editors/include/BIF_glutil.h +++ b/source/blender/editors/include/BIF_glutil.h @@ -203,7 +203,6 @@ void bglVertex3f(float x, float y, float z); void bglVertex2fv(float *vec); /* intel gfx cards frontbuffer problem */ void bglFlush(void); -int is_a_really_crappy_intel_card(void); void set_inverted_drawing(int enable); void setlinestyle(int nr); diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c index 9468eb7a0c6..313b03fdec3 100644 --- a/source/blender/editors/interface/resources.c +++ b/source/blender/editors/interface/resources.c @@ -1355,6 +1355,11 @@ void init_userdef_do_versions(void) strcpy(km->idname, "Property Editor"); } } + if (G.main->versionfile < 250 || (G.main->versionfile == 250 && G.main->subversionfile < 16)) { + if(U.wmdrawmethod == USER_DRAW_TRIPLE) + U.wmdrawmethod = USER_DRAW_AUTOMATIC; + } + /* GL Texture Garbage Collection (variable abused above!) */ if (U.textimeout == 0) { diff --git a/source/blender/editors/screen/glutil.c b/source/blender/editors/screen/glutil.c index 752c6feb9af..1ea0c2ccdbd 100644 --- a/source/blender/editors/screen/glutil.c +++ b/source/blender/editors/screen/glutil.c @@ -851,22 +851,11 @@ void bglPolygonOffset(float viewdist, float dist) } } -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()) +// if(GPU_type_matches(GPU_DEVICE_INTEL, GPU_OS_MAC, GPU_DRIVER_OFFICIAL)) // XXX myswapbuffers(); //hack to get mac intel graphics to show frontbuffer #endif } diff --git a/source/blender/editors/space_node/node_draw.c b/source/blender/editors/space_node/node_draw.c index 03bc8340810..27719f124a1 100644 --- a/source/blender/editors/space_node/node_draw.c +++ b/source/blender/editors/space_node/node_draw.c @@ -605,14 +605,12 @@ static void node_draw_preview(bNodePreview *preview, rctf *prv) } } -#ifdef __APPLE__ -// if(is_a_really_crappy_nvidia_card()) { XXX +// if(GPU_type_matches(GPU_DEVICE_NVIDIA, GPU_OS_MAC, GPU_DRIVER_OFFICIAL)) { XXX // float zoomx= curarea->winx/(float)(G.v2d->cur.xmax-G.v2d->cur.xmin); // float zoomy= curarea->winy/(float)(G.v2d->cur.ymax-G.v2d->cur.ymin); // glPixelZoom(zoomx*xscale, zoomy*yscale); // } // else -#endif glPixelZoom(xscale, yscale); glEnable(GL_BLEND); |