Cleanup: make texture coordinates const
This commit is contained in:
parent
8398050695
commit
958fc6944f
|
@ -1311,7 +1311,7 @@ struct bNodeTreeExec *ntreeTexBeginExecTree(struct bNodeTree *ntree);
|
|||
void ntreeTexEndExecTree(struct bNodeTreeExec *exec);
|
||||
int ntreeTexExecTree(struct bNodeTree *ntree,
|
||||
struct TexResult *target,
|
||||
float co[3],
|
||||
const float co[3],
|
||||
float dxt[3],
|
||||
float dyt[3],
|
||||
int osatex,
|
||||
|
|
|
@ -85,14 +85,14 @@ bool BKE_texture_is_image_user(const struct Tex *tex);
|
|||
|
||||
void BKE_texture_get_value_ex(const struct Scene *scene,
|
||||
struct Tex *texture,
|
||||
float *tex_co,
|
||||
const float *tex_co,
|
||||
struct TexResult *texres,
|
||||
struct ImagePool *pool,
|
||||
bool use_color_management);
|
||||
|
||||
void BKE_texture_get_value(const struct Scene *scene,
|
||||
struct Tex *texture,
|
||||
float *tex_co,
|
||||
const float *tex_co,
|
||||
struct TexResult *texres,
|
||||
bool use_color_management);
|
||||
|
||||
|
|
|
@ -747,7 +747,7 @@ bool BKE_texture_dependsOnTime(const struct Tex *texture)
|
|||
|
||||
void BKE_texture_get_value_ex(const Scene *scene,
|
||||
Tex *texture,
|
||||
float *tex_co,
|
||||
const float *tex_co,
|
||||
TexResult *texres,
|
||||
struct ImagePool *pool,
|
||||
bool use_color_management)
|
||||
|
@ -774,8 +774,11 @@ void BKE_texture_get_value_ex(const Scene *scene,
|
|||
}
|
||||
}
|
||||
|
||||
void BKE_texture_get_value(
|
||||
const Scene *scene, Tex *texture, float *tex_co, TexResult *texres, bool use_color_management)
|
||||
void BKE_texture_get_value(const Scene *scene,
|
||||
Tex *texture,
|
||||
const float *tex_co,
|
||||
TexResult *texres,
|
||||
bool use_color_management)
|
||||
{
|
||||
BKE_texture_get_value_ex(scene, texture, tex_co, texres, NULL, use_color_management);
|
||||
}
|
||||
|
|
|
@ -277,7 +277,7 @@ void ntreeTexEndExecTree(bNodeTreeExec *exec)
|
|||
|
||||
int ntreeTexExecTree(bNodeTree *ntree,
|
||||
TexResult *target,
|
||||
float co[3],
|
||||
const float co[3],
|
||||
float dxt[3],
|
||||
float dyt[3],
|
||||
int osatex,
|
||||
|
|
|
@ -70,7 +70,7 @@ extern "C" {
|
|||
typedef struct TexCallData {
|
||||
TexResult *target;
|
||||
/* all float[3] */
|
||||
float *co;
|
||||
const float *co;
|
||||
float *dxt, *dyt;
|
||||
|
||||
int osatex;
|
||||
|
@ -84,7 +84,7 @@ typedef struct TexCallData {
|
|||
} TexCallData;
|
||||
|
||||
typedef struct TexParams {
|
||||
float *co;
|
||||
const float *co;
|
||||
float *dxt, *dyt;
|
||||
const float *previewco;
|
||||
int cfra;
|
||||
|
|
|
@ -61,14 +61,14 @@ int multitex_ext(struct Tex *tex,
|
|||
const bool skip_load_image);
|
||||
/* nodes disabled */
|
||||
int multitex_ext_safe(struct Tex *tex,
|
||||
float texvec[3],
|
||||
const float texvec[3],
|
||||
struct TexResult *texres,
|
||||
struct ImagePool *pool,
|
||||
bool scene_color_manage,
|
||||
const bool skip_load_image);
|
||||
/* only for internal node usage */
|
||||
int multitex_nodes(struct Tex *tex,
|
||||
float texvec[3],
|
||||
const float texvec[3],
|
||||
float dxt[3],
|
||||
float dyt[3],
|
||||
int osatex,
|
||||
|
|
|
@ -1150,7 +1150,7 @@ static void do_2d_mapping(
|
|||
/* ************************************** */
|
||||
|
||||
static int multitex(Tex *tex,
|
||||
float texvec[3],
|
||||
const float texvec[3],
|
||||
float dxt[3],
|
||||
float dyt[3],
|
||||
int osatex,
|
||||
|
@ -1280,7 +1280,7 @@ static int multitex(Tex *tex,
|
|||
}
|
||||
|
||||
static int multitex_nodes_intern(Tex *tex,
|
||||
float texvec[3],
|
||||
const float texvec[3],
|
||||
float dxt[3],
|
||||
float dyt[3],
|
||||
int osatex,
|
||||
|
@ -1307,10 +1307,12 @@ static int multitex_nodes_intern(Tex *tex,
|
|||
int rgbnor;
|
||||
|
||||
if (mtex) {
|
||||
float texvec_l[3];
|
||||
copy_v3_v3(texvec_l, texvec);
|
||||
/* we have mtex, use it for 2d mapping images only */
|
||||
do_2d_mapping(mtex, texvec, NULL, dxt, dyt);
|
||||
do_2d_mapping(mtex, texvec_l, NULL, dxt, dyt);
|
||||
rgbnor = multitex(tex,
|
||||
texvec,
|
||||
texvec_l,
|
||||
dxt,
|
||||
dyt,
|
||||
osatex,
|
||||
|
@ -1400,7 +1402,7 @@ static int multitex_nodes_intern(Tex *tex,
|
|||
* Use it from render pipeline only!
|
||||
*/
|
||||
int multitex_nodes(Tex *tex,
|
||||
float texvec[3],
|
||||
const float texvec[3],
|
||||
float dxt[3],
|
||||
float dyt[3],
|
||||
int osatex,
|
||||
|
@ -1465,7 +1467,7 @@ int multitex_ext(Tex *tex,
|
|||
* Use it for stuff which is out of render pipeline.
|
||||
*/
|
||||
int multitex_ext_safe(Tex *tex,
|
||||
float texvec[3],
|
||||
const float texvec[3],
|
||||
TexResult *texres,
|
||||
struct ImagePool *pool,
|
||||
bool scene_color_manage,
|
||||
|
|
Loading…
Reference in New Issue