diff options
Diffstat (limited to 'source/blender/editors/screen/glutil.c')
-rw-r--r-- | source/blender/editors/screen/glutil.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/source/blender/editors/screen/glutil.c b/source/blender/editors/screen/glutil.c index 06da91c3e37..9b3a51805e9 100644 --- a/source/blender/editors/screen/glutil.c +++ b/source/blender/editors/screen/glutil.c @@ -26,14 +26,14 @@ */ #include <stdio.h> -#include <math.h> #include <string.h> #include "MEM_guardedalloc.h" #include "DNA_vec_types.h" -#include "BKE_utildefines.h" +#include "BLI_utildefines.h" + #include "BKE_colortools.h" #include "BLI_math.h" @@ -527,7 +527,8 @@ void glaDrawPixelsTex(float x, float y, int img_w, int img_h, int format, void * glaDrawPixelsTexScaled(x, y, img_w, img_h, format, rect, 1.0f, 1.0f); } -void glaDrawPixelsSafe_to32(float fx, float fy, int img_w, int img_h, int row_w, float *rectf, int gamma_correct) +/* row_w is unused but kept for completeness */ +void glaDrawPixelsSafe_to32(float fx, float fy, int img_w, int img_h, int UNUSED(row_w), float *rectf, int do_gamma_correct) { unsigned char *rect32; @@ -536,7 +537,7 @@ void glaDrawPixelsSafe_to32(float fx, float fy, int img_w, int img_h, int row_w, rect32= MEM_mallocN(img_w*img_h*sizeof(int), "temp 32 bits"); - if (gamma_correct) { + if (do_gamma_correct) { floatbuf_to_srgb_byte(rectf, rect32, 0, img_w, 0, img_h, img_w); } else { floatbuf_to_byte(rectf, rect32, 0, img_w, 0, img_h, img_w); @@ -766,13 +767,13 @@ void bglBegin(int mode) int bglPointHack() { float value[4]; - int pointhack; + int pointhack_px; glGetFloatv(GL_POINT_SIZE_RANGE, value); if(value[1]<2.0) { glGetFloatv(GL_POINT_SIZE, value); - pointhack= floor(value[0]+0.5); - if(pointhack>4) pointhack= 4; - return pointhack; + pointhack_px= floor(value[0]+0.5); + if(pointhack_px>4) pointhack_px= 4; + return pointhack_px; } return 0; } |