Type RenderContext Field group:tgadget Field panel:tgadget Field hWnd Field hDC Field hRC Field FPS# Field FPSLastUpdateTime Field frames Method Render() 'Setup Viewport w=ClientWidth(group) h=ClientHeight(group) glViewport 0.0,0.0,w,h glClearColor 0.0,0.0,1.0,0.0 glClear GL_DEPTH_BUFFER_BIT+GL_COLOR_BUFFER_BIT glMatrixMode GL_PROJECTION glLoadIdentity() glPushMatrix() gluPerspective 45.0,Float(w)/Float(h),1.0,100.0 'Draw Triangle glBegin GL_TRIANGLES glVertex3f 0.0,0.0,-10.0 glVertex3f 1.0,1.0,-10.0 glVertex3f 1.0,0.0,-10.0 glEnd glpopmatrix() glLoadIdentity() glPushMatrix() glOrtho 0,w,h,0,-1,1 glRasterPos2f 1,13 s$=fps Local buffer@ Ptr=s.ToCString() glListBase(listBase) glCallLists(s.Length,GL_UNSIGNED_BYTE,buffer) MemFree(buffer) glpopmatrix() 'Flip buffer SwapBuffers hdc frames=frames+1 time=MilliSecs() elapsed=(time-FPSLastUpdateTime) If elapsed>1000 fps#=frames/(elapsed/1000.0) FPSLastUpdateTime=time frames=0 EndIf EndMethod EndType
Methods are ****ing awesome!
BlitzMax Forums/BlitzMax Beginners Area/Methods are ****ing awesome! lol welcome to OOP :) gets even better with inheritance.
Yes. Yes they do.
Aren't they though? They are ****ing awesome indeed!
lol.... an' now ya see the light - as the song goes
boy you sure spamed these forums. Awsomeness of methods is nothing new to the rest of us halo ;)
dude post in the beginner section! spammaholic
And try to read the Language/Module reference and some tutorials.