关于vs2010版的SDK配置问题
我之前下载了一个vs2010软件安装了后来又下载了一个vs2010版的SDK并把两者装到了同一个目录下请问我需要在vs2010里面设置什么一下吗?比如那个include目...
我之前下载了一个vs2010软件安装了 后来又下载了一个vs2010版的SDK 并把两者装到了同一个目录下 请问 我需要在vs2010里面设置什么一下吗?比如那个include目录什么的
展开
2个回答
展开全部
vs2010自带windows sdk不需要安装。只有vc++ 6.0才需要外带安装sdk
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
namespace C_Sharp_3D游戏框架1
{
public partial class Form1 : Form
{
private Device device = null;
bool pause = false;
VertexBuffer vertexBuffer = null;
public Form1()
{
InitializeComponent();
}
public bool InitializeGraphics()
{
try
{
PresentParameters presentParams = new PresentParameters();
presentParams.Windowed = true;
presentParams.SwapEffect = SwapEffect.Discard;
presentParams.EnableAutoDepthStencil = true;
presentParams.AutoDepthStencilFormat = DepthFormat.D16;
device = new Device(0, DeviceType.Hardware, this,
CreateFlags.SoftwareVertexProcessing, presentParams);
device.DeviceReset += new System.EventHandler(this.OnResetDevice);
this.OnCreateDevice(device, null);
this.OnResetDevice(device, null);
}
catch (DirectXException)
{
return false;
}
return true;
}
public void OnCreateDevice(object sender, EventArgs e)
{
}
public void OnResetDevice(object sender, EventArgs e)
{
}
public void Render()
{
if (device == null) //如果未建立设备对象,退出
return;
if (pause)
return;
device.Clear(ClearFlags.Target | ClearFlags.ZBuffer, System.Drawing.Color.Blue, 1.0f, 0);
device.RenderState.CullMode = Cull.None;//剔除背面
device.BeginScene(); //开始渲染
device.VertexFormat = CustomVertex.TransformedColored.Format;
device.EndScene();
device.Present();
}
private void Form1_Paint(object sender, PaintEventArgs e)
{
this.Render();
}
private void Form1_Resize(object sender, EventArgs e)
{
pause = ((this.WindowState == FormWindowState.Minimized) || !this.Visible);
}
}
}
此3D框架 是在.NET 2.0下可以运行 Vs2010 默认的4.0下不可以 会出现异常
请高手们给个解释和修正后的框架 并说明原来的错误是为什么 谢谢using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Microsoft.DirectX.Direct3D;
using Microsoft.DirectX;
或者直接给个框架也可
辛苦半天了,希望你采纳
{
public partial class Form1 : Form
{
private Device device = null;
bool pause = false;
VertexBuffer vertexBuffer = null;
public Form1()
{
InitializeComponent();
}
public bool InitializeGraphics()
{
try
{
PresentParameters presentParams = new PresentParameters();
presentParams.Windowed = true;
presentParams.SwapEffect = SwapEffect.Discard;
presentParams.EnableAutoDepthStencil = true;
presentParams.AutoDepthStencilFormat = DepthFormat.D16;
device = new Device(0, DeviceType.Hardware, this,
CreateFlags.SoftwareVertexProcessing, presentParams);
device.DeviceReset += new System.EventHandler(this.OnResetDevice);
this.OnCreateDevice(device, null);
this.OnResetDevice(device, null);
}
catch (DirectXException)
{
return false;
}
return true;
}
public void OnCreateDevice(object sender, EventArgs e)
{
}
public void OnResetDevice(object sender, EventArgs e)
{
}
public void Render()
{
if (device == null) //如果未建立设备对象,退出
return;
if (pause)
return;
device.Clear(ClearFlags.Target | ClearFlags.ZBuffer, System.Drawing.Color.Blue, 1.0f, 0);
device.RenderState.CullMode = Cull.None;//剔除背面
device.BeginScene(); //开始渲染
device.VertexFormat = CustomVertex.TransformedColored.Format;
device.EndScene();
device.Present();
}
private void Form1_Paint(object sender, PaintEventArgs e)
{
this.Render();
}
private void Form1_Resize(object sender, EventArgs e)
{
pause = ((this.WindowState == FormWindowState.Minimized) || !this.Visible);
}
}
}
此3D框架 是在.NET 2.0下可以运行 Vs2010 默认的4.0下不可以 会出现异常
请高手们给个解释和修正后的框架 并说明原来的错误是为什么 谢谢using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Microsoft.DirectX.Direct3D;
using Microsoft.DirectX;
或者直接给个框架也可
辛苦半天了,希望你采纳
追问
你这是什么啊?这和我的问题有关系吗/
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询