Sign in to follow this  
Bobboau

DX/OGL vertex buffer compatability

Recommended Posts

I'm working with some other people and I'm setting up a vertex buffer class, and I need to know if there is a way to store the vertex buffers in a way the both directx and OGL can use. dx stores all the vertecies in an array, OGL seems to use a bunch of paralel arrays of diferent data (one for position another for UV coords) I know nothing of OGL but I need to know of a way to get either to use a vertex buffer format that can be used by the other. (ie I can do a simple memcpy of the same data)

Share this post


Link to post
Share on other sites
Quote:

OGL seems to use a bunch of paralel arrays of diferent

not mendatory you can also use your std DX vertex struct
with OpenGL look at the offset parameter.

by
einKI

Share this post


Link to post
Share on other sites
so if I just SetStreamSource with the proper FVFs it will sort it's self out on it's own? or do I need to define were it looks for what data?

and is it better to do this the directx way or the OGL way (useing one or more than one stream)

[Edited by - Bobboau on August 4, 2004 8:26:05 AM]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this