Download presentation
Presentation is loading. Please wait.
Published byBeverly Barber Modified over 9 years ago
16
void Direct3DBase::CreateDeviceResources() { D3D_FEATURE_LEVEL featureLevels[] = { D3D_FEATURE_LEVEL_11_1, D3D_FEATURE_LEVEL_11_0, D3D_FEATURE_LEVEL_10_1, D3D_FEATURE_LEVEL_10_0, D3D_FEATURE_LEVEL_9_3, D3D_FEATURE_LEVEL_9_2, D3D_FEATURE_LEVEL_9_1 }; //...
17
D3D11CreateDevice( nullptr, // use the default adapter D3D_DRIVER_TYPE_HARDWARE, 0, creationFlags, // defined above featureLevels, // what app will support ARRAYSIZE(featureLevels), D3D11_SDK_VERSION, // should always be D3D11_SDK_VERSION &device, // created device &m_featureLevel, // feature level of the device &context // corresponding immediate context );
18
// Determine the technique that will be used to render the sprites. auto featureLevel = d3dDevice->GetFeatureLevel(); if (featureLevel >= D3D_FEATURE_LEVEL_10_0) { // Generate sprites on GPU using Geometry Shader m_technique = RenderTechnique::GeometryShader; }
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.