[ruby-opengl-devel] Windows support
Jan Dvorak
jan.dvorak at kraxnet.cz
Fri Mar 30 06:07:13 EDT 2007
> - Did I see correctly that the former name 'opengl.so' is abandoned for
> two separate names 'gl.so' and 'glu.so' ?
Yes.
> - 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.
> - 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.
Regards,
Jan
More information about the ruby-opengl-devel
mailing list