DevIL - ilutGLBindTexImage fehler
-
Hallo ich versuche gerade mit der DevIl lib ein bild in ein OpenGL programm zu laden. Das laden des Bildes an sich mit ilLoadImage und so weiter funktioniert. Wenn ich jetzt aber das Bild mit ilutGLBindTexImage an OpenGL weitergeben möchte sagt der compiler mir immer das ilutGLBindTexImage in diesem Gültigkeitsbereich nicht definiert ist.
Hier ist mein Code:#include "Block.h" Block::Block(int x, int y, BlockType type) { this->x = x; this->y = y; this->type = type; ilInit(); ilutRenderer(ILUT_OPENGL); ilGenImages(1, &blockImage); ilBindImage(blockImage); switch(type) { case STONE: ilLoadImage("res/stone.png"); break; case DIRT: ilLoadImage("res/dirt.png"); break; case GRASS: ilLoadImage("res/grass.png"); break; case WOOD: ilLoadImage("res/wood.png"); break; } } Block::Block() { } void Block::draw() { blockTexture = ilutGLBindTexImage(); ilDeleteImage(blockImage); glBegin(GL_QUADS); glTexCoord2f(0, 0); glVertex2f(x*BLOCK_SIZE, y*BLOCK_SIZE); glTexCoord2f(1, 0); glVertex2f((x+1)*BLOCK_SIZE, y*BLOCK_SIZE); glTexCoord2f(1, 1); glVertex2f((x+1)*BLOCK_SIZE, (y+1)*BLOCK_SIZE); glTexCoord2f(0, 1); glVertex2f(x*BLOCK_SIZE, (y+1)*BLOCK_SIZE); glEnd();
die devIl header sind in der block.h includiert daran liegts also nicht.
gruß darman96