Skip to main content
GameDev.net gamedev.net
🔒 Locked

Some questions

Started by cannonicus Apr 7, 2005 at 12:39 PM 0 replies 250+ views
Original Post
cannonicus
cannonicus
Hello Ive got 2 questions regarding directx programming. 1. When does the drawprimitive function return? When the primitive has started rendering or when it has finished rendering? If the latter is true: is it advisable to put all calls to drawprimitive in its own "rendering-thread". 2. Is there any performance hit with haveing really big textures. I was earlier on this forum suggested to merge all my textures together into one big texture-atlas. How big can i make this atlas without haveing a performance hit? thanks in advance. //Emil
Emil Jonssonvild
paulble
paulble
Quote:
Original post by cannonicus
Hello

Ive got 2 questions regarding directx programming.

1.
When does the drawprimitive function return? When the primitive has started rendering or when it has finished rendering? If the latter is true: is it advisable to put all calls to drawprimitive in its own "rendering-thread".

2.
Is there any performance hit with haveing really big textures. I was earlier on this forum suggested to merge all my textures together into one big texture-atlas. How big can i make this atlas without haveing a performance hit?

thanks in advance.

//Emil


1. DrawPrimitive (all of the Draw* calls) return as soon as the runtime can insert the draw token in the runtime's command buffer. This can be (and is usually) "long" before the primitive is processed by the GPU. In this sense, the d3d graphics stack does not require you to have a rendering thread to get asynchronous CPU/GPU activity.


2. This really depends on where and when the textures are accessed. By making a larger aggregate texture, you'll be trading off batch performance for texture cache utilization. Which one is the right decision is something you'd have to profile to answer.

Paul Bleisch

Topic Locked

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

Sign in to reply to this topic.