[Bf-committers] [Bf-blender-cvs] SVN commit: /data/svn/bf-blender [41535] trunk/blender/source/blender/ editors/screen/area.c: UI: fix region embossing being drawn 1 pixel misaligned, due to wrong opengl state.
Brecht Van Lommel
brechtvanlommel at pandora.be
Tue Mar 6 15:48:22 CET 2012
Ouch, not sure where this change came from, fixed now.
Brecht.
On Tue, Mar 6, 2012 at 10:18 AM, Nicholas Bishop
<nicholasbishop at gmail.com> wrote:
> Moving 'ar->do_draw= 0' to above the 'at->draw(C, ar)' is causing
> sculpt redraw to redraw the full mesh rather than just the
> partial-redraw rectangle. Will moving it down again break the region
> embossing fix?
>
> -Nicholas
>
> On Fri, Nov 4, 2011 at 5:29 PM, Brecht Van Lommel
> <brechtvanlommel at pandora.be> wrote:
>> Revision: 41535
>> http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=41535
>> Author: blendix
>> Date: 2011-11-04 21:29:28 +0000 (Fri, 04 Nov 2011)
>> Log Message:
>> -----------
>> UI: fix region embossing being drawn 1 pixel misaligned, due to wrong opengl state.
>>
>> Modified Paths:
>> --------------
>> trunk/blender/source/blender/editors/screen/area.c
>>
>> Modified: trunk/blender/source/blender/editors/screen/area.c
>> ===================================================================
>> --- trunk/blender/source/blender/editors/screen/area.c 2011-11-04 21:19:51 UTC (rev 41534)
>> +++ trunk/blender/source/blender/editors/screen/area.c 2011-11-04 21:29:28 UTC (rev 41535)
>> @@ -84,19 +84,19 @@
>> glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA );
>>
>> /* right */
>> - glColor4ub(0,0,0, 50);
>> + glColor4ub(0,0,0, 30);
>> sdrawline(rect.xmax, rect.ymin, rect.xmax, rect.ymax);
>>
>> /* bottom */
>> - glColor4ub(0,0,0, 80);
>> + glColor4ub(0,0,0, 30);
>> sdrawline(rect.xmin, rect.ymin, rect.xmax, rect.ymin);
>>
>> /* top */
>> - glColor4ub(255,255,255, 60);
>> + glColor4ub(255,255,255, 30);
>> sdrawline(rect.xmin, rect.ymax, rect.xmax, rect.ymax);
>>
>> /* left */
>> - glColor4ub(255,255,255, 50);
>> + glColor4ub(255,255,255, 30);
>> sdrawline(rect.xmin, rect.ymin, rect.xmin, rect.ymax);
>>
>> glDisable( GL_BLEND );
>> @@ -414,6 +414,9 @@
>>
>> /* note; this sets state, so we can use wmOrtho and friends */
>> wmSubWindowScissorSet(win, ar->swinid, &ar->drawrct);
>> +
>> + ar->do_draw= 0;
>> + memset(&ar->drawrct, 0, sizeof(ar->drawrct));
>>
>> UI_SetTheme(sa?sa->spacetype:0, ar->type?ar->type->regionid:0);
>>
>> @@ -429,18 +432,15 @@
>> at->draw(C, ar);
>> }
>>
>> + /* XXX test: add convention to end regions always in pixel space, for drawing of borders/gestures etc */
>> + ED_region_pixelspace(ar);
>> +
>> ED_region_draw_cb_draw(C, ar, REGION_DRAW_POST_PIXEL);
>>
>> uiFreeInactiveBlocks(C, &ar->uiblocks);
>> -
>> +
>> if(sa)
>> region_draw_emboss(ar, &winrct);
>> -
>> - /* XXX test: add convention to end regions always in pixel space, for drawing of borders/gestures etc */
>> - ED_region_pixelspace(ar);
>> -
>> - ar->do_draw= 0;
>> - memset(&ar->drawrct, 0, sizeof(ar->drawrct));
>> }
>>
>> /* **********************************
>>
>> _______________________________________________
>> Bf-blender-cvs mailing list
>> Bf-blender-cvs at blender.org
>> http://lists.blender.org/mailman/listinfo/bf-blender-cvs
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers
More information about the Bf-committers
mailing list