From 043d79e26aaf49893262d66d8beefc03de1fd566 Mon Sep 17 00:00:00 2001 From: the_fiddler Date: Sun, 31 May 2009 15:48:05 +0000 Subject: [PATCH] Mesa3d indirect reports bogus InvalidOperation error when using ListMode.CompileAndExecute (bug reported as https://bugs.freedesktop.org/show_bug.cgi?id=22014). Use ListMode.Compile as a workaround. --- Source/Utilities/Graphics/Text/GL1TextOutputProvider.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Source/Utilities/Graphics/Text/GL1TextOutputProvider.cs b/Source/Utilities/Graphics/Text/GL1TextOutputProvider.cs index 0c190164..58d72a24 100644 --- a/Source/Utilities/Graphics/Text/GL1TextOutputProvider.cs +++ b/Source/Utilities/Graphics/Text/GL1TextOutputProvider.cs @@ -155,7 +155,10 @@ namespace OpenTK.Graphics.Text if ((block.Options & TextPrinterOptions.NoCache) == 0) { display_list = GL.GenLists(1); - GL.NewList(display_list, ListMode.CompileAndExecute); + // Mesa Indirect gerates an InvalidOperation error right after + // GL.EndList() when using ListMode.CompileAndExecute. + // Using ListMode.Compile as a workaround. + GL.NewList(display_list, ListMode.Compile); } foreach (Texture2D key in active_lists.Keys) { @@ -179,6 +182,7 @@ namespace OpenTK.Graphics.Text { GL.EndList(); block_cache.Add(block_hash, display_list); + GL.CallList(display_list); } // Clean layout