Patch #8461, by Rob Hausauer

This unifies all usage of FTOCHAR, putting it in utildefines.h
Submitter did several interesting tests for speed, check it here:
http://projects.blender.org/tracker/?func=detail&atid=127&aid=8461&group_id=9
This commit is contained in:
Ton Roosendaal
2008-09-20 13:02:06 +00:00
parent 63f10e6b55
commit 2bd6e1ae82
12 changed files with 6 additions and 14 deletions

View File

@@ -38,6 +38,7 @@
#include "DNA_scene_types.h"
#include "DNA_userdef_types.h"
#include "BKE_utildefines.h"
#include "BKE_global.h"
#include "BKE_image.h"
#include "BKE_main.h"
@@ -961,7 +962,6 @@ void RE_GetResultImage(Render *re, RenderResult *rr)
}
}
#define FTOCHAR(val) val<=0.0f?0: (val>=1.0f?255: (char)(255.0f*val))
/* caller is responsible for allocating rect in correct size! */
void RE_ResultGet32(Render *re, unsigned int *rect)
{

View File

@@ -1971,7 +1971,6 @@ void RE_shade_external(Render *re, ShadeInput *shi, ShadeResult *shr)
/* ************************* bake ************************ */
#define FTOCHAR(val) val<=0.0f?0: (val>=1.0f?255: (char)(255.0f*val))
typedef struct BakeShade {
ShadeSample ssamp;