DirectX 3D with SLIMDX

ventsim

New member
Joined
May 28, 2007
Messages
3
Programming Experience
3-5
Is anyone using this for 3D programming? It appears a very nice API for managed Direct3D (I'm currently using the defunct MDX). All the samples are currently in C# so I've converted some to VB.NET if anyone is interested.

You will need to install the SLIMDX distributable, or at least reference the SlimDX DLL included in the download.

http://www.ventsim.com/files/samplesvb.zip

SlimDX Homepage
 
Yeah I have just started to use it, thought I'd give it a go since I was creating a tile based editor for a simple platform game and GDI+ is SOOOOOOOOOOOO slow even at that.

I have a random question I am having some weird issues with trying to get DX10 working with VB. It all comes from when I'm trying to create the render target view to be the backbuffer from the swap chain, looking at the C# example:
RenderTargetView renderTarget = new RenderTargetView(device, swapChain.GetBuffer<Texture2D>(0))


And in C:

//Create render target view
//————————————————————–

//try to get the back buffer

ID3D10Texture2D* pBackBuffer;

if ( FAILED( pSwapChain->GetBuffer(0, __uuidof(ID3D10Texture2D), (LPVOID*)&pBackBuffer) ) ) return fatalError(“Could not get back buffer”);



//try to create render target view

if ( FAILED( pD3DDevice->CreateRenderTargetView(pBackBuffer, NULL, &pRenderTargetView) ) ) return fatalError(“Could not create render target view”);

Is there a VB equiv? I'm stuck!!!

James
 
Back
Top