Computergrafik

Texturen Laden

2D Textureinstellungen | | 2D Textur Interpolation

Laden einer 2D Textur aus einer Datei:

GLuint tex_id;
const char filename[] = "filename.ext";
int iwidth, iheight;

tex_id = lglLoadQtTexture(filename, &iwidth, &iheight, false);
assert(tex_id != 0);

std::stderr << "successfully loaded texture " << filename
            << " with size " << iwidth << "x" << iheight
            << std::endl;

Unterstützte Formate via Qt: JPEG und PNG

2D Textureinstellungen | | 2D Textur Interpolation

Options: