Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

OpenGL Font in 64-bit application

dannycat
New Contributor I
691 Views
I am have difficulty in getting OpenGL to display text in the 64-bit version of a program. They are fine in the 32-bit version. In a previous post I mentioned that the fglCallLists routine was not yet defined correctly in ifopngl module and Steve L provided a workround by defining a custom interface. See font.f90. Unfortunately this does not seem to work as the text is displayed as strange, mostly non-text type, symbols. The gp%fbase contains the result of the fglGenLists() function. Either the string is not being passed correctly or the base address is incorrect (or something else even). I have not changed any variables from default integer*4. Should fglGenLists return a integer(HANDLE) rather than integer*4?

Any help would be appreciated.
0 Kudos
4 Replies
Steven_L_Intel1
Employee
691 Views
fglGenLists returns a "UINT" which is integer(4), so whatever the problem is, it isn't the return value. It isn't the type of the argument, either, which is a GLSizei or integer(4). In OpenGL, the display list identifiers are just integers, not address-sized handles.

Where are you passing strings? Can you show some sample code?
0 Kudos
dannycat
New Contributor I
691 Views
fglGenLists returns a "UINT" which is integer(4), so whatever the problem is, it isn't the return value. It isn't the type of the argument, either, which is a GLSizei or integer(4). In OpenGL, the display list identifiers are just integers, not address-sized handles.

Where are you passing strings? Can you show some sample code?

Hi Steve, Can you open the attached font.f90 file (It is within the body of text)? This includes the workround you suggested previously when I was simply getting the code to compile and gets called whenever I want to output a string of text.

Steve (dannycat)
0 Kudos
Steven_L_Intel1
Employee
691 Views
Sorry, I didn't realize that was the sample program.

Is that definition of oglCallLists really what I provided you? If so, my apologies as it is not correct. Please replace this:

integer(K_GLVoid),dimension(*) :: lists
!DEC$ ATTRIBUTES NO_ARG_CHECK,IGNORE_LOC :: lists

with this:

integer(K_GLVoid) :: lists


0 Kudos
dannycat
New Contributor I
691 Views
Sorry, I didn't realize that was the sample program.

Is that definition of oglCallLists really what I provided you? If so, my apologies as it is not correct. Please replace this:

integer(K_GLVoid),dimension(*) :: lists
!DEC$ ATTRIBUTES NO_ARG_CHECK,IGNORE_LOC :: lists

with this:

integer(K_GLVoid) :: lists



Thanks Steve, that works now.
0 Kudos
Reply