以下是代码
#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,代码是在学的,希望各位大神不吝赐教,小弟在此谢过了