Irrlicht logo animated splash screen type intro

Competitions for Irrlicht or 3D in general.
Irrlicht Screenshot of the Month: Winner for January, vote for February, submit for March
alexionne
Posts: 55
Joined: Fri Jun 22, 2007 9:55 am
Location: Novi Sad, Serbia

Post by alexionne »

BlindSide wrote:And we can have CSkinnedAnimatedMeshIrrLogoSceneNode and have lots of fun :D
Right :-)

We can even write optimized version of CSkinnedAnimatedMeshIrrLogoSceneNodeTriangleSelector!

My original idea was that animation of Irrlich logo should be programmed, not pre-animated using some modeler/animation tool.

As of camera, it is definitely not that good idea :)
L1zb3th
Posts: 15
Joined: Thu Jul 26, 2007 1:27 am

Post by L1zb3th »

so, the idea is render into a splash screen ...
umhhhh...
so, the render, could be loaded frommm ...
an animated mesh or from a irr scene?
Au Revoir !
My Gramathicalz horrorz are precalkulated, zo Zhut Up !
_______
Bah, actually my english is poor, but...
forget it xDDDD
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

yes that's a better idea, a whole scene that is rendered to a texture. Much more flexible than forcing people to make a scene node.
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
L1zb3th
Posts: 15
Joined: Thu Jul 26, 2007 1:27 am

Post by L1zb3th »

umhhh, well, the idea is this, i've got a code, but i cant find the problem ..

Splash.h

Code: Select all

LRESULT CALLBACK DefaultWindowProcedure(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam){
    switch (msg)                  /* manipulador del mensaje */
    {
        case WM_DESTROY:
           PostQuitMessage(0);    /* envía un mensaje WM_QUIT a la cola de mensajes */
           break;
        default:                  /* para los mensajes de los que no nos ocupamos */
           return DefWindowProc(hwnd, msg, wParam, lParam);
    }
    return 0;
}


typedef struct IrrEnviroment{
    	irr::scene::ISceneManager* SceneManager;
    	irr::video::IVideoDriver* Driver;
    	irr::IrrlichtDevice* Device;
    	irr::gui::IGUIEnvironment* Gui;
    }IrrEnviroment;
    // this thing of namespaces it's driving me crazy ..


class SplashScreen{

    public:

        SplashScreen();
        ~SplashScreen();
        int Create(int X,int Y,int W,int H);
        bool Show();
        bool RenderLoop(bool* Render);

        LRESULT CALLBACK (*WinProcedure)(HWND, UINT, WPARAM, LPARAM);
        IrrEnviroment irrEnv;

        private:

               HWND hwnd,hRenderhWind;
               MSG msg;
               WNDCLASSEX wincl;
               bool Error;
               int W,H,X,Y;
               irr::SIrrlichtCreationParameters IrrCreationParams;


            };

               /* usually, i'm not so smartypants with names, but this
                isn't only irrlicht related, so, it could be a windows device
                so, i make the names more "descriptive"
                */

SplashScreen::SplashScreen(){
  Error^=Error;W^=W;H^=H;X^=X;Y^=Y; // Cleaning Up Or, setting to 0
  WinProcedure = DefaultWindowProcedure;
    }


int SplashScreen::Create(int X,int Y,int W,int H){
   wincl.hInstance = NULL;
   this->X = X;this->Y=Y;this->W=W;this->H=H;
   wincl.lpszClassName = "SplashScreenClass";
   wincl.lpfnWndProc = WinProcedure;
   wincl.style = CS_HREDRAW | CS_VREDRAW;
   wincl.cbSize = sizeof(WNDCLASSEX);

   wincl.hIcon = LoadIcon(NULL, IDI_APPLICATION);
   wincl.hIconSm = LoadIcon(NULL, IDI_APPLICATION);
   wincl.hCursor = LoadCursor(NULL, IDC_ARROW);
   wincl.lpszMenuName = NULL;
   wincl.cbClsExtra = 0;
   wincl.cbWndExtra = DLGWINDOWEXTRA;
   wincl.hbrBackground = (HBRUSH)COLOR_WINDOWTEXT; /* as always is black ...
                                                     yeah, a nasty fashioned
                                                     way of saying black*/
   if(!RegisterClassEx(&wincl)) Error = true;
   if (!Error){
 hwnd = CreateWindow(wincl.lpszClassName,"",WS_POPUP|SW_HIDE,X,Y,W,H,NULL, NULL,NULL, NULL);
 if (hwnd==NULL) Error = true;
}

// empotremos el puto irrlich :@

hRenderhWind = CreateWindow("RenderWin", "", WS_CHILD | BS_OWNERDRAW | WS_VISIBLE  ,X,Y,W,H, hwnd, NULL, NULL, NULL);

IrrCreationParams.WindowId = reinterpret_cast<irr::s32> (hRenderhWind );
IrrCreationParams.DriverType = irr::video::EDT_OPENGL;
irrEnv.Device = irr::createDeviceEx(IrrCreationParams);
irrEnv.SceneManager = irrEnv.Device->getSceneManager();
irrEnv.Driver = irrEnv.Device->getVideoDriver();
irrEnv.Gui = irrEnv.Device->getGUIEnvironment();


    return !Error;
}

