Jump to content

View more

Image of the Day

#indiedev  #indiegame #screenshotsaturday https://t.co/IwVbswGrhe
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.

Sign up now

Rendertargets + viewports and device caps in Direct3D11?

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 matches81   Members   


Posted 10 September 2012 - 04:18 PM

Hello there!

A few years ago a friend of mine and me put together a basic 3D engine with a D3D9 renderer. Worked pretty well. Now, after a few years of doing other, unrelated work, we want to give D3D11 a try. Since our engine's design "expects" that we're able to enumerate what the graphics device is capable of (fairly closely to what the device caps in D3D9 describe), we'd like to be able to provide that info.
Is there something similar in Direct3D11? The only thing I found so far is the feature level, but that seems fairly unspecific..

Another question: I've read a bit about render targets and viewports in Direct3D11. Am I correct that, in D3D11, a render target basically consists of the resource and a corresponding view, telling the pipeline where and how to read / write data? As for viewports, it seems that, although the involved methods and structs of course look a bit different, the basic idea is the same as in D3D9 (i.e. basically it ends up being a part of the projection matrix and that's it). Is that correct, too?

Any help would be appreciated and thanks for reading.

#2 MJP   Moderators   


Posted 10 September 2012 - 05:38 PM

For the most part caps were removed. The way it works is that each feature level has a minimum set of of required functionality. So for instance if a device supports feature level 10, then you can count on it supporting 8192x8192 textures. The list of this functionality is here: http://msdn.microsof...2(v=vs.85).aspx. There are also some pages containing which operations are supported for which DXGI format given a feature level, which can be found here: http://msdn.microsof...2(v=vs.85).aspx. The are still a few optional features, which are listed here: http://msdn.microsoft.com/en-us/library/windows/desktop/ff476124%28v=vs.85%29.aspx. You can query for them with ID3D11Device::CheckFeatureSupport.

The viewport in D3D11 is almost exactly the same as in D3D9, in that it's just a transformation applied to primitives after projection and before rasterization. So for instance you can use it to only render to the top half of a render target. The one thing that changed in D3D10 was that you can now specify multiple viewports, and then select which one to use for each primitive that you emit from a geometry shader. But that's probably not something you'll have much use for.

Edited by MJP, 11 September 2012 - 01:15 PM.

#3 matches81   Members   


Posted 11 September 2012 - 02:16 AM

thanks for your fast answer. Very helpful links. Helps a lot to know I can stop looking for device caps. Most of our "design" for that part consisted of pretty much copying the device caps structure from D3D9 and renaming it, so I guess I'll finally go over that again and try to find some compromise between the two.

I currently don't have any idea for what I'd use the "different viewports for different primitives" feature, but it's definitely good to know. One thing we're looking forward to is getting to play around with geometry, domain and hull shaders and all the new stuff in D3D 10 and 11, so perhaps I stumble upon a use for that feature then.

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.