My brush won't work

Blitz3D Forums/Blitz3D Beginners Area/My brush won't work

Cousin Gilgamesh(Posted 2005) [#1]
k. I'm making a skybox from scratch(vertices) because I want to use different brushes for each surface. But when I use the brush on the surface, it paints the surface a solid color, instead of the texture file that I was using. I tried to use that same brush on a normal cube and it worked just fine. is there something wrong with my surface creating code? here's the snipet:

mesh = CreateMesh()
brush = LoadBrush("tex.jpg")
surf = CreateSurface(mesh)
AddVertex surf, -1,-1, 1
AddVertex surf, -1, 1, 1
AddVertex surf, 1, 1, 1
AddVertex surf, 1,-1, 1
AddTriangle surf, 0, 1, 2
AddTriangle surf, 2, 3, 0
PaintSurface surf, brush

Thanks.


skidracer(Posted 2005) [#2]
It thinks you want to use the top left pixel of your texture for the entire surface because you have not supplied uv coordinates with your AddVertex commands (which help map the texture onto the surface).


Cousin Gilgamesh(Posted 2005) [#3]
yeah, you were right. thanks