Page 2 of 3

Posted: Mon Jul 21, 2008 8:28 pm
by dlangdev
cut it out, 3DModelerMan. Don't let school break bring you down.

Re: umm

Posted: Tue Jul 22, 2008 7:24 am
by JP
3DModelerMan wrote::oops: You see my mom won't let me have an account yet.
Why the hell would anyone's mum stop them having an image hosting account? And why would she even need to know?

Re: umm

Posted: Tue Jul 22, 2008 7:37 am
by Virion
JP wrote:
3DModelerMan wrote::oops: You see my mom won't let me have an account yet.
Why the hell would anyone's mum stop them having an image hosting account? And why would she even need to know?
my mum didnt know i got an email account even when i was in primary school :lol:

Posted: Tue Jul 22, 2008 7:42 am
by torleif
The real question is 3DModelerMan a troll or just a 11 year old?

Posted: Tue Jul 22, 2008 7:52 am
by BlindSide
Imageshack doesn't need an account. O_o

Posted: Tue Jul 22, 2008 11:04 am
by rogerborg
torleif wrote:The real question is 3DModelerMan a troll or just a 11 year old?
Little Billy?

hey

Posted: Tue Jul 22, 2008 3:04 pm
by 3DModelerMan
Okay okay I just am saying I can't put up a screenshot yet, geez. Any way my gui image is pixelated when I use openGL is this a problem with my code?.

Code: Select all

//included files
#include <irrlicht.h>
#include "mast_event_receiver.cpp"
//main namspaces
using namespace irr;
using namespace core;
using namespace scene;
using namespace video;
using namespace io;
using namespace gui;
//main function
int main(int argc, char** argv)
{

//The irrlicht device
    IrrlichtDevice *device =
        createDevice(EDT_SOFTWARE, dimension2d<s32>(768, 640), 24,
/* first parameter on line specifies fullscreen*/false, false, false, 0);


    //device options
    //================================================================================
    //sets the window caption of the application
    device->setWindowCaption(L"Wolfpack");

    //================================================================================
    //Gets a pointer to the scene manager gui environment & video driver
    IVideoDriver* driver = device->getVideoDriver();
    ISceneManager* smgr = device->getSceneManager();
    IGUIEnvironment* guienv = device->getGUIEnvironment();
     //texture creation flags
    //================================================================================
    driver->setTextureCreationFlag(ETCF_OPTIMIZED_FOR_QUALITY, true);
    //gui functions
    //================================================================================
    IGUIImage* bkg = guienv->addImage(driver->getTexture("C:/Documents and Settings/Tanner/My Documents/Wolfpack/Bitmaps/Gui/main_splash_screen.bmp"),
    position2d<int>(0,0));


    //if a key is pressed then delete the splash screen

    //================================================================================
    //draw everything
    while(device->run())
    {

        driver->beginScene(true, true, SColor(0,200,200,200));

        smgr->drawAll();
        guienv->drawAll();
        driver->endScene();

    }

   //deletes the device
    device->drop();

    return 0;
}



Posted: Tue Jul 22, 2008 3:40 pm
by JP
It's really really really hard for us to tell you with out seeing what you mean... Man the feck up and just put a screenshot online, use rapidshare if you have to!

image

Posted: Tue Jul 22, 2008 5:25 pm
by 3DModelerMan
Here's the same problem I had in this image
http://static.flickr.com/88/251736142_5319379248_o.jpg
I used power of two textures and everything.

Posted: Wed Jul 23, 2008 6:59 am
by JP
What size is the original image you load up and what size are you drawing it on screen. Also what driver are you using?

768

Posted: Wed Jul 23, 2008 3:00 pm
by 3DModelerMan
My image is 768 X 768, is not scaled inside irrlicht, and I'm using openGL.

Posted: Wed Jul 23, 2008 3:09 pm
by JP
768 is not a power of two, hence the image will be scaled up to 1024 (nearest power of two) and that will introduce artifacts.

resize your image to either 512x512 or 1024x1024.

oops

Posted: Wed Jul 23, 2008 3:13 pm
by 3DModelerMan
Umm... what is the nearest power of two size?. And could someone show me the calculation to find out?.

Posted: Wed Jul 23, 2008 3:15 pm
by JP
I just told you what to do.

Posted: Wed Jul 23, 2008 4:24 pm
by Dorth
what is the calculation to find out? Are you serious?

log[base 2](size_of_texture) = exponent

you take (int)exponent and you got the lowest pow of 2

if exponent == (int)exponent then size_of_texture is already a pow of 2

if you don't want to lose details, you probably want to go to the highest pow of 2, which is (int)exponent +1

to find the closest, simply compare which is smaller, size_of_texture - 2^(int)exponent or 2^(int)(exponent+1) - size_of_texture