image in the background

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
wEEp
Posts: 70
Joined: Thu Nov 27, 2008 7:55 am

image in the background

Post by wEEp »

Hey guys,

i have this src

Code: Select all

  WinExec ("lgo.exe", SW_SHOW);

  Sleep(1000);
  HWND wnd = 0; 
  HWND wnd2 = 0; 
  wnd = FindWindow(NULL, "logo") ; 
  while(!wnd)
  { 
    if(wnd) 
	{
		wnd = GetWindow(wnd, GW_CHILD); 
   
	}
  } 

  SIrrlichtCreationParameters ppp; 
  ppp.AntiAlias = false; 
  ppp.Bits = 32; 
  ppp.DriverType = EDT_DIRECT3D9; 
  ppp.EventReceiver = 0; 
  ppp.Fullscreen = false; 
  ppp.HighPrecisionFPU = false; 
  ppp.Stencilbuffer = false; 
  ppp.Vsync = false; 
  ppp.WindowSize = dimension2d<s32>(800, 600); 
  ppp.WindowId = wnd; 

IrrlichtDevice *device = createDeviceEx(ppp); 

  IVideoDriver* driver = device->getVideoDriver(); 
  ISceneManager* smgr = device->getSceneManager(); 
  IGUIEnvironment* guienv = device->getGUIEnvironment(); 

  ISceneNode* node = smgr->addBillboardSceneNode(); 
  node->setMaterialTexture(0, driver->getTexture("logo.jpg"));
  node->setMaterialFlag(EMF_LIGHTING,false);
  node->setPosition(vector3df(0, -50, 20)); 
  ICameraSceneNode* cam = smgr->addCameraSceneNode(); 
  cam->setTarget(vector3df(0, -50, 20));
The image is now quite small (image size is 800 x 600 and the size of the window i created is 200 x 300) in this bar i created. The background is then blue.

How can i make that the image fill the WHOLE window? Like a background
Dan911
Posts: 21
Joined: Tue Dec 16, 2008 11:28 pm

hi

Post by Dan911 »

weep, in the API theres a parameter for billboards to set the size.. think this is what you want.

http://irrlicht.sourceforge.net/docu/cl ... 5806a99c3a
vitek
Bug Slayer
Posts: 3919
Joined: Mon Jan 16, 2006 10:52 am
Location: Corvallis, OR

Post by vitek »

There are several problems with using billboards like this. If you want a background image, it might be better to use driver->draw2dImage().

Travis
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Re: image in the background

Post by Acki »

wEEp wrote:Hey guys,

i have this src

Code: Select all

  WinExec ("lgo.exe", SW_SHOW);

  Sleep(1000);
  HWND wnd = 0; 
  HWND wnd2 = 0; 
  wnd = FindWindow(NULL, "logo") ; 
  while(!wnd)
  { 
    if(wnd) 
	{
		wnd = GetWindow(wnd, GW_CHILD); 
   
	}
  } 

  SIrrlichtCreationParameters ppp; 
  ppp.AntiAlias = false; 
  ppp.Bits = 32; 
  ppp.DriverType = EDT_DIRECT3D9; 
  ppp.EventReceiver = 0; 
  ppp.Fullscreen = false; 
  ppp.HighPrecisionFPU = false; 
  ppp.Stencilbuffer = false; 
  ppp.Vsync = false; 
  ppp.WindowSize = dimension2d<s32>(800, 600); 
  ppp.WindowId = wnd; 

IrrlichtDevice *device = createDeviceEx(ppp); 

  IVideoDriver* driver = device->getVideoDriver(); 
  ISceneManager* smgr = device->getSceneManager(); 
  IGUIEnvironment* guienv = device->getGUIEnvironment(); 

  ISceneNode* node = smgr->addBillboardSceneNode(); 
  node->setMaterialTexture(0, driver->getTexture("logo.jpg"));
  node->setMaterialFlag(EMF_LIGHTING,false);
  node->setPosition(vector3df(0, -50, 20)); 
  ICameraSceneNode* cam = smgr->addCameraSceneNode(); 
  cam->setTarget(vector3df(0, -50, 20));
The image is now quite small (image size is 800 x 600 and the size of the window i created is 200 x 300) in this bar i created. The background is then blue.

How can i make that the image fill the WHOLE window? Like a background
Why did you PM me exactly this post !?!?! :x
even addressed to "Hey guys" !!! :evil:
you not even get a :RTFM: from me now... :roll:
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
geckoman
Posts: 143
Joined: Thu Nov 27, 2008 11:05 am
Location: Germany
Contact:

Post by geckoman »

Search for posts by me, I got some answers that work in a Thread by me.
Post Reply