SyntaxBomb - Indie Coders

Languages & Coding => BlitzMax / BlitzMax NG => MiniB3D => Topic started by: JBR on November 15, 2019, 00:17:47

Title: EntityColor does not work.
Post by: JBR on November 15, 2019, 00:17:47
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.
Title: Re: EntityColor does not work.
Post by: TomToad on November 15, 2019, 08:43:34
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

Title: Re: EntityColor does not work.
Post by: JBR on November 15, 2019, 15:32:39
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.
Title: Re: EntityColor does not work.
Post by: JBR on November 16, 2019, 19:30:18
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.