• Advertisement
Sign in to follow this  

Directx 9 Viewport help

This topic is 2052 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am writing a program in which i have to render many objects to multiple viewports as efficiently as possible. I am using hardware instancing because i have the instances of the same object. I load the instance data along with object data in two streams to gpu and use the vertex shader to render instanced objects.
I want to render each instance to a small portion of the complete viewport. I load the viewport data along with the instance data. I need to multiple the homogenous position of the vertices with some "VIEWPORT" matrix such that each instance renders to it's own viewport. I DO NOT want to set viewports using setviewport and initiate multiple render calls for each instance (that will destroy the purpose of instancing). Can some one tell me the matrix i need to use to multiply my homogeneous canocial cordinates to render to a portion of the viewport.


Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement