diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-01-19 14:04:51 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-01-19 14:04:51 +0400 |
commit | a87c5eb52cd4951b138f518bf12d498bc5e5eb8a (patch) | |
tree | 7b023285cb2ff41924d9e390f3d6a25715284d14 /source/blender/editors/space_view3d/drawmesh.c | |
parent | 47514a0d7129ba49cd9ad039a886c52909ea565d (diff) |
use color conversions functions in more places.
also add rgba_float_to_uchar, rgba_uchar_to_float
Diffstat (limited to 'source/blender/editors/space_view3d/drawmesh.c')
-rw-r--r-- | source/blender/editors/space_view3d/drawmesh.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/source/blender/editors/space_view3d/drawmesh.c b/source/blender/editors/space_view3d/drawmesh.c index b1842578c20..5f521cc3dd1 100644 --- a/source/blender/editors/space_view3d/drawmesh.c +++ b/source/blender/editors/space_view3d/drawmesh.c @@ -349,11 +349,8 @@ static void draw_textured_begin(Scene *scene, View3D *v3d, RegionView3D *rv3d, O Gtexdraw.islit= GPU_scene_object_lights(scene, ob, v3d->lay, rv3d->viewmat, !rv3d->is_persp); } - obcol[0]= CLAMPIS(ob->col[0]*255, 0, 255); - obcol[1]= CLAMPIS(ob->col[1]*255, 0, 255); - obcol[2]= CLAMPIS(ob->col[2]*255, 0, 255); - obcol[3]= CLAMPIS(ob->col[3]*255, 0, 255); - + rgba_float_to_uchar(obcol, ob->col); + glCullFace(GL_BACK); glEnable(GL_CULL_FACE); if(solidtex || v3d->drawtype==OB_TEXTURE) istex= 1; else istex= 0; |