comment regarding bug [#27175] UV faces show incorrect image in object mode (VBO's)

This commit is contained in:
Campbell Barton 2011-04-27 05:12:07 +00:00
parent ee2ddfc58a
commit 6e35c08356

@ -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++) {