CreateMaterial() with #PB_Ignore for TextureID
CreateMaterial() with #PB_Ignore for TextureID
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)
- Bananenfreak
- Enthusiast

- Posts: 519
- Joined: Mon Apr 15, 2013 12:22 pm
Re: CreateMaterial() with #PB_Ignore for TextureID
I´m not sure, but have you tested to use 0 as TextureID?
Re: CreateMaterial() with #PB_Ignore for TextureID
TextureID(0) will return texture handle for texture ID 0. In PureBasic ID's start at 0.Bananenfreak wrote:I´m not sure, but have you tested to use 0 as TextureID?
Intel Core i7 Quad 2.3 Ghz, 8GB RAM, GeForce GT 630M 2GB, Windows 10 (x64)
- Bananenfreak
- Enthusiast

- Posts: 519
- Joined: Mon Apr 15, 2013 12:22 pm
Re: CreateMaterial() with #PB_Ignore for TextureID
No, 0 AS TextureID(...). You´re writing a 0 instead of TextureID(bla bla).
Re: CreateMaterial() with #PB_Ignore for TextureID
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.Bananenfreak wrote:No, 0 AS TextureID(...). You´re writing a 0 instead of TextureID(bla bla).
Intel Core i7 Quad 2.3 Ghz, 8GB RAM, GeForce GT 630M 2GB, Windows 10 (x64)