(¡Sí, mi primera respuesta en Stackoverflow)
Encontrado una, es de esperar buena, solución para el problema: Haga su propia cabecera de archivo, que incluye Windows.h (D3D11 incluye que de todos modos), undefines ventanas macros e incluye D3D11.h. Incluya este encabezado en lugar de D3D11.h. Nota: Obviamente, esto da prioridad a las versiones D3D11 de definición, sobre los de Windows.h
// D3D11-NoRedefs.h
// Includes D3D11.h without redefinitions from Windows!
#pragma once
#include <Windows.h>
//#pragma region Undefine Windows Macros
// Only undefine, if DXGIType.h has not been included yet
#ifndef __dxgitype_h__
#undef DXGI_STATUS_OCCLUDED
#undef DXGI_STATUS_CLIPPED
#undef DXGI_STATUS_NO_REDIRECTION
#undef DXGI_STATUS_NO_DESKTOP_ACCESS
#undef DXGI_STATUS_GRAPHICS_VIDPN_SOURCE_IN_USE
#undef DXGI_STATUS_MODE_CHANGED
#undef DXGI_STATUS_MODE_CHANGE_IN_PROGRESS
#undef DXGI_ERROR_INVALID_CALL
#undef DXGI_ERROR_NOT_FOUND
#undef DXGI_ERROR_MORE_DATA
#undef DXGI_ERROR_UNSUPPORTED
#undef DXGI_ERROR_DEVICE_REMOVED
#undef DXGI_ERROR_DEVICE_HUNG
#undef DXGI_ERROR_DEVICE_RESET
#undef DXGI_ERROR_WAS_STILL_DRAWING
#undef DXGI_ERROR_FRAME_STATISTICS_DISJOINT
#undef DXGI_ERROR_GRAPHICS_VIDPN_SOURCE_IN_USE
#undef DXGI_ERROR_DRIVER_INTERNAL_ERROR
#undef DXGI_ERROR_NONEXCLUSIVE
#undef DXGI_ERROR_NOT_CURRENTLY_AVAILABLE
#undef DXGI_ERROR_REMOTE_CLIENT_DISCONNECTED
#undef DXGI_ERROR_REMOTE_OUTOFMEMORY
#undef D3D11_ERROR_TOO_MANY_UNIQUE_STATE_OBJECTS
#undef D3D11_ERROR_FILE_NOT_FOUND
#undef D3D11_ERROR_TOO_MANY_UNIQUE_VIEW_OBJECTS
#undef D3D11_ERROR_DEFERRED_CONTEXT_MAP_WITHOUT_INITIAL_DISCARD
#undef D3D10_ERROR_TOO_MANY_UNIQUE_STATE_OBJECTS
#undef D3D10_ERROR_FILE_NOT_FOUND
#endif
#pragma endregion
#include <D3D11.h>
Por favor, hágamelo saber lo que piensa, y no ocupen de nuevo en la crítica. Soy nuevo en esto y sé que esto es bastante fuerza bruta y probablemente sea arriesgado.
Por favor, comparta el orden de los includes. Además, ¿por qué quiere usar d3d10 y d3d11 en la misma estructura de archivos incluidos? – Ram
@Ram, d3d10 está incluido en alguna parte de d3d11. – chris
Intenté eliminar todo menos d3d11.h, que a su vez incluye dxgi.h y dxgitype.h –