bool SplashScreen::Show(){
    if (Error) return false;
    ShowWindow(hwnd, SW_SHOWDEFAULT);
    }


bool SplashScreen::RenderLoop(bool* Render){
 	while (irrEnv.Device->run()&& *Render==true ){
		irrEnv.Driver->beginScene(true, true, 0);
		irrEnv.SceneManager->drawAll();
		irrEnv.Gui->drawAll();
	    irrEnv.Driver ->endScene();
	}
}

    // here we could use a Get() function to return the struct, umhh, but, its public xD

SplashScreen::~SplashScreen(){

    }




Main.cpp

Code: Select all


#include <Windows.h>
#include <Irrlicht/Irrlicht.h>
#include "Splash.h"
#define ret return // dont gently caress with this xD



SplashScreen* Splash; // the splash itself

int DisplayH,DisplayW; // the Widht and height of screen

bool Render = true; // this is used for the rendering, the only way of broke RenderLoop is changing this value :roll: 

void GetRes(); // using WinGDI for obtaining it ...

int WINAPI WinMain(
    HINSTANCE hInstance,
    HINSTANCE hPrevInstance,
    LPSTR lpCmdLine,
    int nCmdShow){

         FreeConsole(); // funking console xD
          GetRes(); // we fill the info ...

        Splash  = new SplashScreen(); // we create the splash screen
        Splash->Create((DisplayW-400)/2,(DisplayH-200)/2,400,200); // here we create it with 400x200 size, centered on screen (W,H,X,Y)
        Splash->Show(); // we show it ..
        irr::gui::IGUIImage* Image =  Splash->irrEnv.Gui->addImage(Splash->irrEnv.Driver->getTexture("Test.jpg"),irr::core::position2d<int>(1,1)); // just a nasty fashioned way of testing xD
        Splash->RenderLoop(&Render); // the renderloop

    ret 1;
}


void GetRes(){
// ignore this xD
     HDC DisplayDC = GetDC(GetDesktopWindow());
     DisplayW = GetDeviceCaps(DisplayDC,HORZRES);
     DisplayH = GetDeviceCaps(DisplayDC,VERTRES);
     DeleteDC(DisplayDC);
     }
what part of CreateWindow() or CreateDeviceEx() doesn't understan that the second window is a child ? :evil: damned xD
wel, i will se the problem ...

i forgot, once created the splash and with the struct, the user can do all the render work that he want ..

Au Revoir !
My Gramathicalz horrorz are precalkulated, zo Zhut Up !
_______
Bah, actually my english is poor, but...
forget it xDDDD
L1zb3th
Posts: 15
Joined: Thu Jul 26, 2007 1:27 am

Post by L1zb3th »

umhhh, is somebody there ? xD
Au Revoir xP
My Gramathicalz horrorz are precalkulated, zo Zhut Up !
_______
Bah, actually my english is poor, but...
forget it xDDDD
LunarEffect
Posts: 4
Joined: Thu Feb 26, 2009 6:43 pm

Post by LunarEffect »

Good idea, I like it =D
wITTus
Posts: 167
Joined: Tue Jun 24, 2008 7:41 pm
Location: Germany

Post by wITTus »

Desecration of dead threads! :lol:
Generated Documentation for BlindSide's irrNetLite.
"When I heard birds chirping, I knew I didn't have much time left before my mind would go." - clinko
grumpymonkey
Posts: 222
Joined: Mon Jan 19, 2009 10:03 pm
Location: Miami, Florida
Contact:

Post by grumpymonkey »

irrlicht is free and opensource and you dont have to put the irrlicht logo on your projects, and usually people dont want to do it either. a competition like this will make it look like we have to do it or something.
Image
Post Reply