Hilfe

TextureCoords

B3D

Aufruf

TextureCoords textur%, koordinate%

Parameter

textur% Identität einer Textur
koordinate% 0=UV-Koordinaten sind vom ersten UV-Set (Standard)
1=UV-Koordinaten sind vom zweiten UV-Set


Rückgabewert

-


Beschreibung

Die Anweisung TextureCoords ändert den Modus für Texturkoordinate. Dies ist selten erforderlich. Modus 0 ist Standard und wird empfohlen... (siehe Beispiel für besseres Verständnis)


Beispiel

Standardbeispiel:

Graphics3D 640, 480, 0, 2
camera = CreateCamera()
light = CreateLight(1)
RotateEntity light, 90, 0, 0

cone = CreateCone(32)
PositionEntity cone, 0, 0, 5
RotateEntity cone, 30, 30, 10
texture = CreateTexture(64, 64)
SetBuffer TextureBuffer(texture)
Color 0, 255, 0
Rect 0, 0, 64, 64, 1
For i = 1 To 40
Color Rand(255), Rand(255), Rand(255)
Oval Rand( - 20, 60), Rand( - 20, 60), Rand(10, 30), Rand(10, 30)
Next
SetBuffer BackBuffer()
EntityTexture cone, texture
Color 255, 255, 255

While Not KeyDown(1)
   If KeyHit(57) Then
      coords = 1 - coords
      TextureCoords texture, coords
   EndIf
   TurnEntity cone, .1, 1, 2
   RenderWorld
   Text 0, 0, "Benutze Leertaste..."
   Text 0, 20, "TEXTURECOORDS=" + coords
   Flip
Wend
End


Siehe auch

PositionTexture

Übersicht 3D Grafik Texturen