[Openmcl-devel] opengl
David Steuber
david at david-steuber.com
Thu Mar 3 09:56:51 PST 2005
On Mar 3, 2005, at 10:41 AM, Dario Lah wrote:
> please tell me how to pass by reference variable to foreign function?
You need to read this:
http://openmcl.clozure.com/Doc/ch09.html
> I'm writing Nehe OpenGL basecode in OpenMCL and need this for function
> drawFramerate.
>
> In C++ it is:
> GLint matrixMode;
> glGetIntegerv(GL_MATRIX_MODE, &matrixMode);
> glMatrixMode(matrixMode);
This snippet would look like this:
(ccl:rlet ((matrix-mode :<gl>int))
(#_glGetIntegerv(#$GL_MATRIX_MODE matrix-mode)
(#_glMatrixMode (ccl:%get-int-ptr matrix-mode)))
> How to pass matrixMode and get value (integer) from it?
>
> In opengl interface database there is no GLUT_BITMAP_HELVETICA_10
> define. It is void pointer to font. I looked in headers and found
> that it is addres of function &glutBitmapHelvetica10.
>
> Has anyone used this? Is there other way to get Helvetica font in GLUT?
GLUT is a separate framework on OS X. I haven't done anything with it.
I was under the impression that GLUT was somehow related to the aux
stuff from the red book. Perhaps I'm wrong?
I haven't gotten anywhere near tackling fonts yet, but if you are using
Carbon rather than Cocoa, there is this rather nice example (in C):
http://developer.apple.com/samplecode/GLCarbonAGLWindow/
GLCarbonAGLWindow.html
Text is used in the demo without resorting to GLUT.
More information about the Openmcl-devel
mailing list