GLSL & Mipmaps
What size is your texture? If you call texture2D instead, what do you see and does it appear to mip-map at distance?
Okay, i finally nailed the little bastard! Thanks to all of you, who helped me through the debug process! dpadam's post started me thinking and i tried to visualize the mipmap levels(by assigning a different color to every mip level, that is i colored every pixel from each level different). I started the program and nothing happened(the mipmaps were not shown, only the base level). The error was mine, obviosuly. I had a function like this:
Well, problem solved , this code dissaparead:
And now everything is working as expected!
Thanks again!
void createPDM(std::string fileName, Endeavour::Assets::Texture* texture)
{
Endeavour::Assets::Image* image = (Endeavour::Assets::Image*)
Endeavour::Engine::getResourceFactory()->create("Image");
image->load(fileName);
image->allocateMipmaps();
// create pyramidal height map
......
// done
// what?!!!!!
Endeavour::Assets::Image* texture = (Endeavour::Assets::Texture*)
Endeavour::Engine::getResourceFactory()->create("Texture");
// what?!!!
texture->createFromImage(image);
delete image;
}
Well, problem solved , this code dissaparead:
Endeavour::Assets::Image* texture = (Endeavour::Assets::Texture*)
Endeavour::Engine::getResourceFactory()->create("Texture");
And now everything is working as expected!
Thanks again!
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement