PDA

View Full Version : Problems loading a PNG texture



chronozphere
14-07-2011, 09:28 AM
Hey,

I'm having difficulties loading a PNG texture from file. All I see is a white rectangle when I render it. The log says:



[00001930ms] Unable to load texture: "G:\proj\defender\bin\data\tux_stand.png"


I've used tux_stand to make sure the image wasn't the problem. It seems that ManagerTextures.count.formats is zero. I can't find any code that loads these formats. I guess something went wrong when I tried to remove redundant files from my project directory. Or maybe i forgot to copy some files to it. ???

Can somebody help me out?

Thanks

chronozphere
14-07-2011, 09:42 AM
That was pretty simple. Seems like every image format has it's own unit that must be included aswell.



uses
...
zgl_textures,
zgl_textures_png,
zgl_textures_jpg,
...;


I'd like to see some kind of guide that explains these things. Would help alot :)

Andru
14-07-2011, 12:48 PM
I'd like to see some kind of guide that explains these things. Would help alot
demos\Your IDE here\04 - Text\Project File, line 19 :)

chronozphere
14-07-2011, 01:12 PM
Hehe, I'm not much of a reader when it comes to demo sources. Usually I just run them and globally analyze them. I actually meant that it would be nice to have a webpage that explains in detail how zengl is set up. I believe it's not that hard to summarize how it works.

Fortunately, I see that there is allready some info on the wiki. :)