| |
|
|
 | Auf Anfrage [...] OGL Trapez OpenGL Texturiert: KompilierenMarkierenSeparieren {$cleq}
cls
ogl("init",hWnd,1,1,1,0)
float x=-1,y=-1,xx=1,yy=1,v=0.5
long hPic=create("hPic",0,"&DSKBMP")
long tex=ogl("getTextureBmp",hPic,3)
showMax
while 1
ogl("clear")
ogl("move",0,0,-3)
ogl("rotate",0,getTickCount*0.01,0)
ogl("texture",1,10)
ogl("color",1,1,1,1)
ogl("glBegin",GL_QUADS)
oGL("glTexCoord2f",0.0,0.0)
ogl("glVertex3f",x,y,)
oGL("glTexCoord2f",1.0,0.0)
ogl("glVertex3f",xx,y,)
oGL("glTexCoord2f",1.0,1.0)
ogl("glVertex3f",xx+v,yy,)
oGL("glTexCoord2f",0.0,1.0)
ogl("glVertex3f",x+v,yy,)
ogl("glEnd")
ogl("show")
wend
end
bzw.: KompilierenMarkierenSeparierencls
ogl("init",%hWnd,1,1,1,0)
var x!=-1
var y!=-1
var xx!=1
var yy!=1
var v!=0.5
var hPic&=create("hPic",0,"&DSKBMP")
var tex&=ogl("getTextureBmp",hPic&,3)
showMax
while 1
ogl("clear")
ogl("move",0,0,-3)
ogl("rotate",0,&getTickCount*0.01,0)
ogl("texture",1,10)
ogl("color",1,1,1,1)
ogl("glBegin",7)
oGL("glTexCoord2f",0.0,0.0)
ogl("glVertex3f",x!,y!,0)
oGL("glTexCoord2f",1.0,0.0)
ogl("glVertex3f",xx!,y!,0)
oGL("glTexCoord2f",1.0,1.0)
ogl("glVertex3f",xx!+v!,yy!,0)
oGL("glTexCoord2f",0.0,1.0)
ogl("glVertex3f",x!+v!,yy!,0)
ogl("glEnd")
ogl("show")
wend
end
|
 |
|
| |
|
|
|
 Jörg Sellmeyer | Hm - das ist aber ein Parallelogramm und kein Trapez... |
|
|
| Windows XP SP2 XProfan X4... und hier mal was ganz anderes als Profan ...  | 15.03.2010 ▲ |
|
|
|
|
 | Jupp, dort müsste ein -v! - hält die Spannung aufrecht.  |
|
|
| |
|
|