<div dir="ltr">AFAIK even if you ask for 24 and there is no support for it, you'll get a 16bit buffer anyway.<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jan 23, 2013 at 12:21 AM, Michalis Kamburelis <span dir="ltr"><<a href="mailto:michalis.kambi@gmail.com" target="_blank">michalis.kambi@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">Reimar Grabowski wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
the in the topic mentioned property defaults to a value of 16. Is<br>
there any special reason for it? IMHO the default value should be 24.<br>
After all it's 2013 and not 1998.<br>
<br>
It's not really a problem, I just want to know the reason why this<br>
value was chosen.<br>
<br>
</blockquote>
<br></div>
Before my patch on <a href="http://bugs.freepascal.org/view.php?id=22170" target="_blank">http://bugs.freepascal.org/<u></u>view.php?id=22170</a> the depth bits were hardcoded (16 on WinAPI and 1 on GLX). So I set the default value for TOpenGLControl.DepthBits at safe 16.<br>

<br>
The general idea is that TOpenGLControl has safe default values, that are guaranteed to work (and be fast) even on really really ancient graphic cards or when the system is running under virtual machine (which often means you don't get hardware-accelarated 3D until you explicitly install/enable something). For the same reason e.g. TOpenGLControl.StencilBits is by default 0, even though all modern GPUs can give you at least 8-bit stencil buffer.<br>

<br>
Other APIs to get OpenGL context, like GtkGLExt or Glut or low-level WinAPI or GLX follow the same convention. The defaults are very conservative.<br>
<br>
That said, I would be personally fine with changing this default to 24, if others think it's a good idea. A developer can always lower it to 16 when that's enough. So, I don't really have a strong preference about it.<span class="HOEnZb"><font color="#888888"><br>

<br>
Michalis</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
--<br>
______________________________<u></u>_________________<br>
Lazarus mailing list<br>
<a href="mailto:Lazarus@lists.lazarus.freepascal.org" target="_blank">Lazarus@lists.lazarus.<u></u>freepascal.org</a><br>
<a href="http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus" target="_blank">http://lists.lazarus.<u></u>freepascal.org/mailman/<u></u>listinfo/lazarus</a><br>
</div></div></blockquote></div><br></div>