This topic is now archived and is closed to further replies.

Creating a OpenGL texture from a resource file

This topic is 6384 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Can somebody show me how to read a bitmap from a resource file and create a texture from it in OpenGL? (The thing is I don´t want to read the bitmap from disk) Thanks, Gandalf the White

Share this post

Link to post
Share on other sites
no, but it will surely work if you write your app correct. Or download one of those already programmed. I dont know any links.

just store the resx, resy, data and maybe data format if you intent to use multiple formats ( like data is RGB, RGBA, A )

const char bitmap_0_type = TYPE_RGB; // defined by you
const int bitmap_0_sizex = 256;
const int bitmap_0_sizey = 256;
const unsigned char bitmap_0_data[] = { .... };

Share this post

Link to post
Share on other sites