Horde3D

Next-Generation Graphics Engine
It is currently 19.04.2025, 06:46

All times are UTC + 1 hour




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: 05.06.2008, 20:12 
Offline

Joined: 05.06.2008, 19:37
Posts: 1
Hi,

I decided to give Horde3D a go, and downloaded the linux version. I am a novice in 3d programming and the integration between Horde3d and glfw (as in the samples) or in my case freeglut is totally arcane to me.

There is a function glutMainLoop which is the game loop and two event handlers glutDisplayFunc(dipsFunc) and glutIdlefunc(idleFunc). I have the following functions

void initEngine(){
Horde3D::init //returns true
//I am curious how the engine decides that there is an open openGL context ?
//loads models and animations
//sets the scenegraph
//sets the camera
//Is the camera directed toward the objects at first?
}
gameLoop(){
//modify
}

Where should I swapbuffers? Do I have to clear the screen? How to control how many frames per second is the application playing.

I tried several combinations all resulting in a black screen.

Can i import terrain and lights from maya?

Thanks in advance.


Top
 Profile  
Reply with quote  
PostPosted: 06.06.2008, 00:52 
Offline

Joined: 14.04.2008, 15:06
Posts: 183
Location: Germany
Do you have a special reason for wanting to use glut? Other ways like glfw are easier to work with.
I've used glut a long time ago, so be carefull with my answers regarding glut:

inside glutDisplayFunc: call Horde3D::render, clearing the screen is not necessary. That's done automatically (at least by the default pipelines). If you are using overlays these have to be cleared explicitly with Horde3D::clearOverlays. After render returned, you should swap buffers with a glut call.

inside glutIdleFunc: call glutDisplayFunc to update the screen even when idle?


Frames per second: You have to implement any limits yourself. Use a timer to determine when the last frame was rendered. If it was a too short time ago, just sleep the remaining time.

Terrain and Maya: The terrain is not a mesh but a texture with size N x N with N being a power of 2 IIRC. The height information is stored in the red (high byte) and green (low byte) of the texture. The blue and alpha channel store information about the normal of the terrain. If you can export this file format using Maya it would work. For a start you could just export the height data to the red and green channel.

Lights and Maya: not possible (someone correct me, if I'm wrong here)



I'd suggest that you start modifying either the Knight or Chicago sample to learn the basics of the engine. Then you don't have to mess around with the details of glut or glfw that much. Depending on your language preferences you might try using one of the bindings, if that's easier for you. The Python binding is really easy to use in combination with pyglet ;)


Top
 Profile  
Reply with quote  
PostPosted: 06.06.2008, 04:29 
Offline

Joined: 18.05.2008, 17:47
Posts: 96
doesn't it support 8bit height field. I shouldn't be hard to generate a greyscale height map using maya
(it wouldnt look cool though)


Top
 Profile  
Reply with quote  
PostPosted: 07.06.2008, 03:06 
Offline

Joined: 22.11.2007, 17:05
Posts: 707
Location: Boston, MA
kal wrote:
doesn't it support 8bit height field. I shouldn't be hard to generate a greyscale height map using maya
(it wouldnt look cool though)
It isn't supported directly by the engine, but the HordeSceneEditor can convert a standard 8-bit heightmap into the correct format.

_________________
Tristam MacDonald - [swiftcoding]


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 68 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
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group