diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-04-27 09:12:07 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-04-27 09:12:07 +0400 |
commit | 6e35c083566c612b6eeff60a554e5cbd1cc2890a (patch) | |
tree | 8b9efae22d20936e4e7e413206a9eca36f88cc03 /source | |
parent | ee2ddfc58a14bd6680a8bb7e63472d290913d853 (diff) |
comment regarding bug [#27175] UV faces show incorrect image in object mode (VBO's)
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/cdderivedmesh.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/cdderivedmesh.c b/source/blender/blenkernel/intern/cdderivedmesh.c index 24b677cc240..8bd650b1a42 100644 --- a/source/blender/blenkernel/intern/cdderivedmesh.c +++ b/source/blender/blenkernel/intern/cdderivedmesh.c @@ -770,6 +770,19 @@ static void cdDM_drawFacesTex_common(DerivedMesh *dm, } if( !GPU_buffer_legacy(dm) ) { + /* warning!, this logic is incorrect, see bug [#27175] + * firstly, there are no checks for changes in context, such as texface image. + * secondly, drawParams() sets the GL context, so checking if there is a change + * from lastFlag is too late once glDrawArrays() runs, since drawing the arrays + * will use the modified, OpenGL settings. + * + * However its tricky to fix this without duplicating the internal logic + * of drawParams(), perhaps we need an argument like... + * drawParams(..., keep_gl_state_but_return_when_changed) ?. + * + * We could also just disable VBO's here, since texface may be deprecated - campbell. + */ + glShadeModel( GL_SMOOTH ); lastFlag = 0; for(i = 0; i < dm->drawObject->nelements/3; i++) { |