One intresting bug in current game engine - hope somehow it gets resolved

I would like to discuss one bug,

take a most simple case I could think of to observe it:

http://www.sim-ai.org/bugexample.blend

it is a mesh with four quads two materials and subsurf modifier being applied.

Now - it works fine in build-in Blender ‘P’ game engine mode, but in blenderplayer.exe - you would see a missing corner and material being misapplied.

it is not easy to reproduce bug - as if one would import the mesh to another blend - things would become better - but, unfortunately, will not be fixed inside a bigger scene.

So this appears after developing game scene.

so in sum here are two issues.

  1. most important - why the example renders correctly in build in debugger and not in blenderplayer
  2. how this bug gets accumulated ( or why it is fixed during import ).

I already submitted bug report ( though with another model - more complicated from which I derived a model by link to produce a bug ) here.

and try to find cause by myself,

but in case you are interested - there is a model and description to hunt a bug, which seems to me important

found how to ‘quick fix’ ( not a real solution though - requires some effort to find where exactly difference occurs )

file \source\blender\blenkernel\intern\cdderivedmesh.c

replace line

if( GPU_buffer_legacy(dm) || setDrawOptions != NULL ) {

with

if ( 1 ) {

obviously - the problem is how ‘non legacy’ rendering code is different with ‘legacy’ such that it somehow
renders materials in wrong places

now lefts one thing - to find what is exactly different.
But it is now much easier