Skip to main content
gamedev.net
🔒 Locked

CheckDeviceFormat()???

Started by Spartacus 0 replies 450+ views
Original Post
Spartacus
Spartacus
I just want to know if I have the right understanding of this function, or if I misunderstood the whole thing. The function CheckDeviceFormat() is used to check whether a surface format is available as a specified resource type. For instance this call would check whether the format D3DFMT_R5G6B5 can be used as a texture format. Am I right?
CheckDeviceFormat(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, D3DFMT_R5G6B5, D3DUSAGE_RENDERTARGET, D3DRTYPE_TEXTURE, D3DFMT_R5G6B5);
 
But I don''t fully understand why the third parameter is needed? What does it tell the function? Thanks in advance René
Real programmers don't document, if it was hard to write it should be hard to understand
a person
a person
because some cards dont allow certain texture types in certain video modes. for instance you cant use 32bit textures in 16bit color mode (well some cards might let you which i why you must check but i am pretty sure most wont). or certain surface types may not have the ability for rendertarget if the display mode is different from the texture format.

oops forgot to add, read the dx8 sdk docs they explain the arguments quite well.

Edited by - a person on December 7, 2001 3:24:27 PM

Topic Locked

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

Sign in to reply to this topic.