Page 1 of 1

CreateMaterial() with #PB_Ignore for TextureID

Posted: Wed Aug 07, 2013 2:00 pm
by Olby
We should really have an option to create a material without specifying a texture file name. Why? Because there are many situations when you need a coloured object without a texture both for debugging and for easier identification. Also using something like TextureID(LoadTexture(0,"White.png")) or CreateTexture() is plain ridiculous and consumes memory unnecessary. Please add support for #PB_Ignore in TextureID field of CreateMaterial(). Thanks.

Re: CreateMaterial() with #PB_Ignore for TextureID

Posted: Wed Aug 07, 2013 5:07 pm
by Bananenfreak
I´m not sure, but have you tested to use 0 as TextureID?

Re: CreateMaterial() with #PB_Ignore for TextureID

Posted: Wed Aug 07, 2013 6:39 pm
by Olby
Bananenfreak wrote:I´m not sure, but have you tested to use 0 as TextureID?
TextureID(0) will return texture handle for texture ID 0. In PureBasic ID's start at 0. :)

Re: CreateMaterial() with #PB_Ignore for TextureID

Posted: Thu Aug 08, 2013 8:25 am
by Bananenfreak
No, 0 AS TextureID(...). You´re writing a 0 instead of TextureID(bla bla).

Re: CreateMaterial() with #PB_Ignore for TextureID

Posted: Thu Aug 08, 2013 11:16 am
by Olby
Bananenfreak wrote:No, 0 AS TextureID(...). You´re writing a 0 instead of TextureID(bla bla).
Like I said nothing works except for a valid texture ID. If you would actually do a search there is a similar request dating back to 2003 and Fred suggests loading a "coloured" texture. A bit of an overkill in my opinion.