xhrt945 2016-02-11 05:58 采纳率: 0%
浏览 2560

关于 DirectX 出现宏重定义的问题

以下是代码

 #pragma once

#pragma comment(lib, "dxgi.lib")
#pragma comment(lib, "d3d11.lib")
#pragma comment(lib, "d3dx11.lib")
#pragma comment(lib, "d3dx10.lib")

#include <dxgi.h>
#include <d3dcommon.h>
#include <d3d11.h>
#include <d3dx10math.h>

class D3DClass
{
public:
    D3DClass();
    D3DClass(const D3DClass&);
    ~D3DClass();

    bool Initiazlize(int screenWidth, int screenHeight, bool vsync, HWND hwnd, bool fullscreen,
        float screenDepth,int screenNear);
    void Showdown();

    void BeginScene(float red, float green, float blue, float alpha);
    void EndScene();

    ID3D11Device* GetDevice();
    ID3D11DeviceContext* GetDeviceContext();

    void GetProjectionMatrix(D3DXMATRIX& projectionMatrix);
    void GetWorldMatrix(D3DXMATRIX& worldMatrix);
    void GetOrthoMatrix(D3DXMATRIX& orthoMarix);
    void GetVideoCardInfo(char* carName, int& memory);

private:
    bool m_vsync_enabled;                               //是否垂直同步
    int m_videoCardMemory;                              //显存大小
    char m_videoCardDescription[128];                   //显卡名称
    IDXGISwapChain* m_swapChain;                        //交换链对象
    ID3D11Device* m_device;                             //设备对象
    ID3D11DeviceContext* m_deviceContext;               //设备上下文对象
    ID3D11RenderTargetView* m_renderTargetView;         //渲染目标视图
    ID3D11Texture2D* m_depthStencilBuffer;              //深度模板缓冲
    ID3D11DepthStencilState* m_depthStencilState;       //深度模板状态
    ID3D11DepthStencilView* m_depthStencilState;        //深度目标状态
    ID3D11RasterizerState* m_rasterizerState;           //渲染状态
    D3DXMATRIX m_projectionMatrix;                      //投影矩阵
    D3DXMATRIX m_wordMatrix;                            //世界坐标系矩阵
    D3DXMATRIX m_orthoMatrix;                           //正交投影矩阵
};

这是警告

图片说明

错误:
图片说明

系统是win10,用vs2013写的,SDK是DXSDK_Jun10,代码是在学的,希望各位大神不吝赐教,小弟在此谢过了

  • 写回答

5条回答 默认 最新

  • xhrt945 2016-02-11 05:59
    关注

    http://www.it165.net/pro/html/201203/1911.html
    在这里看到的代码,之前没有打上去

    评论

报告相同问题?

悬赏问题

  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥15 c++头文件不能识别CDialog