Hallo,
das Problem mit EAccess kam bei mir auch oft. Es liegt daran, dass im Array das die Texture-Pointer speichert Adressen auftauchen die es gar nicht gibt. Das Problem könnte ich komplett lösen, wenn mir jemand sagen kann wie ich überprüfe ob man auf eine Adresse schreibzugriff hat.
Das mit den weißen Farben kommt daher, dass die Teekanne sowieso weiß ist und das Bild DotProduct3 benutzt.
Für ein bunteres Beispiel ersetzt ihr
'Texture laden
Name$ = "EarthBump.bmp"
Texture& = ~Fast3DLoadTexture(Addr(Name$),D3DCOLOR_XRGB(0,0,0))
AddText "Texture laden",Texture&
'Normalenmap erstellen
~Fast3DDotProduct3(Texture&)
'TFactor
~Fast3DSetTFactor(0.0,Single(1.0),Single(1.0))
durch
'Texture laden
Name$ = "lake.bmp"
Texture& = ~Fast3DLoadTexture(Addr(Name$),D3DCOLOR_XRGB(0,0,0))
AddText "Texture laden",Texture&
und setzt ein REM oder ' vor Dotproduct3-Bumpmapping einschalten
hr& = ~Fast3DSetTextureStageState(Wand#, 0, ~D3DTSS_COLORARG1, ~D3DTA_TEXTURE)
AddText "Stage COLORARG1",hr&
hr& = ~Fast3DSetTextureStageState(Wand#, 0, ~D3DTSS_COLOROP, ~D3DTOP_DOTPRODUCT3)
AddText "Stage COLOROP",hr&
hr& = ~Fast3DSetTextureStageState(Wand#, 0, ~D3DTSS_COLORARG2, ~D3DTA_TFACTOR)
AddText "Stage COLORARG2",hr&
|