Hi,
when i put these lines in commentary i haven't this error : "Unhandled exception at 0x0040126e in loader3ds DX 9.0c.exe: 0xC0000005: Access violation reading location 0x00000000."
this is the code which is indicated by visual c++ 7(do you think it really comes from here ?) : the line: myDirect3dApp->rendering();
int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
myWindow = new manageWindow() ;
direct3dApp *myDirect3dApp = new direct3dApp() ;
myWindow->createWindow(hInstance);
ShowCursor(FALSE);
myDirect3dApp->deviceCreation();
while(1)
{
MSG msg;
if (PeekMessage (&msg, NULL, 0, 0, PM_REMOVE))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
myDirect3dApp->rendering();
if( myWindow->getCloseWindow() )
return 0;
}
}
void direct3dApp::rendering()
{
myIDirect3DDevice9->Clear(0, //Number of rectangles to clear, we're clearing everything so set it to 0
NULL, //Pointer to the rectangles to clear, NULL to clear whole display
D3DCLEAR_TARGET|D3DCLEAR_STENCIL|D3DCLEAR_ZBUFFER, //What to clear. We don't have a Z Buffer or Stencil Buffer
0x000000EE, //Colour to clear to (AARRGGBB)
1.0f, //Value to clear ZBuffer to, doesn't matter since we don't have one
0 );
myIDirect3DDevice9->BeginScene() ;
myIDirect3DDevice9->EndScene() ;
myIDirect3DDevice9->Present(NULL, NULL, NULL, NULL);
}
[Edited by - TheSeb on August 17, 2005 5:33:08 PM]