Commit ec4d2442 authored by hybrid's avatar hybrid

Avoid 32bit depth in XVisuals unless transparency is really necessary.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@1540 dfc29bdd-3216-0410-991c-e03cc46cb475
parent a8a075be
......@@ -470,7 +470,8 @@ bool CIrrDeviceLinux::createWindow()
int visNumber; // Return value of available visuals
visTempl.screen = screennr;
visTempl.depth = 32;//CreationParams.Bits;
// ARGB visuals should be avoided for usual applications
visTempl.depth = CreationParams.WithAlphaChannel?32:24;
while ((!visual) && (visTempl.depth>=16))
{
visual = XGetVisualInfo(display, VisualScreenMask|VisualDepthMask,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment