Skip to main content
gamedev.net
🔒 Locked

directx function call cycle

Started by vicviper 0 replies 350+ views
Original Post
vicviper
vicviper
Hi, for a complete scene render which involves rendering some render targets, I was wondering which is the correct way of calling some functions... I'm thinking of two possible ways: way 1: For every Frame - Check Cooperative level - BeginScene - SetRenderTarget - Render Something - SetRenderTarget - Render Something - SetRenderTarget - Render Something - EndScene way 2: - Check Cooperative level - BeginScene - SetRenderTarget - Render Something - EndScene - BeginScene - SetRenderTarget - Render Something - EndScene - BeginScene - SetRenderTarget - Render Something - EndScene so, which is the fastest/safest way?
circlesoft
circlesoft
You should only be calling BeginScene() / EndScene() once per frame. Specifically, there should be at most one BeginScene() / EndScene() pair between any successive calls to Present(). To maintain maximum parallelism, it is advantageous to call EndScene() as far ahead of calling Present() as possible.

Topic Locked

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

Sign in to reply to this topic.