I'm getting similar results to SDL, using Opengl directly. About 0.28 seconds to compile the glList.
But once the list is compiled, the Graphics processor takes 5 microseconds to execute, involving 1.5 microseconds of CPU time.
includepath $\inc\
% title "Lorenz Plot"
% width 600
% height 800
include OpenglSceneFrame.inc
sub initialize(sys hWnd)
========================
'SetTimer hWnd,1,10,NULL
end sub
sub Release(sys hwnd)
=====================
DeleteAllGlCompiled
'killTimer hwnd, 1
end sub
sub scene(sys hWnd)
===================
'
static single t,x,y 'Lorenz
static quad t1,t2,t3,t4,t5 'Time Marks
'
StillFrame
glClearColor 0.3, 0.0, 0.0, 0.0
gltranslatef 0.00, 0.00, -1.00
glScalef 0.22, 0.22, 0.22
glColor3f .5, 1.0, 1.0 ' color 14
glPointSize 1.0
'
BeginGlCompile Lorenz
TimeMark t1
glBegin GL_POINTS
for t=0 to 7000.0 step 0.006
x=sin(0.99*t)-0.7*cos(3.01*t)
y=cos(1.01*t)+0.1*sin(15.03*t)
glVertex2f y,x
next
glEnd
TimeMark t2
EndGlCompile
'
TimeMark t3
go Lorenz
TimeMark t4
glFlush 'to get the GPU processing time
TimeMark t5
'
SetWindowText hwnd, title +
" Compiling: " str(TimeDiff(t2,t1),3) +
" Plot: (CPU) " str((TimeDiff t4,t3),3) +
" Plot: (GPU) " str((TimeDiff t5,t3),3)
'
end sub