NASM - The Netwide Assembler
NASM Forum => Programming with NASM => Topic started by: Rodrigo Robles on November 02, 2021, 12:08:30 AM
-
I'm trying glutBitmapString, but I'm doing something wrong to get the external symbol GLUT_BITMAP_HELVETICA_18 (or any other gl font). Call opengl functions is pretty easy, with wrt ..plt sufix, but for glutBitMapString needs the font parameter, wich is the external symbol.
GLUT_BITMAP_HELVETICA_18 is defined in freeglut.h as
# define GLUT_BITMAP_HELVETICA_18 ((void *) &glutBitmapHelvetica18)
and glutBitmapHelvetica18 is defined as
extern void* glutBitmapHelvetica18;
To get glutBitmapHelvetica18 I tried:
extern glutBitmapHelvetica18
lea rdi, [rel glutBitmapHelvetica18 wrt ..gotpc]
But it gives a "font 0x00405ff8 not found"
What would be the right way to get this external symbol from freeglut?
-
https://forum.nasm.us/index.php?topic=2634.0
Any help? Maybe not...
Best,
Frank
-
https://forum.nasm.us/index.php?topic=2634.0
Any help? Maybe not...
Best,
Frank
That thread was my starting point for opengl with x86_64 Linux.
The program I'm working on nowadays uses dozens of differente gl/glu/glut functions and have more than a thousand lines.
The problem is specifically in the use of glutBitmapString and access the external symbol GLUT_BITMAP_HELVETICA_18. The sintax with rel and ..gotpc should do the trick, but doesn't work.