GLSL & Mipmaps

Started by
10 comments, last by Deliverance 13 years, 1 month ago
What size is your texture? If you call texture2D instead, what do you see and does it appear to mip-map at distance?

NBA2K, Madden, Maneater, Killing Floor, Sims http://www.pawlowskipinball.com/pinballeternal

Advertisement
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:



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