[fpc-pascal] Announcement GLPT
Anthony Walter
sysrpl at gmail.com
Mon Sep 24 16:52:35 CEST 2018
Darius,
I read you message and checked the git repository. I didn't find the
answers to a few questions I had by browsing you source, so I'll ask them
here. Also, I have some comments.
First questions:
Do you support requesting context types, such as OpenGL ES 2.0 versus
OpenGL 3.1?
Do you support callback stubs for querying extension strings and loading
extension functions?
Do you provide a curated list of available OpenGL functions and related
constants and types?
Repeat question above, but for all GL extensions and extension constant and
types?
Do you support enumerating available exclusive resolution modes and
switching between modes after a context has been created?
Do you provide a platform independent high resolution timer?
Comments:
I noticed you are using the Classes unit inside GLPT. Would it be possible
to remove this reference? In some situations users might not want to use
that unit (which also causes SysUtils to be used) because they desire to
implement their own exception base types or other RTL functions or types.
You really shouldn't be using Classes for a base library like you're
implementing.
I noticed you are using the existing Free Pascal GL unit. If you are
planning to support OpenGL context types, it might be better to separate
OpenGL functions into different curated units. Units that expose only the
functionality, plus extensions, of a specific context type. This way users
cannot accidentally use functions unsupported by the context they requested.
Example:
unit GL30; // defines all the functions and types required by OpenGL 3.0
unit GLES20; // defines all the functions and types required by OpenGL ES
2.0, excludes many normal GL functions
unit GLES30; // defines all the functions and types required by OpenGL ES
3.0, excludes many normal GL functions
Then users can define a macros {$define GL=GLES20} and can switch APIs for
either testing or development purposes. The separated units with different
functions and types can then easily reveal differences between APIs and
also possibly the subtle differences between how they work.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20180924/6a8889b0/attachment.html>
More information about the fpc-pascal
mailing list