[fpc-devel] OpenGL 3.3 Core

Kostas Michalopoulos badsectoracula at gmail.com
Fri May 26 18:48:45 CEST 2017


I'd use an enum with values like (glcDefaultProfile, glcCoreProfile,
glcCompatibilityProfile). Default would leave things as-is (when versioning
is introduced to backends that currently do not support it, it will either
use a backend-specific default or leave it unspecified where possible),
Core will explicitly request a core profile and Compatibility will
explicitly request a compatibility profile. Under OSes where compatibility
isn't available, the context creation would fail.

For bonus points, i'd rename glcCoreProfile to glcRequireCoreProfile and
instead of glcCompatibilityProfile i'd use glcPreferCompatibilityProfile
and glcRequireCompatibilityProfile. glcRequireCoreProfile would work like
above, glcPreferCompatibilityProfile will first try to use the
compatibility profile but fallback to core if not available (so that the
drivers avoid the extra checks) and glcRequireCompatibilityProfile will
fail if the compatibility profile doesn't exist - basically having the
profiles as glcDefaultProfile, glcPreferCompatibilityProfile,
glcRequireCompatibilityProfile and glcRequireCoreProfile.




On Fri, May 26, 2017 at 6:40 PM, Mattias Gaertner <nc-gaertnma at netcologne.de
> wrote:

> On Fri, 26 May 2017 18:21:47 +0300
> Kostas Michalopoulos <badsectoracula at gmail.com> wrote:
>
> >[...]
> > I think the control should gain a Profile attribute to solve this.
>
> How would that "Profile attribute" look like?
>
> > And
> > while at it, also a ForwardCompatible attribute for debugging (forward
> > compatible contexts disable any deprecated functionality, but they can
> also
> > slow down rendering due to extra tests, so they are only good for
> debugging
> > code).
>
> Mattias
> _______________________________________________
> fpc-devel maillist  -  fpc-devel at lists.freepascal.org
> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20170526/a1cec94c/attachment.html>


More information about the fpc-devel mailing list