Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntony Riakiotakis <kalast@gmail.com>2014-09-02 17:57:22 +0400
committerAntony Riakiotakis <kalast@gmail.com>2014-09-02 17:57:38 +0400
commit3733eb6340ba34dc68022f58de731c8ec5fb274b (patch)
treed6e2483e59fafaf31fe5293e991401711561a335 /source/blender/blenkernel/intern/cdderivedmesh.c
parentf6b4b1296125d43e94968709bc52d5f7a062734e (diff)
Fix T41682.
Bring back shading in texture painting. This works now but it uses 3 texture units instead of two. Most GPUs of DirectX 8 (OpenGL 1.4 should cover that) functionality even should have those, but some old GPUs might not work with that. In any case, I hope we will be moving to OpenGL 2.1 requirement soon anyway where 4-8 texture units are usually the norm.
Diffstat (limited to 'source/blender/blenkernel/intern/cdderivedmesh.c')
-rw-r--r--source/blender/blenkernel/intern/cdderivedmesh.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/cdderivedmesh.c b/source/blender/blenkernel/intern/cdderivedmesh.c
index 4369ef1a26d..116f9d9e64c 100644
--- a/source/blender/blenkernel/intern/cdderivedmesh.c
+++ b/source/blender/blenkernel/intern/cdderivedmesh.c
@@ -802,7 +802,7 @@ static void cdDM_drawFacesTex_common(DerivedMesh *dm,
glBegin(mf->v4 ? GL_QUADS : GL_TRIANGLES);
if (tf) glTexCoord2fv(tf->uv[0]);
- if (tf_stencil) glMultiTexCoord2fv(GL_TEXTURE1, tf->uv[0]);
+ if (tf_stencil) glMultiTexCoord2fv(GL_TEXTURE2, tf->uv[0]);
if (cp) glColor3ub(cp[3], cp[2], cp[1]);
mvert = &mv[mf->v1];
if (lnors) glNormal3sv((const GLshort *)lnors[0][0]);
@@ -810,7 +810,7 @@ static void cdDM_drawFacesTex_common(DerivedMesh *dm,
glVertex3fv(mvert->co);
if (tf) glTexCoord2fv(tf->uv[1]);
- if (tf_stencil) glMultiTexCoord2fv(GL_TEXTURE1, tf->uv[1]);
+ if (tf_stencil) glMultiTexCoord2fv(GL_TEXTURE2, tf->uv[1]);
if (cp) glColor3ub(cp[7], cp[6], cp[5]);
mvert = &mv[mf->v2];
if (lnors) glNormal3sv((const GLshort *)lnors[0][1]);
@@ -818,7 +818,7 @@ static void cdDM_drawFacesTex_common(DerivedMesh *dm,
glVertex3fv(mvert->co);
if (tf) glTexCoord2fv(tf->uv[2]);
- if (tf_stencil) glMultiTexCoord2fv(GL_TEXTURE1, tf->uv[2]);
+ if (tf_stencil) glMultiTexCoord2fv(GL_TEXTURE2, tf->uv[2]);
if (cp) glColor3ub(cp[11], cp[10], cp[9]);
mvert = &mv[mf->v3];
if (lnors) glNormal3sv((const GLshort *)lnors[0][2]);
@@ -827,7 +827,7 @@ static void cdDM_drawFacesTex_common(DerivedMesh *dm,
if (mf->v4) {
if (tf) glTexCoord2fv(tf->uv[3]);
- if (tf_stencil) glMultiTexCoord2fv(GL_TEXTURE1, tf->uv[3]);
+ if (tf_stencil) glMultiTexCoord2fv(GL_TEXTURE2, tf->uv[3]);
if (cp) glColor3ub(cp[15], cp[14], cp[13]);
mvert = &mv[mf->v4];
if (lnors) glNormal3sv((const GLshort *)lnors[0][3]);