[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46082] branches/soc-2011-tomato/source/ blender/editors/space_clip/clip_dopesheet_draw.c: Tomato: fixed opengl issue with intel cards
Sergey Sharybin
sergey.vfx at gmail.com
Sun Apr 29 18:56:57 CEST 2012
Revision: 46082
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=46082
Author: nazgul
Date: 2012-04-29 16:56:56 +0000 (Sun, 29 Apr 2012)
Log Message:
-----------
Tomato: fixed opengl issue with intel cards
Issue was caused by some mixes of glRect called to draw zero-width rectangles
and glCalllist.
Resolved by not using glRect if rectangle is "degenerated".
Modified Paths:
--------------
branches/soc-2011-tomato/source/blender/editors/space_clip/clip_dopesheet_draw.c
Modified: branches/soc-2011-tomato/source/blender/editors/space_clip/clip_dopesheet_draw.c
===================================================================
--- branches/soc-2011-tomato/source/blender/editors/space_clip/clip_dopesheet_draw.c 2012-04-29 16:09:40 UTC (rev 46081)
+++ branches/soc-2011-tomato/source/blender/editors/space_clip/clip_dopesheet_draw.c 2012-04-29 16:56:56 UTC (rev 46082)
@@ -108,7 +108,7 @@
if (displist2 == 0) {
displist2 = glGenLists(1);
glNewList(displist2, GL_COMPILE);
-
+
glBegin(GL_QUADS);
glVertex2fv(_unit_diamond_shape[0]);
glVertex2fv(_unit_diamond_shape[1]);
@@ -180,8 +180,8 @@
continue;
/* check if visible */
- if ( IN_RANGE(yminc, v2d->cur.ymin, v2d->cur.ymax) ||
- IN_RANGE(ymaxc, v2d->cur.ymin, v2d->cur.ymax) )
+ if (IN_RANGE(yminc, v2d->cur.ymin, v2d->cur.ymax) ||
+ IN_RANGE(ymaxc, v2d->cur.ymin, v2d->cur.ymax))
{
float alpha;
int i, sel = track->flag & TRACK_DOPE_SEL;
@@ -228,11 +228,15 @@
else
glColor4fv(strip);
- glRectf(start_marker->framenr, (float) y - STRIP_HEIGHT_HALF,
- start_marker->framenr + len, (float) y + STRIP_HEIGHT_HALF);
-
- draw_keyframe_shape(start_marker->framenr, y, xscale, yscale, sel, alpha);
- draw_keyframe_shape(start_marker->framenr + len, y, xscale, yscale, sel, alpha);
+ if (len) {
+ glRectf(start_marker->framenr, (float) y - STRIP_HEIGHT_HALF,
+ start_marker->framenr + len, (float) y + STRIP_HEIGHT_HALF);
+ draw_keyframe_shape(start_marker->framenr, y, xscale, yscale, sel, alpha);
+ draw_keyframe_shape(start_marker->framenr + len, y, xscale, yscale, sel, alpha);
+ }
+ else {
+ draw_keyframe_shape(start_marker->framenr, y, xscale, yscale, sel, alpha);
+ }
}
i++;
@@ -309,8 +313,8 @@
continue;
/* check if visible */
- if ( IN_RANGE(yminc, v2d->cur.ymin, v2d->cur.ymax) ||
- IN_RANGE(ymaxc, v2d->cur.ymin, v2d->cur.ymax) )
+ if (IN_RANGE(yminc, v2d->cur.ymin, v2d->cur.ymax) ||
+ IN_RANGE(ymaxc, v2d->cur.ymin, v2d->cur.ymax))
{
float font_height, color[3];
int sel = track->flag & TRACK_DOPE_SEL;
@@ -349,8 +353,8 @@
continue;
/* check if visible */
- if ( IN_RANGE(yminc, v2d->cur.ymin, v2d->cur.ymax) ||
- IN_RANGE(ymaxc, v2d->cur.ymin, v2d->cur.ymax) )
+ if (IN_RANGE(yminc, v2d->cur.ymin, v2d->cur.ymax) ||
+ IN_RANGE(ymaxc, v2d->cur.ymin, v2d->cur.ymax))
{
uiBut *but;
PointerRNA ptr;
More information about the Bf-blender-cvs
mailing list