I read the code of the Utilities / TextPrinter, because I need a similar Begin() / End() state saving. In
Begin() I see that you are calling:
//... GL.BlendFunc(BlendingFactorSrc.SrcAlpha, BlendingFactorDest.OneMinusSrcAlpha); //...
I think this changes the current BlendFunc, which won't be reset afterwards in
End()? Maybe it would be better to call
See ManPage PushAttrib
And why is the
viewport member defined to have the length 6? The viewport could only contain 4 floats or am I wrong?
See ManPage GlGet
Added tiny patch for TextPrinter:
GL.PushAttrib(AttribMask.TextureBit); GL.PushAttrib(AttribMask.EnableBit); GL.PushAttrib(AttribMask.ColorBufferBit);
GL.PushAttrib(AttribMask.TextureBit | AttribMask.EnableBit | AttribMask.ColorBufferBit);
This reduces the 6 calls for push / pop to 2 calls. Not that much, but better than none.