mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-03-29 18:06:52 +00:00
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:
parent
05b92257b1
commit
043d79e26a
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue