CreateMaterial() with #PB_Ignore for TextureID

Everything related to 3D programming
Olby
Enthusiast
Enthusiast
Posts: 461
Joined: Mon Jan 12, 2009 10:33 am
Contact:

CreateMaterial() with #PB_Ignore for TextureID

Post 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.
Intel Core i7 Quad 2.3 Ghz, 8GB RAM, GeForce GT 630M 2GB, Windows 10 (x64)
User avatar
Bananenfreak
Enthusiast
Enthusiast
Posts: 519
Joined: Mon Apr 15, 2013 12:22 pm

Re: CreateMaterial() with #PB_Ignore for TextureID

Post by Bananenfreak »

I´m not sure, but have you tested to use 0 as TextureID?
Image
Olby
Enthusiast
Enthusiast
Posts: 461
Joined: Mon Jan 12, 2009 10:33 am
Contact:

Re: CreateMaterial() with #PB_Ignore for TextureID

Post 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. :)
Intel Core i7 Quad 2.3 Ghz, 8GB RAM, GeForce GT 630M 2GB, Windows 10 (x64)
User avatar
Bananenfreak
Enthusiast
Enthusiast
Posts: 519
Joined: Mon Apr 15, 2013 12:22 pm

Re: CreateMaterial() with #PB_Ignore for TextureID

Post by Bananenfreak »

No, 0 AS TextureID(...). You´re writing a 0 instead of TextureID(bla bla).
Image
Olby
Enthusiast
Enthusiast
Posts: 461
Joined: Mon Jan 12, 2009 10:33 am
Contact:

Re: CreateMaterial() with #PB_Ignore for TextureID

Post 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.
Intel Core i7 Quad 2.3 Ghz, 8GB RAM, GeForce GT 630M 2GB, Windows 10 (x64)
Post Reply