application-issues.rst revision 7ec681f3
17ec681f3SmrgApplication Issues
27ec681f3Smrg==================
37ec681f3Smrg
47ec681f3SmrgThis page documents known issues with some OpenGL applications.
57ec681f3Smrg
67ec681f3SmrgTopogun
77ec681f3Smrg-------
87ec681f3Smrg
97ec681f3Smrg`Topogun <http://www.topogun.com/>`__ for Linux (version 2, at least)
107ec681f3Smrgcreates a GLX visual without requesting a depth buffer. This causes bad
117ec681f3Smrgrendering if the OpenGL driver happens to choose a visual without a
127ec681f3Smrgdepth buffer.
137ec681f3Smrg
147ec681f3SmrgMesa 9.1.2 and later (will) support a DRI configuration option to work
157ec681f3Smrgaround this issue. Using the
167ec681f3Smrg`driconf <https://dri.freedesktop.org/wiki/DriConf>`__ tool, set the
177ec681f3Smrg"Create all visuals with a depth buffer" option before running Topogun.
187ec681f3SmrgThen, all GLX visuals will be created with a depth buffer.
197ec681f3Smrg
207ec681f3SmrgOld OpenGL games
217ec681f3Smrg----------------
227ec681f3Smrg
237ec681f3SmrgSome old OpenGL games (approx. ten years or older) may crash during
247ec681f3Smrgstart-up because of an extension string buffer-overflow problem.
257ec681f3Smrg
267ec681f3SmrgThe problem is a modern OpenGL driver will return a very long string for
277ec681f3Smrgthe ``glGetString(GL_EXTENSIONS)`` query and if the application naively
287ec681f3Smrgcopies the string into a fixed-size buffer it can overflow the buffer
297ec681f3Smrgand crash the application.
307ec681f3Smrg
317ec681f3SmrgThe work-around is to set the ``MESA_EXTENSION_MAX_YEAR`` environment
327ec681f3Smrgvariable to the approximate release year of the game. This will cause
337ec681f3Smrgthe ``glGetString(GL_EXTENSIONS)`` query to only report extensions older
347ec681f3Smrgthan the given year.
357ec681f3Smrg
367ec681f3SmrgFor example, if the game was released in 2001, do
377ec681f3Smrg
387ec681f3Smrg.. code-block:: console
397ec681f3Smrg
407ec681f3Smrg   export MESA_EXTENSION_MAX_YEAR=2001
417ec681f3Smrg
427ec681f3Smrgbefore running the game.
437ec681f3Smrg
447ec681f3SmrgViewperf
457ec681f3Smrg--------
467ec681f3Smrg
477ec681f3SmrgSee the :doc:`Viewperf issues <viewperf>` page for a detailed list of
487ec681f3SmrgViewperf issues.
49