[Openmcl-devel] openGL

nik gaffney nik at f0.am
Wed Dec 18 18:24:04 UTC 2002


thanks again, this makes it clearer. as for the documentation, this 
explanation works fine (maybe sumarised) even something simple in the foreign 
funtion/type section along the lines of the fact that the #$ macro can be 
used to access constants, and an example (which makes it very obvious) would 
be useful.  

back to gl .. .
?  #$GL_VERSION_1_3
1

> > > This makes it possible to use #$ to reference GL-related
> > > constants (via #$) and makes GL-related types and data
> > > structures available.  It makes the signature of GL-related
> > > foreign functions available (via #_).
> >
> > im not sure i understand how to access constants this way, could you
> > explain it further?
>
> The interface database contain parsed versions of (among other things)
> constant definitions from header files.  (For a constant, the type
> and value are encoded in a database file.)  The translation process
> can do some C expression evaluation, so it (usually) understands things
> like:
>
> #define A 1
> #define B 2
> #define C (A+B)
>
> and understands enumerations.  (The translation process actually
> operates on an intermediate representation, so it doesn't have
> to know too much about C lexical or syntactic conventions.)
>
> The #$ reader macro basically reads a token (a case-sensitive
> string, more or less) and then tries to find a "constants.cdb"
> file in some "interface directory" that defines a constant
> with a matching name.
>
> If we use an "interface directory" that contains database files produced
> by parsing the header file fragment above, we can say things like:
>
> ? (= #$C (+ #$A #$B))
>
> and (of course) that's true in this case.
>
> I have the feeling that this stuff could be better documented than it
> is.
>
>
>
> _______________________________________________
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
> http://clozure.com/cgi-bin/mailman/listinfo/openmcl-devel

_______________________________________________
Openmcl-devel mailing list
Openmcl-devel at clozure.com
http://clozure.com/cgi-bin/mailman/listinfo/openmcl-devel



More information about the Openmcl-devel mailing list