D3D8 When should u TestCoopLevel()?

Started by
1 comment, last by SikCiv 22 years, 7 months ago
When do u need to call TestCooperativeLevel() to check if the device is ok to render? I know u should call it when calling ->Present(), what about when u are drawing 3D objects or textures? If the App is minimized is it ok to draw stuff to the backbuffer, or will the app crash if its front buffer is invalid?

  Downloads:  ZeroOne Realm

  Downloads:  ZeroOne Realm

Advertisement
use testcooplevel() before drawing even takes place, just as the sdk examples do.
if you draw when the the buffer doesn''t have the coop-level then it simply won''t draw until you restore all devices.

look at sdk examples
I think you can at least go through the motions of drawing, but in general it''s good form to not be using the processor if you are not actually drawing anything (ie the device is lost because the window is minimized, so don''t waste cycles on trying to draw)
Author, "Real Time Rendering Tricks and Techniques in DirectX", "Focus on Curves and Surfaces", A third book on advanced lighting and materials

This topic is closed to new replies.

Advertisement