Feature + Fix:

- while sampling color in image window, you now get the sampled color as a line
drawn in the node editor Curve nodes, allowing quicker view of what values you
actually change.

- reverted temporary the patch [#6779] by Matthew Plough
  He replaced image drawing of backdrop-node-editor with our Texture drawing
  function. That call is extremely slow, and should be by definition slower
  than glDrawPixels (unless you don't upload the image each time to gfx mem).

  Drawing large frames (2k, 4k) in node editor became unacceptable slow, even 
  with the neatest hardware around. (tested nvidia, ati) 

  Probably (Campbell thinks) this is a bypass for Linux ATI cards? 
  Anyhoo, this should be investigated further before applying. It better then
  becomes a user pref, or even much better: part of the OpenGL profiler we need.
This commit is contained in:
2008-01-14 19:03:27 +00:00
parent cdcba166f6
commit 28667a314e
5 changed files with 113 additions and 15 deletions

View File

@@ -2234,10 +2234,35 @@ static void ui_draw_but_CURVE(uiBut *but)
if(cumap->flag & CUMA_DRAW_CFRA) {
glColor3ub(0x60, 0xc0, 0x40);
glBegin(GL_LINES);
glVertex2f(but->x1 + zoomx*(cumap->black[0]-offsx), but->y1);
glVertex2f(but->x1 + zoomx*(cumap->black[0]-offsx), but->y2);
glVertex2f(but->x1 + zoomx*(cumap->sample[0]-offsx), but->y1);
glVertex2f(but->x1 + zoomx*(cumap->sample[0]-offsx), but->y2);
glEnd();
}
/* sample option */
if(cumap->flag & CUMA_DRAW_SAMPLE) {
if(cumap->cur==3) {
float lum= cumap->sample[0]*0.35f + cumap->sample[1]*0.45f + cumap->sample[2]*0.2f;
glColor3ub(240, 240, 240);
glBegin(GL_LINES);
glVertex2f(but->x1 + zoomx*(lum-offsx), but->y1);
glVertex2f(but->x1 + zoomx*(lum-offsx), but->y2);
glEnd();
}
else {
if(cumap->cur==0)
glColor3ub(240, 100, 100);
else if(cumap->cur==1)
glColor3ub(100, 240, 100);
else
glColor3ub(100, 100, 240);
glBegin(GL_LINES);
glVertex2f(but->x1 + zoomx*(cumap->sample[cumap->cur]-offsx), but->y1);
glVertex2f(but->x1 + zoomx*(cumap->sample[cumap->cur]-offsx), but->y2);
glEnd();
}
}
/* the curve */
BIF_ThemeColorBlend(TH_TEXT, TH_BUT_NEUTRAL, 0.35);