Jump to content

Question about Leadwerks::Model and Leadwerks::Surface


Joshua
 Share

Recommended Posts

I am currently working with the Model and Surface components of the Leadwerks API and I was wondering if there was any further documentation on the internals of these structures.

 

When a model is created through Model::Create(), it appears that the model is automatically added to the world. When the model is added, does the model component use display lists and or vertex buffer objects? I remember seeing the ability to create these components directly, however, I was wondering if their implementation is automatic?

 

I was also wondering if the Model and Surface objects are automatically culled when created. I've noticed that the surfaces are culled if not visible, however, I am curious if other occlusion is done automatically.

 

I was also wondering if the Model and Surface components are processed and rendered in Leadwerks through Direct Rendering, or through the GPU and if it is possible to modify/change the rendering pipeline of Leadwerks.

 

Any feedback is appreciated, especially if my initial assumptions are complete wrong. Thank you all in advance.

Link to comment
Share on other sites

When a model is created through Model::Create(), it appears that the model is automatically added to the world. When the model is added, does the model component use display lists and or vertex buffer objects? I remember seeing the ability to create these components directly, however, I was wondering if their implementation is automatic?

Display lists are obsolete and shouldn't be used anymore. The surface class is basically just a collection of VBOs and an indice array object.

 

I was also wondering if the Model and Surface objects are automatically culled when created. I've noticed that the surfaces are culled if not visible, however, I am curious if other occlusion is done automatically.

Yes, hardware occlusion culling is built into the world octree structure.

 

I was also wondering if the Model and Surface components are processed and rendered in Leadwerks through Direct Rendering, or through the GPU and if it is possible to modify/change the rendering pipeline of Leadwerks.

They are stored on the GPU. The Leadwerks GraphicsDriver class is actually an abstract class that can be overwritten. So it's actually possible to make a DirectX renderer, an Ascii renderer, a software renderer, or whatever, and the rest of the engine won't know or care about the difference.

  • Upvote 1

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

@josh, is there a way to interact with the world octree structure directly? Maybe even extend the structure? I am not at my computer right now or I would look into this more thoroughly.

 

I have some further questions about best practices when it comes to using models and surfaces however I will leave them until I can share some example code.

Link to comment
Share on other sites

Well ideally it's just stuff you should never have to worry about. The system is designed to be optimal under most conditions and not require any care and feeding.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...