Custom FVF Vertex

Discuss about anything related to the Irrlicht Engine, or read announcements about any significant features or usage changes.
Post Reply
dlangdev
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR
Contact:

Custom FVF Vertex

Post by dlangdev »

hi, just wondering what IrrLicht developer's opinion on this...

when parsing files having vertices with userdefined FVF, see below.

what is the roadmap for this feature?


Code: Select all

// Vertex format for screen space work
struct SCREENVERTEX     
{
    D3DXVECTOR4 pos;
    D3DXVECTOR2 tCurr;
    D3DXVECTOR2 tBack;
    FLOAT       fSize;
    D3DXVECTOR3 vColor;
    static const DWORD FVF;
};
const DWORD SCREENVERTEX::FVF = D3DFVF_XYZRHW | D3DFVF_TEX4
                                | D3DFVF_TEXCOORDSIZE2(0)
                                | D3DFVF_TEXCOORDSIZE2(1)
                                | D3DFVF_TEXCOORDSIZE1(2)
                                | D3DFVF_TEXCOORDSIZE3(3);
Image
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Well, there are at least two or three things involved with this topic.
You mention parsing files using this kind of vertex information. We could add support for .x FVF information already now, maybe dropping some stuff which is not supported by Irrlicht as of now. The Ogre loader already does something like this, because Ogre uses a flexible vertex format. The Collada loader also has something similar.
Irrlicht will definitely need some more flexibility in the vertex format. This does not mean that we need full support for FVF format. The most important thing is to reduce the necessity for switch statements each time we work with the different vertex formats. Because every new format would require an additional case compound. This adds lots of redundant code to the library and possibly also to custom scene nodes.
Then, the access to flexible vertex formats would have to be defined. Since even D3D and OpenGL have different ways to define and use these vertex formats we'd need a uniform way. I guess that we will add some more fixed vertex types for special materials first, before going for the fully flexible vertex types. With a proper conversion mechanism between these types and a simplified usage style it seems to be the cleaner way.
dlangdev
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR
Contact:

Post by dlangdev »

thanks for the quick reply.
Image
dlangdev
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR
Contact:

Post by dlangdev »

addendum:

i could sometime in the future write code reading position and normal data from FVF into an irrlicht vertex format, though.

but don't hold your breath on that one as i'm doing something else at the moment.
Image
Post Reply