Unhandled exception at 0x0040182f in Chili DirectX Framework.exe: 0xC0000005: Access violation reading location 0x00000000.
On the video(lesson 5) Chili fixes this, I did it exacly the same way that the video shows, but I still get the error...
on my Game.h I have:
Code: Select all
private:
D3DGraphics gfx;
KeyboardClient kbd;
/********************************/
/* User Variables */
int x;
int y;
/********************************/
};
Code: Select all
Game::Game( HWND hWnd,const KeyboardServer& kServer )
: gfx( hWnd ),
kbd( kServer ),
x( 400 ),
y( 300 )
{}
Code: Select all
void Game::ComposeFrame()
{
gfx.PutPixel( x,y,255,255,255 );
gfx.PutPixel( x+3,y,255,255,255 );
gfx.PutPixel( x+4,y,255,255,255 );
gfx.PutPixel( x+5,y,255,255,255 );
gfx.PutPixel( x-3,y,255,255,255 );
gfx.PutPixel( x-4,y,255,255,255 );
gfx.PutPixel( x-5,y,255,255,255 );
gfx.PutPixel( x,y+3,255,255,255 );
gfx.PutPixel( x,y+4,255,255,255 );
gfx.PutPixel( x,y+5,255,255,255 );
gfx.PutPixel( x,y-3,255,255,255 );
gfx.PutPixel( x,y-4,255,255,255 );
gfx.PutPixel( x,y-5,255,255,255 );
}