PNG Format
I''m trying to use the PNG Format for textures in my GL app.
In the texture engine, it reads in everything from the texture file, and then send that data, and the size to the function depending on which type the file is (JPEG, TGA, PNG - JPEG and TGA working...) but I''m having difficulties using libpng.
Anyone know of any code that shows how it''s done or knows how to do it ??
It would be greatly appreciated.
As in the libpng manual, I''ve set progressive reading and I''m using png_process_data and passing in the data in the file to there....
The row_callback function they have uses progressive combine row function that uses an ''old row'' variable, but it comes out of no where.. they just pulled it out of no where... anyone know anythign about that too ?? or if it''s even really needed, or should I just pass null rows ??
And where and how would I put the uncompressed version into a char* image......
I''ve worked out how to use PNG for when you can specify the file to use, but that''s not how I want to do it.
Thx.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement