yes, I see I have forgotten to set the "font", thanks charles.
now here's my correct example plus text and a sinus curve:
'
' openGL example, oxygenbasic, lines, marks, text, sinus curve, 09.nov.2014
' by frankolinox (frank brĂ¼bach, bsa)
'
includepath "$\inc\"
$ FileName "t.exe"
'include "RTL32.inc"
'include "RTL64.inc"
$ title "Lines + coordinate_system, Text+Sinus Curve"
$ fontA "Arial",FW_SEMIBOLD
include "OpenglSceneFrame.inc"
sub move(optional float x,y,z)
==============================
glTranslatef x,y,z
end sub
'--------------------------------------
sub linescale(optional float r,a,b,w)
=====================================
float i
float c,d
if not r then r=10.00 'length of line
if not a then a= 1.00 'tick interval
if not b then b= 0.4 'tick size
if not w then w= 5.0 'major interval count
glLineWidth 2
glBegin GL_LINES
'glColor4ub 0,0,250,250
glVertex2f .0 , .0
glVertex2f r , .0
glend
'ticks
glLineWidth 1
glBegin GL_LINES
do
glVertex2f i,.0
if mod(c,w)=0 then d=-b*2 else d=-b
glVertex2f i,d
i+=a
c+=1.0
if i>r then exit do
end do
glEnd
end sub
sub initialize(sys hWnd)
'=======================
end sub
'
sub scene(sys hWnd)
'==================
'
double i 'float i
static single s1,s2,s3,s4,ang1,angi1=1,ra,ri
static hlps
'
glLoadIdentity
glClear GL_COLOR_BUFFER_BIT or GL_DEPTH_BUFFER_BIT
glClearColor 0.5, 0, 0, 0
'
'
glrotatef ang1, 0,0,1
gltranslatef 0,0,-1
glscalef 0.001,0.001,0.001
'
glLineWidth 3.0
'
glBegin GL_LINES
glColor4ub 250,250,150,250
glVertex2i -100,-100
glVertex2i 100, 100
glColor4ub 150,250,250,250
glVertex2i -100, 100
glVertex2i 100,-100
glEnd
glLineWidth 2.0
'
ri=0
glBegin GL_LINE_LOOP
for i=0 to 360 step 10
ra=rad(i)
glColor4ub 250,50,150,250
glVertex2f cos(ra)*(170+ri),sin(ra)*(170+ri)
ri=30-ri
next
glEnd
'
' ------- sinus / Cosinus curve -------------------- //
ri=30
glLineWidth 2
glBegin GL_LINES
for i = -500 to 500 step 0.1 '0.1
glColor4ub 250,0,0,250
glVertex2f i*ra, sin(i)*ri 'ra
glVertex2f i*ra+0.1, sin(i+0.1)*ri
glColor4ub 0, 255, 0,250
glVertex2f i*ra, cos(i)*ri
glVertex2f i*ra+0.1, cos(i+0.1)*ri
next
glEnd
' ------- sinus / Cosinus curve -------------------- //
move -500,-16
'linescale 20.0, 1.0, 0.3, 5 'X AXIS
glColor4ub 0,0,250,250
linescale 500.0, 10.0, 20.3, 5 'X AXIS
move 500,-0
glColor4ub 0,250,0,250
linescale 500.0, 10.0, 20.3, 5 'X AXIS
glRotatef -90,0,0,1
glColor4ub 0,250,250,250
linescale 500.0, 10.0, 20.3, 5 'Y AXIS
glRotatef 0,0,0,1
move -500,0
glColor4ub 0,250,250,250
linescale 500.0, 10.0, 20.3, 5 'Y AXIS
glEnd
'------------- gprint text passage ---------------- //
glDisable GL_LIGHTING
'
glLoadIdentity
glPushMatrix
'gltranslatef -.5,.28,-1.
'gltranslatef 0.0,0.0,-1.0
gltranslatef 0.05,-0.08,-1.0
glColor3f .00,.99,.99
glScalef .07,.07,.01
gprint "Avengers:",.7
glColor3f .99,.99,.99
glScalef .5,.5,1.
gprint "Thor, Hulk.",1.
gprint "Captain America, Iron Man.",1.
gprint "Black Widow, Hawkeye.",1.
glColor3f .99,.90,.05
gprint "Giant, Spiderman, Wesp.",1.
glScalef .75,.75,0.75
gprint "have fun with these heroes, good evening :).",1.
glPopMatrix
'------------- gprint text passage ---------------- //
'ang1+=angi1
if ang1>360 then ang1-=360
'
end sub
sub Release(sys hwnd)
'====================
end sub
regards, frank
.