Quantcast
Channel: beginners - openFrameworks
Viewing all articles
Browse latest Browse all 4929

"texture is not allocated" warning when drawing

$
0
0

@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

Read full topic


Viewing all articles
Browse latest Browse all 4929

Trending Articles