Original Post
hello everybodey! i got this issue, when i lanuch my Application i get a break error and it is pointing towardws my vertexbuffer i think it is somthing about my Direct3DDevice9 which i have stord in another class but got my function and the thig is, when im not using it and using antoher function allso using my RawGDevice function it is pointin on that line of code. here is the break error "description" : Unhandled exception at 0x00412054 in projekt 1.exe: 0xC0000005: Access violation reading location 0x00000000. and i have been wounder all day what it is! any help is welcome!
void Object::InitThing()
{
VERTEXSTRUCT Vertex[] = {
{1.0f,1.0f,0.0f,D3DCOLOR_ARGB(0,0,0,255),},
{-1.0f,1.0f,0.0f,D3DCOLOR_ARGB(0,0,0,255),},
{1.0f,-1.0f,0.0f,D3DCOLOR_ARGB(0,0,0,255),},
};
Raw.RawGDevice()->CreateVertexBuffer(sizeof(VERTEXSTRUCT),0,
VERTEXFVF,
D3DPOOL_MANAGED,
&vDev,NULL);
vDev->Lock(0,0,(void**)&pVoid,0);
memcpy(pVoid,Vertex,sizeof(Vertex));
vDev->Unlock();
}
inline LPDIRECT3DDEVICE RawGDevice(void)
{
return gDev;
}