Rendering drivers(solved)

Post your questions, suggestions and experiences regarding to Image manipulation, 3d modeling and level editing for the Irrlicht engine here.
dlangdev
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR
Contact:

Post by dlangdev »

cut it out, 3DModelerMan. Don't let school break bring you down.
Image
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Re: umm

Post 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?
Image Image Image
Virion
Competition winner
Posts: 2148
Joined: Mon Dec 18, 2006 5:04 am

Re: umm

Post 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:
torleif
Posts: 188
Joined: Mon Jun 30, 2008 4:53 am

Post by torleif »

The real question is 3DModelerMan a troll or just a 11 year old?
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

Imageshack doesn't need an account. O_o
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Post by rogerborg »

torleif wrote:The real question is 3DModelerMan a troll or just a 11 year old?
Little Billy?
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
3DModelerMan
Posts: 1691
Joined: Sun May 18, 2008 9:42 pm

hey

Post 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;
}


That would be illogical captain...

My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post 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 Image Image
3DModelerMan
Posts: 1691
Joined: Sun May 18, 2008 9:42 pm

image

Post 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.
That would be illogical captain...

My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post 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?
Image Image Image
3DModelerMan
Posts: 1691
Joined: Sun May 18, 2008 9:42 pm

768

Post by 3DModelerMan »

My image is 768 X 768, is not scaled inside irrlicht, and I'm using openGL.
That would be illogical captain...

My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post 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.
Image Image Image
3DModelerMan
Posts: 1691
Joined: Sun May 18, 2008 9:42 pm

oops

Post by 3DModelerMan »

Umm... what is the nearest power of two size?. And could someone show me the calculation to find out?.
That would be illogical captain...

My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

I just told you what to do.
Image Image Image
Dorth
Posts: 931
Joined: Sat May 26, 2007 11:03 pm

Post 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
Post Reply