It is currently Wed Nov 25, 2020 12:34 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 240 posts ]  Go to page Previous  1 ... 3, 4, 5, 6, 7, 8, 9 ... 16  Next
Author Message
 Post subject:
PostPosted: Wed Jan 17, 2007 7:56 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Thu Oct 05, 2006 6:44 am
Posts: 169
Quote:
btw. you speaking german ?

No.

Heh, one more question: How can I set node transparency (like EntityAlpha in B3D) ?

_________________
Don't try to catch ze Night !
Remember: 'z' is better zen 'th' =) !
Sorry for bad english.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Jan 18, 2007 9:01 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Thu Oct 05, 2006 6:44 am
Posts: 169
Bug Report ?
Using this code:
Code:
XIncludeFile "C:\Program Files\PureBasic\Examples\IrrlichtWrapper\PureBasic\IrrlichtWrapper.pbi"

Global *Camera.irr_camera, *RotPoint.irr_node
Define *Cube.irr_node, Dist = -30
Define *KeyEvent.IRR_KEY_EVENT
Define *Texture.irr_texture
Dim *Cones.irr_node(3)

InitIrrlichtWrapperDll()
OpenWindow(0, 0, 0, 800, 600, "--My Test--",  #PB_Window_ScreenCentered)
IrrStartex(#IRR_EDT_DIRECT3D9, 800, 600, #False, #True, #True, 32, #True, #True, #True, WindowID(0))

Procedure SetCamera(Dist.F)
Define X.F, Y.F, Z.F
IrrGetNodePosition(*RotPoint, @X, @Y, @Z)
IrrSetNodePosition(*Camera, X, Y, Z)
IrrMoveNodeRight(*Camera, Dist)
EndProcedure

Procedure.F Wrap(Angle.F)
If Angle >= 360 : Angle - 360 : EndIf
If Angle < 0 : Angle + 360 : EndIf
ProcedureReturn Angle
EndProcedure

Procedure Rotate(*Node, X.F, Y.F, Z.F)
Define OX.F, OY.F, OZ.F
IrrGetNodeRotation(*Node, @OX, @OY, @OZ)
IrrSetNodeRotation(*Node, Wrap(OX + X), Wrap(OY + Y), Wrap(OZ + Z))
EndProcedure

*Camera = IrrAddCamera(0, 0, 0, 0, 0, 0)
*Cube = IrrAddCubeSceneNode(5)
*RotPoint = IrrAddEmptySceneNode()
For I = 0 To 3
*Cones(I) = IrrAddConeSceneNode(20, 20, 2)
IrrSetNodeScale(*Cones(I), 1, 2, 1)
IrrSetNodeRotation(*Cones(I), 0, 0, I * 90)
IrrMoveNodeUp(*Cones(I), 2.5)
IrrSetNodeAllMaterialEmissiveColor(*Cones(I), 0, 0, 180, 0)
IrrAddChildToParent(*Cones(I), *Cube)
Next I
IrrSetNodeAllMaterialEmissiveColor(*Cube, 0, 255, 0, 0)

Define Rot.f, NOP.F, X.F, Y.F, Z.F

SetCamera(Dist)
IrrAddChildToParent(*Camera, *RotPoint)

While IrrRunning()
If IrrKeyEventAvailable()
*KeyEvent = IrrReadKeyEvent()
If *KeyEvent\direction = #IRR_KEY_DOWN
Select *KeyEvent\key
Case #IRR_KEY_ARROW_LEFT : Rotate(*RotPoint, 0, -5, 0)
Case #IRR_KEY_ARROW_RIGHT : Rotate(*RotPoint, 0, 5, 0)
Case #IRR_KEY_ARROW_UP : Rotate(*RotPoint, 5.001, 0, 0)
Case #IRR_KEY_ARROW_DOWN : Rotate(*RotPoint, -5.001, 0, 0)
Case #IRR_KEY_ADD : If Dist < -10 : Dist + 1 : SetCamera(Dist) : EndIf
Case #IRR_KEY_SUBTRACT : If Dist > -50 : Dist - 1 : SetCamera(Dist) : EndIf
Case #IRR_KEY_ESCAPE : End
EndSelect
EndIf
EndIf

Rotate(*Cube, 0, 0, 1)

IrrBeginScene(0, 0, 0)
IrrDrawScene()
IrrEndScene()

Wend
IrrStop()
FreeIrrlichtWrapperDll()


Try, using DOWN key, rotate camera to position straight under my figure: you will see some weird things...

_________________
Don't try to catch ze Night !
Remember: 'z' is better zen 'th' =) !
Sorry for bad english.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sat Jan 27, 2007 10:19 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Thu Oct 05, 2006 6:44 am
Posts: 169
AP ?

_________________
Don't try to catch ze Night !
Remember: 'z' is better zen 'th' =) !
Sorry for bad english.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Feb 02, 2007 10:47 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Thu Oct 05, 2006 6:44 am
Posts: 169
Any progress ?

