SyntaxBomb - Indie Coders

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

Title: EntityColor does not work.
Post by: JBR on November 15, 2019, 12:17:47 AM
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 AM
This works for me

Code: BlitzMax
  1. SuperStrict
  2. Import sidesign.minib3d
  3.  
  4. Graphics3D 800,600
  5. Local cube:TEntity = CreateCube()
  6. EntityColor cube,255,0,0
  7.  
  8. Local camera:TCamera = CreateCamera()
  9. PositionEntity camera,0,0,-4
  10. Local light:TLight = CreateLight()
  11. RotateEntity light,45,45,45
  12.  
  13. While Not KeyHit(KEY_ESCAPE) And Not AppTerminate()
  14.         TurnEntity cube,.1,.2,.3
  15.         UpdateWorld
  16.         RenderWorld
  17.         Flip
  18. Wend
  19.  
  20.  
Title: Re: EntityColor does not work.
Post by: JBR on November 15, 2019, 03:32:39 PM
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, 07:30:18 PM
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.
SimplePortal 2.3.6 © 2008-2014, SimplePortal