Dos/DJGPP GLFW hardly working?

nobody wrote on Tuesday, September 07, 2004:


I compiled Mesa 6.1 with:
  make -f Makefile.DJ

and GLFW 2.4.2 with:
  make dos-djgpp

then I wrote a program that basically contained:
with appropriate options GLFW_FULLSCREEN etc.

compiled it with:
  gpp -o test test.cpp -lglfw -lgl

it didn’t complain one bit. However, when I run the program it outputs one error message along the lines of “can’t open window” and exits. The program does not run under DOS or any version of Windows.

My question is, has anyone gotten this stuff to work with DJGPP and Dos or is the whole thing hopeless and I should switch to MinGW?

marcus256 wrote on Friday, September 17, 2004:

Well, the DOS port is kind of experimental. I got it working (have you tried the examples?), but especially the video mode selection part is not very complete, since at the time I wrote the DOS port, DosMESA didn’t support video mode queries, but did require exact video mode specification in order to create a rendering context.

The DOS port is around mostly for the purpose of showing/testing a minimal implementation of the GLFW API (not entirely different from how GLFW would work under game consoles such as PlayStation etc). If you wish to use the most up to date GLFW implementation and OpenGL drivers, I suggest that you go for MinGW/Win32 (after all MinGW is GNU, just as DJGPP, so the differences, from a developer point of view, are minimal).

If you DO wish to use DOS for some reason, I’d be happy, since that may sort out some bugs in the GLFW DOS port (I don’t work much with DOS, and I only have one system to test it on - for instance, I have not tested GLFW with FX MESA). Most of the code is there and functional, but there are a few bugs (most notably video mode selection and mouse input).