forked from bartvdbraak/blender
- fix for BL_Shader::SetUniform() missing out the last part of the matrix.
- particle.c wasn't setting all components of the vector when reading cache and setting dummy velocity values. - some functions incorrectly took a float[3] argument when the 4th value was set. - remove a few redundant lines of code.
This commit is contained in:
parent
555f6cbe08
commit
6926060185
@ -3134,7 +3134,7 @@ int object_is_modified(Scene *scene, Object *ob)
|
|||||||
int flag= 0;
|
int flag= 0;
|
||||||
|
|
||||||
if(ob_get_key(ob)) {
|
if(ob_get_key(ob)) {
|
||||||
flag |= eModifierMode_Render | eModifierMode_Render;
|
flag |= eModifierMode_Render;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
ModifierData *md;
|
ModifierData *md;
|
||||||
|
@ -3161,7 +3161,7 @@ void psys_cache_edit_paths(Scene *scene, Object *ob, PTCacheEdit *edit, float cf
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
ca->vel[0] = ca->vel[1] = 0.0f;
|
ca->vel[0] = ca->vel[1] = 0.0f;
|
||||||
ca->vel[1] = 1.0f;
|
ca->vel[2] = 1.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* selection coloring in edit mode */
|
/* selection coloring in edit mode */
|
||||||
|
@ -172,7 +172,6 @@ void PTCACHE_OT_free_bake_all(wmOperatorType *ot)
|
|||||||
{
|
{
|
||||||
/* identifiers */
|
/* identifiers */
|
||||||
ot->name= "Free All Physics Bakes";
|
ot->name= "Free All Physics Bakes";
|
||||||
ot->name= "Free all physics bakes";
|
|
||||||
ot->idname= "PTCACHE_OT_free_bake_all";
|
ot->idname= "PTCACHE_OT_free_bake_all";
|
||||||
|
|
||||||
/* api callbacks */
|
/* api callbacks */
|
||||||
|
@ -512,7 +512,7 @@ static float VecZDepthOrtho(float pt[2], float v1[3], float v2[3], float v3[3],
|
|||||||
return (v1[2]*w[0]) + (v2[2]*w[1]) + (v3[2]*w[2]);
|
return (v1[2]*w[0]) + (v2[2]*w[1]) + (v3[2]*w[2]);
|
||||||
}
|
}
|
||||||
|
|
||||||
static float VecZDepthPersp(float pt[2], float v1[3], float v2[3], float v3[3], float w[3])
|
static float VecZDepthPersp(float pt[2], float v1[4], float v2[4], float v3[4], float w[3])
|
||||||
{
|
{
|
||||||
float wtot_inv, wtot;
|
float wtot_inv, wtot;
|
||||||
float w_tmp[3];
|
float w_tmp[3];
|
||||||
@ -1193,7 +1193,7 @@ static void screen_px_from_ortho(
|
|||||||
* the perspective W coord for each vert */
|
* the perspective W coord for each vert */
|
||||||
static void screen_px_from_persp(
|
static void screen_px_from_persp(
|
||||||
float uv[2],
|
float uv[2],
|
||||||
float v1co[3], float v2co[3], float v3co[3], /* screenspace coords */
|
float v1co[4], float v2co[4], float v3co[4], /* screenspace coords */
|
||||||
float uv1co[2], float uv2co[2], float uv3co[2],
|
float uv1co[2], float uv2co[2], float uv3co[2],
|
||||||
float pixelScreenCo[4],
|
float pixelScreenCo[4],
|
||||||
float w[3])
|
float w[3])
|
||||||
|
@ -316,11 +316,9 @@ static float cube[8][3] = {
|
|||||||
static void drawsolidcube_size(float xsize, float ysize, float zsize)
|
static void drawsolidcube_size(float xsize, float ysize, float zsize)
|
||||||
{
|
{
|
||||||
static GLuint displist=0;
|
static GLuint displist=0;
|
||||||
float n[3];
|
float n[3]= {0.0f};
|
||||||
|
|
||||||
glScalef(xsize, ysize, zsize);
|
glScalef(xsize, ysize, zsize);
|
||||||
|
|
||||||
n[0]=0; n[1]=0; n[2]=0;
|
|
||||||
|
|
||||||
if(displist==0) {
|
if(displist==0) {
|
||||||
displist= glGenLists(1);
|
displist= glGenLists(1);
|
||||||
@ -346,7 +344,6 @@ static void drawsolidcube_size(float xsize, float ysize, float zsize)
|
|||||||
n[2]= 1.0;
|
n[2]= 1.0;
|
||||||
glNormal3fv(n);
|
glNormal3fv(n);
|
||||||
glVertex3fv(cube[1]); glVertex3fv(cube[5]); glVertex3fv(cube[6]); glVertex3fv(cube[2]);
|
glVertex3fv(cube[1]); glVertex3fv(cube[5]); glVertex3fv(cube[6]); glVertex3fv(cube[2]);
|
||||||
n[2]=0;
|
|
||||||
n[2]= -1.0;
|
n[2]= -1.0;
|
||||||
glNormal3fv(n);
|
glNormal3fv(n);
|
||||||
glVertex3fv(cube[7]); glVertex3fv(cube[4]); glVertex3fv(cube[0]); glVertex3fv(cube[3]);
|
glVertex3fv(cube[7]); glVertex3fv(cube[4]); glVertex3fv(cube[0]); glVertex3fv(cube[3]);
|
||||||
|
@ -833,7 +833,7 @@ static int select_edgeloop(Scene *scene, Image *ima, EditMesh *em, NearestHit *h
|
|||||||
if(extend) {
|
if(extend) {
|
||||||
tf= CustomData_em_get(&em->fdata, hit->efa->data, CD_MTFACE);
|
tf= CustomData_em_get(&em->fdata, hit->efa->data, CD_MTFACE);
|
||||||
|
|
||||||
if(uvedit_uv_selected(scene, hit->efa, tf, hit->edge) && uvedit_uv_selected(scene, hit->efa, tf, hit->edge))
|
if(uvedit_uv_selected(scene, hit->efa, tf, hit->edge))
|
||||||
select= 0;
|
select= 0;
|
||||||
else
|
else
|
||||||
select= 1;
|
select= 1;
|
||||||
|
@ -358,7 +358,7 @@ void GPU_material_enable_alpha(GPUMaterial *material)
|
|||||||
material->alpha= 1;
|
material->alpha= 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
GPUBlendMode GPU_material_blend_mode(GPUMaterial *material, float obcol[3])
|
GPUBlendMode GPU_material_blend_mode(GPUMaterial *material, float obcol[4])
|
||||||
{
|
{
|
||||||
if(material->alpha || (material->obcolalpha && obcol[3] < 1.0f))
|
if(material->alpha || (material->obcolalpha && obcol[3] < 1.0f))
|
||||||
return GPU_BLEND_ALPHA;
|
return GPU_BLEND_ALPHA;
|
||||||
|
@ -690,7 +690,7 @@ void BL_Shader::SetUniform(int uniform, const MT_Matrix3x3& vec, bool transpose)
|
|||||||
float value[9];
|
float value[9];
|
||||||
value[0] = (float)vec[0][0]; value[1] = (float)vec[1][0]; value[2] = (float)vec[2][0];
|
value[0] = (float)vec[0][0]; value[1] = (float)vec[1][0]; value[2] = (float)vec[2][0];
|
||||||
value[3] = (float)vec[0][1]; value[4] = (float)vec[1][1]; value[5] = (float)vec[2][1];
|
value[3] = (float)vec[0][1]; value[4] = (float)vec[1][1]; value[5] = (float)vec[2][1];
|
||||||
value[6] = (float)vec[0][2]; value[7] = (float)vec[1][2]; value[7] = (float)vec[2][2];
|
value[6] = (float)vec[0][2]; value[7] = (float)vec[1][2]; value[8] = (float)vec[2][2];
|
||||||
glUniformMatrix3fvARB(uniform, 1, transpose?GL_TRUE:GL_FALSE, value);
|
glUniformMatrix3fvARB(uniform, 1, transpose?GL_TRUE:GL_FALSE, value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user