PDA

View Full Version : Text using glCallLists



Ed Holder
02-16-2006, 12:33 PM
I've been fighting with the fglCallLists function
in Compaq Visual Fortran using QuickWin. Below is some test code that I've been experimenting with.

subroutine oglUtilRenderText(str, len)
use dfopngl
use dfwin
use dflib
implicit none
character*(*) str
integer*4 len

call fwglUseFontBitmaps(
GetDC(GetHWndQQ(QWIN$FRAMEWINDOW)),
0, 255, 1000)
call fglListBase(1000)
call fglPushMatrix()
call fglCallLists(len, GL_UNSIGNED_BYTE, str)
call fglPopMatrix()
return
end

The compiler error I am getting is: Error: The type of the actual argument differs from the type of the dummy argument. [STR]

I've tried everything I can think of in place of "str" (e.g., hardcoded arguments like... 'Hello' 'Hello'C "Hello" "Hello"C). I've also tried various types of fortran arrays.

Any suggestions?
Thanks,
-ed

Ed Holder
02-17-2006, 07:23 AM
Solved it. Using LOC() did the trick.

call fglCallLists(length, GL_UNSIGNED_BYTE, LOC(string))