If I load a 1x1 texture of a white pixel, it shows up as black if I call
driver->draw2DImage(white, core::position2d<s32>(5,5));
If I make it a 2x2 white rectangle is shows up fine.
It appears it's OpenGL related, as Burning's Video and the normal software renderer show up fine. I didn't try DX.
Single pixel image returns black
Re: Single pixel image returns black
Could be that your card doesn't like non power of two textures.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
Re: Single pixel image returns black
Although 1 is a power of two, at least mathematically. Moreover, the smallest mipmap is always 1x1, so it should be supported by all gfx cards. But I'm not sure, if we may have to disable mipmapping for 1x1 textures. Better chances are, that it's something completely unrelated, though. Guess we need a test case addition.
Re: Single pixel image returns black
I have tried using (not loading though) 1x1 textures, and everything goes well. I create a 1x1 texture, i lock it, then i write the 0xFFFFFFFF value to it, and unlock it, and the texture works perfectly, at least, under DX, i haven't tested it on GL, but the procedure shouldn't be any diferent for GL
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
Re: Single pixel image returns black
Oops, Hybrid right as usual. That shouldn't be the problem.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm