CreateMaterial() forces Texture?

Everything related to 3D programming
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

CreateMaterial() forces Texture?

Post by IdeasVacuum »

If we can set a material colour with SetMaterialColor(), shouldn't that mean we can apply colour to an entity without applying a texture? If we can, then Texture should be optional in the CreateMaterial() function, else we are always forced to use a material script.....

Edit: Well, it seems that the system is happy to accept an empty or blank Texture........
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
User avatar
Samuel
Enthusiast
Enthusiast
Posts: 756
Joined: Sun Jul 29, 2012 10:33 pm
Location: United States

Re: CreateMaterial() forces Texture?

Post by Samuel »

As far as I know you need to have a texture for your material. If you want a red texture without having to load a texture or write a script then
give this a try.

Code: Select all

    CreateTexture(0,32,32)
     StartDrawing(TextureOutput(0))
         Box(0, 0, 32, 32 ,RGB(150,0,0))
     StopDrawing()
Then just use this texture on your material.
PMV
Enthusiast
Enthusiast
Posts: 727
Joined: Sat Feb 24, 2007 3:15 pm
Location: Germany

Re: CreateMaterial() forces Texture?

Post by PMV »

OGRE3D doesn't needs a texture, it can have vertice-colors
So this is a good feature request (thread should be moved) ;)

MFG PMV
Post Reply