Can you see why this isn't working?

Blitz3D Forums/Blitz3D Programming/Can you see why this isn't working?

I'm not sure why this isn't working...but I'm trying to color this triangle's vertices red.

Graphics3D 800,600,32,2
SetBuffer BackBuffer();

camera = CreateCamera()
MoveEntity camera,0,0,-5

light = CreateLight()


mesh = CreateMesh()
surf = CreateSurface(mesh)
AddVertex surf,0,0,0
AddVertex surf,-1,0,0
AddVertex surf,0,1,0
AddTriangle surf,0,1,2
UpdateNormals mesh

VertexColor surf,0,255,0,0
VertexColor surf,1,255,0,0
VertexColor surf,2,255,0,0


While Not KeyHit(1)

If KeyHit(17) w=1-w : WireFrame w

UpdateWorld
RenderWorld

Text 5,10,"Vertex0 Red:"+VertexRed(surf,0)
Text 5,25,"Vertex1 Red:"+VertexRed(surf,1)
Text 5,40,"Vertex2 Red:"+VertexRed(surf,2)


Flip
Wend
End


What do you mean it doesn't work? I see a single, white triangle - as expected.

[edit] OK, I see what you mean - you want it red. Add the following line after creating the mesh:
EntityFX mesh,2

That's it! Bless you big10p. :)

EntityFX mesh,1+2 for the win!

Can you see why this isn't working?
Nothing like vague questions...

Chroma: If you're using the 'full-bright' flag then there's no need to use UpdateNormals since the mesh will be fully lit, regardless.

While in this case big10 figured out what you are asking about, for future reference you should specify what you're trying to do.

Crap, I got pulled over by the forum etiquette police. =(

Anywho, big10p I'll be changing the EntityFX from 1+2 to just a 2 at certain times so I did need to update the normals.

It's not really a forum etiquette thing, more that we're not mind readers so we can't tell what about your program isn't working if you don't tell us.

Crap, I got pulled over again. =( =(



Oh hell no you didn't LMAO!!