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
🎉 Celebrating 25 Years of GameDev.net! 🎉
Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!
Creating a OpenGL texture from a resource file
how about writing a BMP to H
a small app that converts the bitmap to a includeable header
bmp ->
#ifndef BITMAPS_INCLUDED
#define BITMAPS_INCLUDED
static unsigned char bitmap[] = { 255, 33, 55, 32, ...... };
#endif
its not what you asked for, but it does the job...
a small app that converts the bitmap to a includeable header
bmp ->
#ifndef BITMAPS_INCLUDED
#define BITMAPS_INCLUDED
static unsigned char bitmap[] = { 255, 33, 55, 32, ...... };
#endif
its not what you asked for, but it does the job...
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[] = { .... };
=(
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[] = { .... };
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement