Jump to content
  • Advertisement
Sign in to follow this  
_goat

Did anyone see that hardware buffer?

This topic is 4885 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

After a while I decided to post this here. If I'm creating an API independant hardware buffer interface, what concepts are there. I mean, if anyone's looked at how OGRE implemented it, I guess I could learn by studying the code, but that's a really masochistic way of doing things. It stems from the fact that DrawPrimitiveUP (DirectX) I've heard is really slow comparitive to DrawPrimitve, which utilises DirectX's hardware buffers (vertex buffers). However, with my API independant engine, I need a way to abstract this out. Any pointers?

Share this post


Link to post
Share on other sites
Advertisement
It might be better to abstract the whole notion of a mesh (i.e. a mesh's data and how it is rendered) instead of taking the buffer separately. Often time's this done through a separate DLL for each render platform.

Greetz,

Illco

Share this post


Link to post
Share on other sites
I'm under the impression that DLLs are for Windows only, or am I crazy?

Also, the mesh has been abstracted, but implementations of the mesh might want to optimize rendering by using a hardware buffer to store the data, rather than just an array of vertices and a wrapper function DrawTriangles(void * data, ...) which will either call the OGL or DX functions depending on the API you've specified (and can change at runtime, theoretically).

So yeah, I get what you're saying, but I think there's a way to do this, so that an implementation of a hardware buffer is cross-API.

Share this post


Link to post
Share on other sites
DLLs are for Windows; however Linux has a similar concept in the form of SO libraries. Also, each of the implementations can make specific use of the intended API this way. But if this is not what you mean, let's await some other replies.

Share this post


Link to post
Share on other sites
fwiw, Direct3D and OpenGL are pretty much different ways of doing the same thing. They both operate the same piece(s) of hardware and work with similar "pure" graphics theory.

Why this is important - you've spotted D3D's VB/IB system, I'm pretty sure there is an equivalent in OpenGL (VBA/VBO??). Abstracting out these sorts of things shouldn't be too much of a challenge as you're unlikely to have to resort to all-out emulation of the main features.

hth
Jack

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!