|
Post by NovaGene on May 24, 2004 4:51:24 GMT -5
I tried the Racing Demo and noticed the model file is in BGM format. Is this a format created for basic4gl? Maybe you could shed some light here. Do you have a draft doc to describe on how we could implement it? Any editor that can be used to modify/view the BGM objects? (I've thought of gathering snippets from the code to make a model viewer though... )
|
|
|
Post by Tom Mulgrew on May 27, 2004 4:34:32 GMT -5
Yeah, I threw it together when I wrote the "Beams" program. It's a very simple format (I may extend it later.) There's not really any documentation apart from the Load BGM code itself (which should be reasonably self explanatory.. I hope ) If you want a model viewer, you can do the following: Copy the code from the top of the program down to (and including) the "Start1:" label. Then append this: ' Viewer starts here dim BGM_Model &viewModel ' Get filename printr "Please enter BGM filename" filename$ = Input$ () ' Load model (returns address in &model) gosub LoadBGM ' Save pointer to model &viewModel = &model ' Draw the model dim angle# glEnable (GL_LIGHTING) glEnable (GL_LIGHT0) while true glClear (GL_DEPTH_BUFFER_BIT or GL_COLOR_BUFFER_BIT) glLoadIdentity () glTranslatef (0, 0, -10) glRotatef (angle#, 0, 1, 0) gosub DrawBGM SwapBuffers () while SyncTimer (10) angle# = angle# + 1 wend wend
It is actually a format of a model converter called the "3D object converter" (which I think is pretty cool, seeing as I really did just throw it together to get from point A to point B). web.axelero.hu/karpo/(I've only had a very quick look at the demo version though, so I can't really comment on it.) -Tom
|
|