@pingus
I used a modified version of Fredborg's code. Unfortually it appers to only work correctly HighGUI3 ( it messes up stuff with alpha , and I really dont understand why :/ ).
heres Fredborg's code:
I basically got rid of the bit about clearing textures.
I used a modified version of Fredborg's code. Unfortually it appers to only work correctly HighGUI3 ( it messes up stuff with alpha , and I really dont understand why :/ ).
heres Fredborg's code:
Function UseMax2D() Local x,y,w,h GetViewport(x,y,w,h) glDisable(GL_LIGHTING) glDisable(GL_DEPTH_TEST) glDisable(GL_SCISSOR_TEST) glDisable(GL_FOG) glDisable(GL_CULL_FACE) glMatrixMode GL_TEXTURE glLoadIdentity glMatrixMode GL_PROJECTION glLoadIdentity glOrtho 0,GraphicsWidth(),GraphicsHeight(),0,-1,1 glMatrixMode GL_MODELVIEW glLoadIdentity SetViewport x,y,w,h ' ' Clear textures For Local Layer = 0 Until THardwareInfo.MaxTextures glActiveTexture(GL_TEXTURE0+Layer) glDisable(GL_TEXTURE_CUBE_MAP) glDisable(GL_TEXTURE_GEN_S) glDisable(GL_TEXTURE_GEN_T) glDisable(GL_TEXTURE_GEN_R) glDisable(GL_TEXTURE_2D) Next ' ' Activate texture layer 0 glActiveTexture(GL_TEXTURE0) ' ' To reset states! DrawRect -10,-10,5,5 EndFunction
I basically got rid of the bit about clearing textures.