Code: Alles auswählen
OGL_CreateSreen(800,600)
OGL_CreateCamera()
OGL_SetClearcolor(0.2,0.2,0.4,1.0)
OGL_CreateFog(15,20,0.1)
OGL_SetFogColor(0.2,0.2,0.4,1.0)
Layer0 =OGL_TextureGen(128,155,12,$aa6600,1,1)
Layer2 =OGL_TextureGen(128,155,12,$0066ff,2,1)
Layer3 =OGL_TextureGen(128,35,12,$a0a0aa,2,1)
Layer1 =OGL_TextureGen(128,155,2,$aa66aa,2,1)
Layer5 =OGL_TextureGen(128,55,2,$a066ff,4,1)
OGL_PositionCamera(0.0,0.0,-10.0)
OGL_Ambientlight(0.7,0.7,0.7)
OGL_MaterialColor(0.9,0.9,0.9)
OGL_SetDiffuseColor0(0.8,0.8,0.8) ;
OGL_SetAmbientColor0(0.8,0.8,0.8)
OGL_SetSpecularColor0(1.0,1.0,1.0)
OGL_SetLightPosition0(3.0,2.0,2.0)
OGL_SpecularColor(1.0,1.0,1.0) ;leutfarbe weis
OGL_Shininess(127) ;shininess auf volle leistung ^^
OGL_LightEnable() ;beleuchtung an
OGL_Build3D_Font(36,"Impact")
quadric.l=gluNewQuadric_()
gluQuadricTexture_(quadric.l,#GL_TRUE);
quadric2.l=gluNewQuadric_()
gluQuadricTexture_(quadric2.l,#GL_TRUE);
quadric3.l=gluNewQuadric_()
gluQuadricTexture_(quadric3.l,#GL_TRUE);
quadric4.l=gluNewQuadric_()
gluQuadricTexture_(quadric4.l,#GL_TRUE);
OGL_Shademodel(#gl_smooth)
OGL_AlphaBlend()
OGL_InitSpheremap()
OGL_RenderHidden(0)
OGL_StartSpheremap()
Repeat
;-musiczeugs
OGL_ClearScreen()
glLoadIdentity_() ; Reset Plotter
glTranslatef_(OGL_cos(rotator(0))*3, OGL_sin(rotator(0)), OGL_sin(rotator(0))*3); Move Plotter
glRotatef_(rot.f, 0.0, 0.0, 1.0)
glRotatef_(rot.f, 1.0, 0.0, 1.0)
glBindTexture_(#GL_TEXTURE_2D, Layer2)
gluSphere__(quadric,1.0,16,16)
.....
..bla bla
glEnable_(#GL_TEXTURE_2D)
glBindTexture_(#GL_TEXTURE_2D, Layer5)
OGL_PrintGL_Text("P U R E")
glTranslatef_(-2.0,-3.0,0)
OGL_PrintGL_Text("O P E N G L")
OGL_Flip()
Until Event = #WM_KEYDOWN And EventwParam() = #VK_ESCAPE
....im moment bin ich dabe das "herzstück" zu coden
ein entitysystem mit texen positionen material etc.....wird aber
etwas dauern