Skip to main content
gamedev.net
🔒 Locked

reading flags

Started by maya18222 Jul 17, 2008 at 8:48 AM 0 replies 450+ views
Original Post
maya18222
maya18222
How do i go about doing it? for example, how would i check ...
DWORD options = meshSys->GetOptions();
options, for

D3DXMESH_32BIT                  = 0x001, // If set, then use 32 bit indices, if not set use 16 bit indices.
    D3DXMESH_DONOTCLIP              = 0x002, // Use D3DUSAGE_DONOTCLIP for VB & IB.
    D3DXMESH_POINTS                 = 0x004, // Use D3DUSAGE_POINTS for VB & IB. 
    D3DXMESH_RTPATCHES              = 0x008, // Use D3DUSAGE_RTPATCHES for VB & IB. 
    D3DXMESH_NPATCHES               = 0x4000,// Use D3DUSAGE_NPATCHES for VB & IB. 

etc etc
Evil Steve
Evil Steve
if(option & D3DXMESH_32BIT){   // Use 32 bit indices}else{   // Use 16 bit indices}if(option & D3DXMESH_POINTS){   // Use D3DUSAGE_POINTS for VB & IB}// Etc.


However, I'd really recommend learning more about C++ before jumping into DirectX. Everything assumes you have a good understanding of the language, from the SDK docs to the tutorials, and bit manipulation like this is fairly fundamental stuff.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.