The new 0.42 extended will have a more compatible Max2D behaviour. I hope to release it soon. I have yet to create some additional interface function and some bugs left to fix. So keep patient.
As a possible fix you could try something like this:
Or replace the Functions in TGLobal.bmx with these:
And rebuild the module afterwards.
As a possible fix you could try something like this:
TGlobal.BeginMax2D() SetBlend AlphaBlend 'Seems to fix sometimes the behaviour DrawRect 0,0,-5,-5 'Also seems to fix some things 'YYour 2D Stuff
Or replace the Functions in TGLobal.bmx with these:
Function GraphicsInit() TTexture.TextureFilter("",9) glewInit() ' required for glActiveTextureARB 'Save the Max2D settings for later glPushAttrib GL_ALL_ATTRIB_BITS glPushClientAttrib GL_CLIENT_ALL_ATTRIB_BITS glMatrixMode GL_MODELVIEW glPushMatrix glMatrixMode GL_PROJECTION glPushMatrix glMatrixMode GL_TEXTURE glPushMatrix glMatrixMode GL_COLOR glPushMatrix EnableStates() glLightModeli(GL_LIGHT_MODEL_COLOR_CONTROL,GL_SEPARATE_SPECULAR_COLOR) glLightModeli(GL_LIGHT_MODEL_LOCAL_VIEWER,GL_TRUE) glClearDepth(1.0) glDepthFunc(GL_LEQUAL) glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST) glAlphaFunc(GL_GEQUAL,0.1) End Function 'enter Max2D mode Function BeginMax2D() glPopClientAttrib glPopAttrib glMatrixMode GL_MODELVIEW glPopMatrix glMatrixMode GL_PROJECTION glPopMatrix glMatrixMode GL_TEXTURE glPopMatrix glMatrixMode GL_COLOR glPopMatrix 'DrawRect 0,0,-5,-5 End Function 'return to MiniB3D mode Function EndMax2D() 'Save the Max2D settings for later glPushAttrib GL_ALL_ATTRIB_BITS glPushClientAttrib GL_CLIENT_ALL_ATTRIB_BITS glMatrixMode GL_MODELVIEW glPushMatrix glMatrixMode GL_PROJECTION glPushMatrix glMatrixMode GL_TEXTURE glPushMatrix glMatrixMode GL_COLOR glPushMatrix EnableStates() glDisable GL_TEXTURE_2D glLightModeli(GL_LIGHT_MODEL_COLOR_CONTROL,GL_SEPARATE_SPECULAR_COLOR) glLightModeli(GL_LIGHT_MODEL_LOCAL_VIEWER,GL_TRUE) glClearDepth(1.0) glDepthFunc(GL_LEQUAL) glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST) glAlphaFunc(GL_GEQUAL , 0.5) If isWireframe = True Then glPolygonMode(GL_FRONT , GL_LINE) EndIf End Function
And rebuild the module afterwards.