<div dir="ltr"><div dir="ltr"><div>Hi Anthony,</div><div><br></div><div>Thanks for your tip! I just committed some code that removes the Classes, SysUtils and GL units from GLPT. This is indeed better and cleaner.</div><div><br></div><div>As for your questions about supporting different GL versions. GLPT only creates a native GL context and hides some of the platform specific code for the developer. As far as I am concerned there is no interaction with specific GL versions or extensions or whatever. But I could be wrong here, please correct me in that case. On my whish list (next to Mac support) are indeed resolution modes, monitor support, timer and a number of other items. I'm open for pull requests to speed up the progress :).</div><div><br></div><div>Looking forward for other suggestions and some use cases of course.</div><div><br></div><div><a href="https://github.com/daar/GLPT">https://github.com/daar/GLPT</a></div><div><br></div><div>Rgds, Darius</div></div></div><br><div class="gmail_quote"><div dir="ltr">On Mon, Sep 24, 2018 at 4:53 PM Anthony Walter <<a href="mailto:sysrpl@gmail.com">sysrpl@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_quote">Darius,</div><div class="gmail_quote"><br></div><div class="gmail_quote">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.</div><div class="gmail_quote"><br></div><div class="gmail_quote">First questions:</div><div class="gmail_quote"><br></div><div class="gmail_quote">Do you support requesting context types, such as OpenGL ES 2.0 versus OpenGL 3.1?</div><div class="gmail_quote">Do you support callback stubs for querying extension strings and loading extension functions?<br></div><div class="gmail_quote">Do you provide a curated list of available OpenGL functions and related constants and types?</div><div class="gmail_quote">Repeat question above, but for all GL extensions and extension constant and types?</div><div class="gmail_quote">Do you support enumerating available exclusive resolution modes and switching between modes after a context has been created?</div><div class="gmail_quote">Do you provide a platform independent high resolution timer?<br></div><div class="gmail_quote"><br></div><div class="gmail_quote">Comments:</div><div class="gmail_quote"><br></div><div class="gmail_quote">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.</div><div class="gmail_quote"><br></div><div class="gmail_quote">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.</div><div class="gmail_quote"><br></div><div class="gmail_quote">Example:</div><div class="gmail_quote"><br></div><div class="gmail_quote">unit GL30; // defines all the functions and types required by OpenGL 3.0</div><div class="gmail_quote">unit GLES20; // defines all the functions and types required by OpenGL ES 2.0, excludes many normal GL functions</div><div class="gmail_quote">unit GLES30; // defines all the functions and types required by OpenGL ES 3.0, excludes many normal GL functions<br></div><div class="gmail_quote"><br></div><div class="gmail_quote">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.</div><div class="gmail_quote"><br></div></div>
_______________________________________________<br>
fpc-pascal maillist - <a href="mailto:fpc-pascal@lists.freepascal.org" target="_blank">fpc-pascal@lists.freepascal.org</a><br>
<a href="http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal" rel="noreferrer" target="_blank">http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal</a></blockquote></div>