Unable to texture a cone

Blitz3D Forums/Blitz3D Beginners Area/Unable to texture a cone

Dicon(Posted 2010) [#1]
I have been unable to texture, even using the most simple program. Paper.jpg is in the same folder as the bb code.
see below.

; LoadMesh Example
; ----------------

Graphics3D 640,480
SetBuffer BackBuffer()

camera=CreateCamera()

light=CreateLight()
RotateEntity light,90,0,0
cone=CreateSphere()

tex=LoadImage("paper.jpg")
EntityTexture cone,tex


PositionEntity cone,0,0,MeshDepth(cone)*2

While Not KeyDown( 1 )
RenderWorld
Flip
Wend
End

but I keep getting "Texture does not exist"

help please as I have spent several hours trying to get this to work.

Dicon


Stevie G(Posted 2010) [#2]
This:

tex=LoadImage("paper.jpg")


should be:

tex = loadtexture("paper.jpg")



Oh, and technically speaking you're texturing a sphere, not a cone ;)