EntityColor does not work.

Started by JBR, November 15, 2019, 00:17:47

Previous topic - Next topic

JBR

It is always white.

Created a sphere and did entitycolor and it's all white.

If I go through each vertex it does change color.

What gives? Jim.

TomToad

This works for me

Code (blitzmax) Select
SuperStrict
Import sidesign.minib3d

Graphics3D 800,600
Local cube:TEntity = CreateCube()
EntityColor cube,255,0,0

Local camera:TCamera = CreateCamera()
PositionEntity camera,0,0,-4
Local light:TLight = CreateLight()
RotateEntity light,45,45,45

While Not KeyHit(KEY_ESCAPE) And Not AppTerminate()
TurnEntity cube,.1,.2,.3
UpdateWorld
RenderWorld
Flip
Wend

------------------------------------------------
8 rabbits equals 1 rabbyte.

JBR

That works for me too.

I'm 'hacking' Krischans starfield code and if I remove Begin2d() and End2d() everything works correctly.

Thanks for the help. Jim.

JBR

To be fair I had a problem with TGlobal.Enablestates so I edited it out.

It was found in miniB3D and in brl.reflexions and wouldn't compile.

I've looked in the inc directory and tracked down the Enablestates function and copied the few lines directly into my program and everything works fine.

So, it was my mistake and not Krischans.

Jim.