[Lazarus] TOpenGLControl.DepthBits default value

Kostas Michalopoulos badsectoracula at gmail.com
Wed Jan 23 10:56:25 CET 2013

AFAIK even if you ask for 24 and there is no support for it, you'll get a
16bit buffer anyway.

On Wed, Jan 23, 2013 at 12:21 AM, Michalis Kamburelis <
michalis.kambi at gmail.com> wrote:

> Reimar Grabowski wrote:
>> Hi,
>> the in the topic mentioned property defaults to a value of 16. Is
>> there any special reason for it? IMHO the default value should be 24.
>> After all it's 2013 and not 1998.
>> It's not really a problem, I just want to know the reason why this
>> value was chosen.
> Before my patch on http://bugs.freepascal.org/**view.php?id=22170<http://bugs.freepascal.org/view.php?id=22170>the depth bits were hardcoded (16 on WinAPI and 1 on GLX). So I set the
> default value for TOpenGLControl.DepthBits at safe 16.
> 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.
> 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.
> 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.
> Michalis
> --
> ______________________________**_________________
> Lazarus mailing list
> Lazarus at lists.lazarus.**freepascal.org<Lazarus at lists.lazarus.freepascal.org>
> http://lists.lazarus.**freepascal.org/mailman/**listinfo/lazarus<http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20130123/bdcef545/attachment-0003.html>

More information about the Lazarus mailing list