For some reason, images are top down and mirrored.
I don’t think this the way it is supposed to be?
...
for (int i = 0; i < numberOfPages; i++)
{
pages[i].loadImage("Pages/"+ofToString(i)+".png");
}
...
void Book::draw()
{
int width = ofGetWidth()/2;
int height = ofGetHeight();
//TODO Höhe an Aspect Ratio anpassen.
pages[currentPageNumber].draw(0,0, width,height);
pages[currentPageNumber+1].draw(width,0, width, height);
}
I can’t see what I’m missing.
Ubuntu 9.04 64 that is.
I know, it is fairly easy to rotate images, just reporting for now.
that’s really weird, i’ve worked with some intel integrated some time ago and didn’t have that problem. it was 32 bits though. but i work usually with 64 bits and haven’t seen something like that.
i suppose it has something to do with loading images more than with the textures, but to be sure can you test this:
ofTexture tex;
unsigned char* pixels;
void testApp::setup(){
tex.allocate(640,480,GL_RGB);
pixels = new unsigned char[640*480*3];
for(int i=0; i<480; i++){
int value = 255.0*(float)i/480.0;
memset(pixels+i*640*3,value,640*3);
}
tex.loadData(pixels,640,480,GL_RGB);
}
void testApp::draw(){
tex.draw(20,20);
}
the result should be a 640*480 rectangle with a gradient from black to white, do you see it rotated too?