Beta4 (old)
SVN 245 (new)
It's originally written by seyhajin, I just modified to work with beta4. I didn't encounter any bugs, which of course doesn't mean there aren't any. I updated example scene, but not BBDOC, just use original H3D docs (included).
For those who don't know what Horde3D is:
It's a 3D engine of course. What sets it apart from the rest is that it's extremely simple and easy to use.
And when I say simple, I mean simple. Here's all you need to display a 3D scene:
Code: Select all
Import horde3d.horde3d 'import h3d wrapper
Import horde3d.horde3dutils 'import utils wrapper
H3D.OpenLibrary() 'load horde3d.dll
H3DU.OpenLibrary() 'load horde3dutils.dll
GLGraphics 800, 600 'open a window
H3D.Init() 'start the engine
H3D.SetupViewport( 0, 0, 800, 600, True ) 'setup viewport
pipelineres = H3D.AddResource( ResTypes.Pipeline, "pipelines/forward.pipeline.xml", 0 ) 'standard forward lighting pipeline
meshres = H3D.AddResource (ResTypes.SceneGraph, "models/man/man.scene.xml", 0 ) 'example model
H3DU.LoadResourcesFromDisk( AppDir+"/content" ) 'load all resources them from disk
cam = H3D.AddCameraNode( RootNode, "Camera", pipelineres) 'create a camera
H3D.SetNodeTransform( cam, 5, 5, 5, -30 ,45, 0, 1, 1, 1 ) 'position a camera
H3D.AddNodes( RootNode, meshres ) 'create a node with your model
Light1 = H3D.AddLightNode( RootNode, "Light1", null, "LIGHTING", "SHADOWMAP" ) 'create a light
H3D.SetNodeTransform( Light1, 0, 20, 0, -90, 0, 0, 1, 1, 1 ) 'position light
H3D.SetNodeParamI(Light1, Light.ShadowMapCountI, 1) 'enable shadows
While Not (KeyHit( KEY_ESCAPE ) Or AppTerminate()) 'repeat until esc pressed or window closed
H3D.Render( cam ) 'display everything
H3D.FinalizeFrame() 'prepare to draw next frame
Flip -1 'swap buffers
wend
H3D.Release_() 'unload h3d