@chris_abyi wrote:
Hi,
I want to reuse the same image several times as tiles in a game level. I defined the texture as class member:
private:
ofTexture floor;Then I load the image for the texture in the setup() method:
void ofApp::setup(){
ofLoadImage(floor, "floor.png");
...
}And finally, I draw it:
void ofApp::draw(){
floor.draw(x,y,1);
...
}I receive the warning message [warning] ofGLRenderer: draw(): texture is not allocated for each tile; what am I doing wrong? Where and how can I allocate the texture, and how? Is there a better way to do what I'm trying to achieve?
Thanks,
Christian
Posts: 2
Participants: 2