migueltk's picture

Improvements QuickFont OpenGL state changes

Project:QuickFont - Text Printing and Font Generation Library
Version:1.0.1
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:open
Description

The purpose of these changes is to prevent OpenGL state changes in the user application from interfering with the operation of QuickFont.

1 ° Change QFont.Begin ():

 
        public static void Begin()
        {
            ProjectionStack.Begin();
 
            GL.Disable(EnableCap.Lighting);
            GL.Enable(EnableCap.ColorMaterial);
            GL.Disable(EnableCap.DepthTest);
        }

2 ° Change QFont.End (): Return to OpenGL to its default state.

        public static void End()
        {
            ProjectionStack.End();
 
            GL.Disable(EnableCap.ColorMaterial);
            GL.Disable(EnableCap.Blend);
        }

3 ° The textures used by QuickFont not being disposed, What would be the implementation of IRenderable?

Greetings ...