Rendering drivers(solved)
Re: umm
Why the hell would anyone's mum stop them having an image hosting account? And why would she even need to know?3DModelerMan wrote: You see my mom won't let me have an account yet.
Re: umm
my mum didnt know i got an email account even when i was in primary schoolJP wrote:Why the hell would anyone's mum stop them having an image hosting account? And why would she even need to know?3DModelerMan wrote: You see my mom won't let me have an account yet.
My company: http://www.kloena.com
My blog: http://www.zhieng.com
My co-working space: http://www.deskspace.info
My blog: http://www.zhieng.com
My co-working space: http://www.deskspace.info
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
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
-
- Admin
- Posts: 3590
- Joined: Mon Oct 09, 2006 9:36 am
- Location: Scotland - gonnae no slag aff mah Engleesh
- Contact:
Little Billy?torleif wrote:The real question is 3DModelerMan a troll or just a 11 year old?
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
-
- Posts: 1691
- Joined: Sun May 18, 2008 9:42 pm
hey
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
My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
-
- Posts: 1691
- Joined: Sun May 18, 2008 9:42 pm
image
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.
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
My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
-
- Posts: 1691
- Joined: Sun May 18, 2008 9:42 pm
768
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
My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
-
- Posts: 1691
- Joined: Sun May 18, 2008 9:42 pm
oops
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
My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
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
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