[ruby-opengl-devel] Windows support
pijnacker at dse.nl
Fri Mar 30 07:38:47 EDT 2007
> > - I put glext.h in the source directory to be able to compile parts of
> > the code (particularly everything > gl version 1.5, since microsoft
> > stopped updating opengl from version 1.4.
> This is not needed. In fact the goal is to have the bindings compile on
> systems with minimal headers (OpenGL 1.1) which should be supported on all
> OSs and IDEs (for example DevCPP comes with 1.2 headers only IIRC). To do
> this, we generated list of enumerators from all GL including extensions -
> those are in files ext/common/gl-enums.h (for use from the bindings C code
> itself) and ext/gl/gl-enums.c (exporting them for ruby). As for functions, we
> dynamically load all functions above 1.1 in runtime (see function
> load_gl_function in ext/common/rbogl.h) - this applies to extensions as well.
> The only drawback of this approach is that in order to don't have to rely on
> system installed headers, we need to provide prototype for function pointer
> for each GL function, but as we also need to write wrapper for each of them
> anyway, i don't think that is much of an issue.
The reason I included glext.h was a missing definition of 'GLsizeiptr'
for glBufferData. Maybe that should be added somewhere then?
> > - How should the dependency on glut be handled? Do we assume that some
> > version of glut is available? If so, where? Currently, I just
> > downloaded glut.h and put it in ext/glut/GL/ and linked against
> > glut32.lib that comes with the one-click-installer.
> Yes, we assume that some version of glut is available. As for where it should
> be - what do you think ? I haven't done that much of windows programming (my
> primary platform is Linux), so i have no idea where glut is defaultly
> installed or expected.
I think that it would be hard to make any assumptions there.
Therefore it might at least be sensible to document that it is expected
somewhere and that e.g. using INCLUDE and LIB environment variables they
should be able to be resolved.
Maybe glut.h could be shipped with the one-click-installer, just as the
.lib file seems to be. To me it does not make sense that the .lib is
there without having the .h too.
More information about the ruby-opengl-devel