Attributes of the OpenGL-based engine implementation. More...
#include <GraphicsTypes.h>
Public Attributes | |
NativeWindow | Window |
Native window wrapper. | |
Bool | ZeroToOneNDZ = false |
ADAPTER_TYPE | PreferredAdapterType = ADAPTER_TYPE_UNKNOWN |
![]() | |
Int32 | EngineAPIVersion = DILIGENT_API_VERSION |
Engine API version number. | |
Uint32 | AdapterId = DEFAULT_ADAPTER_ID |
Version | GraphicsAPIVersion = {} |
Minimum required graphics API version (feature level for Direct3D). | |
const ImmediateContextCreateInfo * | pImmediateContextInfo = nullptr |
Uint32 | NumImmediateContexts = 0 |
The number of immediate contexts in pImmediateContextInfo array. | |
Uint32 | NumDeferredContexts = 0 |
The number of deferred contexts to create when initializing the engine. | |
DeviceFeatures | Features |
Requested device features. | |
Bool | EnableValidation = false |
VALIDATION_FLAGS | ValidationFlags = VALIDATION_FLAG_NONE |
Validation options, see Diligent::VALIDATION_FLAGS. | |
struct IMemoryAllocator * | pRawMemAllocator = nullptr |
IThreadPool * | pAsyncShaderCompilationThreadPool = nullptr |
Uint32 | NumAsyncShaderCompilationThreads = 0xFFFFFFFFu |
When AsyncShaderCompilation is enabled, the maximum number of threads that can be used to compile shaders. | |
const OpenXRAttribs * | pXRAttribs = nullptr |
Additional Inherited Members | |
![]() | |
void | SetValidationLevel (VALIDATION_LEVEL Level) |
Sets the validation options corresponding to the specified level, see Diligent::VALIDATION_LEVEL. | |
Attributes of the OpenGL-based engine implementation.
ADAPTER_TYPE Diligent::EngineGLCreateInfo::PreferredAdapterType = ADAPTER_TYPE_UNKNOWN |
The GPU preference allows you to request either the integrated or dedicated GPU on systems having both onboard and dedicated GPUs. Currently this works only on Windows and Linux.
On Windows this is done by setting the NvOptimusEnablement
and AmdPowerXpressRequestHighPerformance
. When the Nvidia and AMD drivers see their respective symbol exported and set to nonzero in a program, they will take precedence over the integrated GPU when creating the OpenGL context.
Unfortunately, there is no way to transfer exported symbols from static libraries to the executable file without explicitly creating a Module-Definition File (.def).
Therefore you need to explicitly define these variables in your executable file: https://gist.github.com/statico/6809850727c708f08458 or you can use the Diligent-GLAdapterSelector
object library as source input to your executable target: target_sources(MyExecutable PRIVATE $<TARGET_OBJECTS:Diligent-GLAdapterSelector>)
, see https://cmake.org/cmake/help/v3.16/manual/cmake-buildsystem.7.html#object-libraries.
DRI_PRIME
environment variable that is used by Mesa drivers that support PRIME. Bool Diligent::EngineGLCreateInfo::ZeroToOneNDZ = false |
Enable 0..1 normalized-device Z range, if required extension is supported; -1..+1 otherwise. Use IRenderDevice::GetDeviceInfo().NDC to get current NDC.