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.

This commit is contained in:
the_fiddler 2009-05-31 15:48:05 +00:00
parent 05b92257b1
commit 043d79e26a

View file

@ -155,7 +155,10 @@ namespace OpenTK.Graphics.Text
if ((block.Options & TextPrinterOptions.NoCache) == 0) if ((block.Options & TextPrinterOptions.NoCache) == 0)
{ {
display_list = GL.GenLists(1); 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) foreach (Texture2D key in active_lists.Keys)
{ {
@ -179,6 +182,7 @@ namespace OpenTK.Graphics.Text
{ {
GL.EndList(); GL.EndList();
block_cache.Add(block_hash, display_list); block_cache.Add(block_hash, display_list);
GL.CallList(display_list);
} }
// Clean layout // Clean layout