Page 4 of 10 FirstFirst ... 23456 ... LastLast
Results 31 to 40 of 92

Thread: Irr4Delphi (update - 18/12/08) Irrlicht with vBO's

  1. #31

    Irr4Delphi (update - 18/12/08) Irrlicht with vBO's

    Quote Originally Posted by detvog
    djoker

    can you make a update with proc/func that i
    can prog 'render to texture' ? :roll:



    in irrlicht is 'driver->createRenderTargetTexture....'
    driver->setRenderTarget.....



    [pascal]

    program render2texture;

    {$APPTYPE CONSOLE}

    uses
    SysUtils,dialogs,
    IRRLICHT in 'IRRLICHT.pas';



    var
    but0,but:IGUI;
    font:IFont;
    texture:ITexture;
    fixedCam,fairy,cube,fpscamera:ISceneNode;
    mesh:IAnimatedMesh;
    rot:IAnimator;

    finished:boolean=false;
    EEvents:TEngineEvents;

    Save8087CW: Word;



    begin

    Save8087CW := Get8087CW;
    Set8087CW($133F);

    Device_Init(EDT_DIRECT3D9,640,480,16,false,false,f alse);
    Render_SetResizeAble(true);
    Device_SetWindowCaption('IRRLICHT 4 Delphi');
    Render_SetDebug(true,true);
    Device_SetCursorVisible(true);






    fpscamera:=Scene_AddFPSCamera;
    Node_SetPosition(fpscamera,-50,50,-150);

    mesh:=Scene_AddMesh('../../media/faerie.md2');
    fairy:=Scene_AddNodFromMesh(mesh,vect(-10,0,-100),ZEROVECT,ADDVECT);
    Node_SetMaterialTexture(fairy,0, '../../media/faerie2.bmp');
    Anim_SetMD2Animation(fairy,EMAT_STAND);


    rot:=Scene_CreateRotationAnimator(vect(0.3,0.3,0)) ;
    cube:=Scene_AddCube(60,vect(-100,0,-100),ZEROVECT,ADDVECT);
    Node_AddAnimator(cube,rot);
    Node_SetMaterialFlag(cube,EMF_LIGHTING,false);

    Scene_AddLight(100,vect(-15,5,-105),color(255,255,255,255));
    Scene_SetAmbientLight(color(0,60,60,60));


    texture:=Texture_CreateRenderTargetTexture(256,256 );
    Node_SetMaterialTextureEx(cube,0,texture);
    fixedCam:=Scene_AddCamera(10,10,-80,-10,10,-100);


    while (Device_Run) and (not finished) do
    begin
    Device_GetEvents(EEvents);


    Render_BeginScene(true,true,0,0,0);

    Render_SetRenderTarge(texture,color(0,0,0,255));

    Node_SetVisible(cube,false);
    Scene_SetActiveCamera(fixedCam);



    Scene_DrawAll;

    Render_SetRenderTarge(nil,CBlack);
    Node_SetVisible(cube,true);
    Scene_SetActiveCamera(fpscamera);

    Scene_DrawAll;

    Render_EndScene;


    if EEvents.loopKeyInput.Key=27 then finished:=true;
    end;
    Texture_Free(texture);
    Device_Stop;

    Set8087CW(Save8087CW);

    end.
    [/pascal]
    Never underestimate the power of Delphi.
    <br />There's those who play games,...and then there's who make games...

  2. #32

    Irr4Delphi (update - 18/12/08) Irrlicht with vBO's

    Quote Originally Posted by detvog
    I think you make your wrapper in c++.
    At time i have work on a wrapper for irrlicht 1.3.1 but i have a problem
    with the KeyEvent.

    /* ////////////////////////////////////////////////////////////////////////////
    INPUT EVENT OPERATIONS
    */
    /* ----------------------------------------------------------------------------
    determine if a key event is available return true if one is
    */
    bool DLL_EXPORT IrrKeyEventAvailable( void )
    {
    return ( uiReadKeyEvent != uiWriteKeyEvent );
    }

    /* ----------------------------------------------------------------------------
    read the oldest key event in the buffer
    */
    ARCHIVED_KEY_EVENT *DLL_EXPORT IrrReadKeyEvent( void )
    {
    ARCHIVED_KEY_EVENT *report;

    // if there are any events evailable
    if ( uiReadKeyEvent != uiWriteKeyEvent )
    {
    // return the oldest event
    report = &archivekey[uiReadKeyEvent];

    // consume the event and if we exceed the buffer
    if ( ++uiReadKeyEvent >= MAX_ARCHIVED_EVENTS )
    // roll back to the start
    uiReadKeyEvent = 0;
    }
    else
    // there are no events available return a blank object
    report = &keyblank;

    return report;
    }



    I have a problem to wrap this 2 functions to delphi.

    ....
    KEY_EVENT = record
    key :integer;
    direction :integer;
    flags :integer;
    END;
    IRR_KEY_EVENT =^KEY_EVENT;
    .....

    function IrrKeyEventAvailable():integer; cdecl ;external IRR_DLL;
    (This do not work. IrrKeyEventAvailable() always is 0)

    function IrrReadKeyEvent():Irr_KEY_EVENT; cdecl ;external IRR_DLL;

    Can you help me ?

    Ps: I'am not a c++ programer and my english is ops:

    you have the event


    Code:
    virtual bool OnEvent&#40;const SEvent& event&#41;
    	&#123;
         if &#40;event.EventType == EET_GUI_EVENT&#41;
    		&#123;
    			s32 id = event.GUIEvent.Caller->getID&#40;&#41;;
    			IGUIEnvironment* env = device->getGUIEnvironment&#40;&#41;;
    			EngineEvents.GuiEvents.GuiType=event.GUIEvent.EventType;
    			EngineEvents.GuiEvents.GuiID=id;
              	return true;
    		//	event.GUIEvent.Element
    
    		&#125;
    
             if &#40;event.EventType == irr&#58;&#58;EET_KEY_INPUT_EVENT&#41;
    		   &#123;
    			EngineEvents.loopKeyInput=event.KeyInput;
    		    if &#40;KeysEvent&#41;  KeysEvent&#40;event.KeyInput&#41;;
    		 return false;
    		&#125;
           if &#40;event.EventType == EET_MOUSE_INPUT_EVENT&#41;
    		&#123;
    			EngineEvents.loopMouseInput=event.MouseInput;
    	 	  if &#40;MouseEvent&#41;  MouseEvent&#40;event.MouseInput&#41;;
    		 return false;
    		&#125;
          
    		return false;
    	&#125;		
    
    	
    &#125;;
    EventReceiver* receiver=new(EventReceiver);
    device->setEventReceiver(receiver);
    Never underestimate the power of Delphi.
    <br />There's those who play games,...and then there's who make games...

  3. #33

    Irr4Delphi (update - 18/12/08) Irrlicht with vBO's

    Thanks for your work. You are great.

    At time the download link is no ok for me.
    I can not download the update from your link
    (Server not found ??)

    Can you me send the update of the wrapper ?

    email: det@vollbio.de

    for irrlicht1.3.1 i have work with the wrapper from freebasic
    http://www.freebasic.net/forum/viewtopic.php?t=3584

    i think the event is given.

  4. #34

    Irr4Delphi (update - 18/12/08) Irrlicht with vBO's

    Quote Originally Posted by djoker
    Quote Originally Posted by lordzero
    voc?™ possui exemplos de jogos 2D e GUI?

    se tiver isso seria ??timo...
    olha pk na trabalhars com directx puro??

    ?© bem simples e rapido
    se quiseres tenho os meus motores 2d
    ent?£o com directx puro eu tenho intersse tamb?©m..

    se puder me passar eu te agrade?ßo.. eu j?° tentei fazer algo no passado... mas n?£o consegui resolver o problema do lost device e rotacionar sprites usando vertex buffer...

    voc?™ poderia compartilhar?
    Knowledge is power.

  5. #35

    Irr4Delphi (update - 18/12/08) Irrlicht with vBO's

    other quetion...

    you know irrKlang?

    you have plans to port this to pascal? I want something free and better of Bass.....

    this seems very very good but i never tried use...

    irrKlang's current features are:

    Plays multiple file formats, .WAV, .MP3, .OGG, .MOD, .XM, .IT, .S3M...
    Buffered and streamed audio playback, in 2D and 3D.
    irrKlang is platform independent: irrKlang runs on several operating systems including Windows 95, 98, NT, 2000, XP, Vista, Linux, Mac OS X (Intel as well as Power PC).
    High level resource management and autodetection: The engine can do everything for you. Just tell it to play a sound file, and it will load, cache and/or stream sound data for you automaticly, depending on what is best for performance and memory usage. But if you want to specify how the engine should handle this, you can do this as well.
    Sophisticated 3D sound engine designed to be used in games.
    Extendable: Possibility to write own file format readers/decoders to extend the engine with it.
    Sound effects such as the doppler effect for 3D sounds or 2D effects like echo, reverb, distortion, flanger and more.
    Exact seeking and position retrieval in streams and buffered sounds.
    Plugin System: Simply copy external created plugins to the place where irrKlang is being used and extend its functionality with it.
    Works with multiple compilers including Microsofts VisualStudio 6.0‚Ñ¢, VisualStudio.NET 7.0 - 8.0‚Ñ¢, and with g++3.2 - 4.0, also with support for Code::Blocks and XCode.
    Multi/Singlethreaded modes: The engine can run both multithreaded or singlethreaded in the same thread as your application, to make it possible to debug your application easier for example.
    Low level audio output manipulation: Possibility to alter any aspect of a playing sound like panning, volume and 3d position.
    Sound event call backs.
    File reading functionality can be overwritten by the user, of course, making it possible to let irrKlang read from own file archives for example.
    Knowledge is power.

  6. #36

    Irr4Delphi (update - 18/12/08) Irrlicht with vBO's

    Quote Originally Posted by lordzero
    other quetion...

    you know irrKlang?

    you have plans to port this to pascal? I want something free and better of Bass.....

    this seems very very good but i never tried use...

    irrKlang's current features are:

    Plays multiple file formats, .WAV, .MP3, .OGG, .MOD, .XM, .IT, .S3M...
    Buffered and streamed audio playback, in 2D and 3D.
    irrKlang is platform independent: irrKlang runs on several operating systems including Windows 95, 98, NT, 2000, XP, Vista, Linux, Mac OS X (Intel as well as Power PC).
    High level resource management and autodetection: The engine can do everything for you. Just tell it to play a sound file, and it will load, cache and/or stream sound data for you automaticly, depending on what is best for performance and memory usage. But if you want to specify how the engine should handle this, you can do this as well.
    Sophisticated 3D sound engine designed to be used in games.
    Extendable: Possibility to write own file format readers/decoders to extend the engine with it.
    Sound effects such as the doppler effect for 3D sounds or 2D effects like echo, reverb, distortion, flanger and more.
    Exact seeking and position retrieval in streams and buffered sounds.
    Plugin System: Simply copy external created plugins to the place where irrKlang is being used and extend its functionality with it.
    Works with multiple compilers including Microsofts VisualStudio 6.0‚Ñ¢, VisualStudio.NET 7.0 - 8.0‚Ñ¢, and with g++3.2 - 4.0, also with support for Code::Blocks and XCode.
    Multi/Singlethreaded modes: The engine can run both multithreaded or singlethreaded in the same thread as your application, to make it possible to debug your application easier for example.
    Low level audio output manipulation: Possibility to alter any aspect of a playing sound like panning, volume and 3d position.
    Sound event call backs.
    File reading functionality can be overwritten by the user, of course, making it possible to let irrKlang read from own file archives for example.
    http://pascalgamedevelopment.com/vie...light=irrklang

    i started translating it once, but i stoped and sticked with audiere or bass
    From brazil (:

    Pascal pownz!

  7. #37

    Irr4Delphi (update - 18/12/08) Irrlicht with vBO's

    djoker


    the downloadlink do not work :?

  8. #38

    Irr4Delphi (update - 18/12/08) Irrlicht with vBO's

    [quote="detvog"]djoker


    the download]

    i have uploaded it for here:

    http://www.lordzero.co.nr/irrlicht/[Megafileupload]irrlicht.rar

    is the second link avaliable in the first page...
    Knowledge is power.

  9. #39

    Irr4Delphi (update - 18/12/08) Irrlicht with vBO's

    thanks lordzero. i have download it.

    i think this is not the new update.
    with texture:=Texture_CreateRenderTargetTexture
    see the first side from this posts.

    djoker has make a new update.


    i have problem with the server from megafileupload.com.

    i hope djoker help.



    sorry for my english.

  10. #40

    Irr4Delphi (update - 18/12/08) Irrlicht with vBO's

    Quote Originally Posted by detvog
    thanks lordzero. i have download it.

    i think this is not the new update.
    with texture:=Texture_CreateRenderTargetTexture
    see the first side from this posts.

    djoker has make a new update.


    i have problem with the server from megafileupload.com.

    i hope djoker help.



    sorry for my english.
    http://depositfiles.com/files/4013693

    sory :roll:
    Never underestimate the power of Delphi.
    <br />There's those who play games,...and then there's who make games...

Page 4 of 10 FirstFirst ... 23456 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •