Skip to main content
gamedev.net
🔒 Locked

D3D prob

Started by JasonL220 3 replies 800+ views
Original Post
JasonL220
JasonL220
I've started to read introduction to 3D game programming with DirectX9, and wrote this code to create a black window, but nothing comes up when i run it, what have i missed? heres my folder with code, .exe and project folders. http://h1.ripway.com/JasonL220/Framework.zip thanks
circlesoft
circlesoft
Instead of just posting a link to an unfamiliar piece of source code, can you instead post the relevant sections of code here (in source tags)? Sorry, but we aren't really here to just debug your code outright - but more of when you find your problem, we can assist you in fixing it.
valles
valles
It appears you're using visual studio 2005. The code doesn't look anything like what directx gives for an empty project.
Xrystal
Xrystal
It doesn't even compile on my version of 2005 Express complaining that windows.h doesn't exist so unfortunately I can't help you without more information.

Tell us what it does do ? Did you turn on DirectX debugging and see what that tells you?
GrasshopperDotNet
GrasshopperDotNet
First of all, you should check out the DX9SDK Oct Samples, Tutorials folder.
There is a tutorial on creating a D3D device. This is great for building you framework or using it as a reference. It will also show you how to setup your project for Visual Studio 2005, just investigate all the Project->Properties pages. To get back to your problem: I can see one big problem, after you clear the device:
g_pd3dDevice->Clear( 0, NULL, D3DCLEAR_TARGET, D3DCOLOR_XRGB(0,0,255), 1.0f, 0 );

// Add this. You need to begin and end the scene rendering
// Begin the scene
if( SUCCEEDED( g_pd3dDevice->BeginScene() ) )
{
// Rendering of scene objects can happen here

// End the scene
g_pd3dDevice->EndScene();
}

// Present the backbuffer contents to the display
g_pd3dDevice->Present( NULL, NULL, NULL, NULL );

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.