[fetter-devel] Re: OpenGL on Windows

Kenny Tilton ktilton at nyc.rr.com
Thu Sep 22 01:13:14 UTC 2005



Rayiner Hashem wrote:

>>I am not having success with this. Best I can do is edit the vzntemp.cpp
>>to include actual #defines in the .cpp. Turns out freeglut.h itself
>>includes the windows.h file (yes, I am extending the example by pulling
>>in a GLUT as well). But that is after the GL.h and I get errors on the
>>GL.h.
>>    
>>
>
>I'm confused. What kind of errors are you getting? Stuff like
>APIENTRY, etc being undefined?
>

The error message, as usual with C, was fully inscrutable. However, I 
simply deleted the WINGDIAPI and APIENTRY from the first line that 
errored and it compiled fine (with the next similar line still erroring).

>  
>
>  
>
>>So the moral of the story may be that you can run but not hide from
>>windows.h <g>. In which case it would be great if Vzn could do the
>>pruning by seeing which symbols were declared in desired headers vs all
>>headers required. (If that approach will even work!)
>>    
>>
>
>That's actually what it does. It sets symbols in the required headers
>as the search roots, then marks as reachable anything reachable from
>those roots.
>
I think the problem is that, as you noted, GL.h lacks an include of 
windows.h, so I list windows.h as a header in the binding definition. 
What I am angling for is a separate keyword, or some syntax such as:

(defbinding "opengl-library"
    (nicknames "gl")
  (include ("windows.h" :suppress) "GL/gl.h" "GL/glu.h" "GL/freeglut.h")
  (override "glGetString" ("string" ("GLenum"))))

That gives us full control over the results and lets us get things to 
compile naturally (by including the necessary header, not tweaking flags 
or altering headers which would have to re-altered after the next 
release of the C library).

-- 
Kenny

Why Lisp? http://wiki.alu.org/RtL_Highlight_Film

"I've wrestled with reality for 35 years, Doctor, and I'm happy to state I finally won out over it."
    Elwood P. Dowd, "Harvey", 1950






More information about the fetter-devel mailing list