Horde3D

Everything else that doesn't fall into one of the other PB categories.
User avatar
idle
Always Here
Always Here
Posts: 5838
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Horde3D

Post by idle »

Just noticed Horde3D now supports windows OSX and Linux
From a usability point of view it's good news it's all extern c and modular

http://www.horde3d.org/

Will post examples if I get a chance to write an import over the weekend

here's the zip of the knight example Linux binaries only
http://www.idlearts.com/knight.zip

windows and mac users will need to download and build horde3D
http://www.horde3d.org/download.html

Image
Last edited by idle on Sun May 13, 2012 7:44 am, edited 2 times in total.
Windows 11, Manjaro, Raspberry Pi OS
Image
eesau
Enthusiast
Enthusiast
Posts: 589
Joined: Fri Apr 27, 2007 12:38 pm
Location: Finland

Re: Horde3D

Post by eesau »

I had a wrapper made for the current beta 5 version of Horde3D (here) but it's not currently online. I can re-upload it if you want.

Horde3D is a great framework but needs a bit of fiddling with pipelines etc. to get results. Also it needs an OpenGL rendering context but I suppose you could use PB with the OpenGL subsystem and a screen for that (never tried that though, I used to create it on my own or with SFML).
jesperbrannmark
Enthusiast
Enthusiast
Posts: 536
Joined: Mon Feb 16, 2009 10:42 am
Location: sweden
Contact:

Re: Horde3D

Post by jesperbrannmark »

Ok. Yes this is very interesting. Please put that online (or maybe it could go on purearea website as well?)
Thanks! :-)
eesau
Enthusiast
Enthusiast
Posts: 589
Joined: Fri Apr 27, 2007 12:38 pm
Location: Finland

Re: Horde3D

Post by eesau »

Here's the link. I haven't touched it in months but it should work just fine. Let me know if there are any bugs etc.
User avatar
idle
Always Here
Always Here
Posts: 5838
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: Horde3D

Post by idle »

Thanks eesau, that will save some time.

I guess you could use PB's screen libs with opengl subsystem
there's also GLFW which is what the examples are based on
http://www.purebasic.fr/english/viewtop ... 16&t=49395
Windows 11, Manjaro, Raspberry Pi OS
Image
User avatar
idle
Always Here
Always Here
Posts: 5838
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: Horde3D

Post by idle »

did a more or less 1:1 port of the knight example
windows and mac users will need to download the sdk and build it.

I generated prototypes rather than using the imports to avoid linker errors with the shared objects
but will add the unresolved lib imports to eesau's includes at a later stage

here's the zip
http://www.idlearts.com/knight.zip


Hord3D SDK
http://www.horde3d.org/download.html
Windows 11, Manjaro, Raspberry Pi OS
Image
DarkDragon
Addict
Addict
Posts: 2344
Joined: Mon Jun 02, 2003 9:16 am
Location: Germany
Contact:

Re: Horde3D

Post by DarkDragon »

eesau wrote:Also it needs an OpenGL rendering context but I suppose you could use PB with the OpenGL subsystem and a screen for that
No, because of depth buffer settings. PB needs no depth buffer for the sprites. Only if you use InitEngine3D before, but then it will also load OGRE.
bye,
Daniel
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Re: Horde3D

Post by Polo »

Works nice on Mac!
eesau
Enthusiast
Enthusiast
Posts: 589
Joined: Fri Apr 27, 2007 12:38 pm
Location: Finland

Re: Horde3D

Post by eesau »

DarkDragon wrote:
eesau wrote:Also it needs an OpenGL rendering context but I suppose you could use PB with the OpenGL subsystem and a screen for that
No, because of depth buffer settings. PB needs no depth buffer for the sprites. Only if you use InitEngine3D before, but then it will also load OGRE.
Right, didn't remember that! No use then using PB's screens then, as including Ogre kind of defeats the purpose.
User avatar
idle
Always Here
Always Here
Posts: 5838
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: Horde3D

Post by idle »

DarkDragon wrote:
eesau wrote:Also it needs an OpenGL rendering context but I suppose you could use PB with the OpenGL subsystem and a screen for that
No, because of depth buffer settings. PB needs no depth buffer for the sprites. Only if you use InitEngine3D before, but then it will also load OGRE.
Horde just needs an OpenGL context, so PB's screen functions should work fine, no ogre required

Code: Select all

InitSprite()
InitKeyboard()


Global myApp.iApplication = New_Application(gHordePath)
Debug PeekS(h3dGetVersionString())

OpenWindow(0,0,0,1024,768,myApp\getTitle(),#PB_Window_ScreenCentered | #PB_Window_SystemMenu)
OpenWindowedScreen(WindowID(0),0,0,1024,768,0,0,0)

If myApp\init()
  myApp\resize(1024,768)
  Repeat 
    Repeat
      Ev = WindowEvent()
      Evt = EventType
      If ev = #PB_Event3D_CloseWindow 
        myapp\release()
        myapp\Free()  
        End
      EndIf 
    Until ev = 0 
    
      ClearScreen(0)
      Myapp\mainLoop(ElapsedMilliseconds())
      Myapp\ExamineMouse(WindowMouseX(0), WindowMouseY(0))
      Myapp\keyStateHandler()
     
      FlipBuffers()
  ForEver   
    
EndIf
Windows 11, Manjaro, Raspberry Pi OS
Image
DarkDragon
Addict
Addict
Posts: 2344
Joined: Mon Jun 02, 2003 9:16 am
Location: Germany
Contact:

Re: Horde3D

Post by DarkDragon »

idle wrote:
DarkDragon wrote:
eesau wrote:Also it needs an OpenGL rendering context but I suppose you could use PB with the OpenGL subsystem and a screen for that
No, because of depth buffer settings. PB needs no depth buffer for the sprites. Only if you use InitEngine3D before, but then it will also load OGRE.
Horde just needs an OpenGL context, so PB's screen functions should work fine, no ogre required
Yes, but Horde won't display anything correctly if no depth buffer is initialized. And you're only able to initialize it manually or with InitEngine3D. The only way it works is if Horde3D uses Offscreen Rendering for everything and copies the manually defined backbuffer to the front buffer. PureBasic won't initialize the depth buffer if you don't use InitEngine3D/Ogre.
bye,
Daniel
User avatar
idle
Always Here
Always Here
Posts: 5838
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: Horde3D

Post by idle »

It works fine on Linux but if there's a problem on windows using the sprite lib with the opengl subsystem
it's easy enough to GLFW statically linked or just call the utility functions to create the gl context.

Code: Select all

h3dutInitOpenGL(hDC)
Windows 11, Manjaro, Raspberry Pi OS
Image
Post Reply