_________________
Don't try to catch ze Night !
Remember: 'z' is better zen 'th' =) !
Sorry for bad english.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Feb 14, 2007 9:39 am 
Offline
Enthusiast
Enthusiast

Joined: Thu Oct 05, 2006 8:13 pm
Posts: 171
Anyone ported the pixel lighting example btw?


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Feb 20, 2007 9:28 am 
Offline
Enthusiast
Enthusiast

Joined: Thu Oct 05, 2006 8:13 pm
Posts: 171
Can use vertex transparency without lighting being on? Is this a bug or?


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Feb 22, 2007 12:11 pm 
Offline
User
User

Joined: Sat May 10, 2003 2:03 pm
Posts: 70
Location: Essen, Germany
Just a might be stupid question:
Why do we need a Irrlicht wrapper?
As I could see, Irrlicht comes with a dll. Why not simply load the dll als lib and that is all?


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Feb 22, 2007 12:18 pm 
Offline
Enthusiast
Enthusiast

Joined: Thu Oct 05, 2006 8:13 pm
Posts: 171
It's an object oriented engine, so it needs a wrapper to work it's best with PureBasic. That being said, the integration could be better ;)


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Feb 22, 2007 12:36 pm 
Offline
User
User

Joined: Sat May 10, 2003 2:03 pm
Posts: 70
Location: Essen, Germany
Hm, I do not really understand, what that means.

I want to use the irrlicht engine for rendering terrains, landscapes, produced with my terrain generator GeoControl.
So, the user interactions would be solved with PB. that then gives the commands to the irrlicht engine.

Is this not possible, or is it more, that I have to think more objectorientated?

I need the functions for loading a 16bit raw terrain, resolution up to 8192, but 4096 would be enough, for textures for those terrains, shadows and lightning and may be GI. Also a inifinte water plane and water shaders.

Can your wrapper do this?

It is really urgent. I want to release the second version in the first half, and if the 3D engine works good, I will have to recode some things, to work in 3D.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Feb 22, 2007 1:28 pm 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Sun Apr 27, 2003 4:41 pm
Posts: 1661
Location: Germany
JoRo wrote:
As I could see, Irrlicht comes with a dll. Why not simply load the dll als lib and that is all?

While it's absolutely possible to directly use the DLL using interfaces
(COM) up to a certain extent, there're still too many things that had to be
changed inside the DLL in order to make it properly work from PureBasic.

For example, a lot of functions return byVal which leads to crashes as
PB can't handle this. Other (necessary) functions aren't exported at all,
meaning you'd have to re-code them in PB or change the DLL accordingly.

Whatever you look at it, the original DLL or LIB can't be used so there
are only two options left: Write a C-ish wrapper and surrender OOP or
change the DLL.

_________________
Good programmers don't comment their code. It was hard to write, should be hard to read.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Feb 22, 2007 1:43 pm 
Offline
User
User

Joined: Sat May 10, 2003 2:03 pm
Posts: 70
Location: Essen, Germany
Thanks for that explanation, now I see the problems.
That seems to be a bit a weak point of PB. The Ogre engine does not have a wrapper to PB, and the implementation in PB itself is .............

So, it looks like buying ColdSteel, if it is far enough or using the wrapper here.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Feb 22, 2007 1:50 pm 
Offline
Addict
Addict
User avatar

Joined: Wed Apr 30, 2003 8:15 am
Posts: 1051
Location: Germany
JoRo wrote:
The Ogre engine does not have a wrapper to PB, and the implementation in PB itself is .............


No, the Ogre PB Engine is going that way:

traumatic wrote:
[ ] Write a C-ish wrapper and surrender OOP
[x] change the DLL.


:wink:


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Feb 22, 2007 2:44 pm 
Offline
Moderator
Moderator
User avatar

Joined: Sat Apr 26, 2003 1:11 am
Posts: 1395
JoRo wrote:
So, it looks like buying ColdSteel, if it is far enough or using the wrapper here.

and fact is that the 'coldsteel' is not more than a wrapper for irrlicht,
as its based on that sources.

_________________
SPAMINATOR NR.1


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Feb 23, 2007 7:39 am 
Offline
User
User

Joined: Sat May 10, 2003 2:03 pm
Posts: 70
Location: Essen, Germany
Well, just tested the wrapper.
Seems, like only the silly 8 bit terrains can be loaded.
I have read that there is a patch for support of 16 bit terrains in Irrlicht.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Feb 23, 2007 8:13 am 
Offline
Addict
Addict
User avatar

Joined: Wed Apr 30, 2003 8:15 am
Posts: 1051
Location: Germany
I could watch Ring's new signature for hours... :P


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 240 posts ]  Go to page Previous  1 ... 3, 4, 5, 6, 7, 8, 9 ... 16  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye