The current POGL module uses XS functions for
constant values. alias pointed out that that prevents
the perl compiler from doing performance optimizations
resulting bigger, slower code.
For the current POGL2 work, I'm switching to use
constants from the XS loader where the constant
values are determined from the appropriate headers.
It is a bit simpler for the case of OpenGL constants
since their values are actually specified in the
standard so getting them directly from there (via
the GLEW sources) means I don't have to deal
with platform-specific include file processing and
parsing. A nice feature is that it is possible to have
constants for features that may not be supported
by your current runtime environment. The fact
that they are visible at the perl/source layer is
nice too.
In the SDL2 case, couldn't Alien::SDL2 perform the
constant determination (and even generation) for the
bindings to use?
--Chris
On Thu, Aug 15, 2013 at 9:54 AM, Kartik Thakore