Ooops
May 26, 2020, 06:36:12 PM

Author Topic: EntityColor does not work.  (Read 731 times)

Offline JBR

  • Jr. Member
  • **
  • Posts: 91
EntityColor does not work.
« 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.

Offline TomToad

  • Sr. Member
  • ****
  • Posts: 482
Re: EntityColor does not work.
« Reply #1 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.  
------------------------------------------------
8 rabbits equals 1 rabbyte.

Offline JBR

  • Jr. Member
  • **
  • Posts: 91
Re: EntityColor does not work.
« Reply #2 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.

Offline JBR

  • Jr. Member
  • **
  • Posts: 91
Re: EntityColor does not work.
« Reply #3 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