[程式] 關於D3DTexture Release
想問一下
有沒有人有碰過D3D9 Texture Release時
有Access violation的問題
以下是大致code
IDirect3DTexture9 * pD3DTexture = NULL;
hr = m_pD3DDevice->CreateTexture(
width,height,0,0,D3DFMT_A8R8G8B8,D3DPOOL_DEFAULT,&pD3DTexture,NULL);
中間就作些Lock Rect將system buffer copy進去texture
或用UpdateTexture來更新
最後再作pD3DTexture->Release();
就會在這裡顯示Access violation reading(pointer非0)
請問有可能是什麼原因呢?
因為若texture沒create成功 pointer應該也會是空的才對吧?
謝謝
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 118.163.84.235
→
08/27 21:09, , 1F
08/27 21:09, 1F
→
08/27 21:10, , 2F
08/27 21:10, 2F
→
08/28 09:32, , 3F
08/28 09:32, 3F
→
08/28 13:24, , 4F
08/28 13:24, 4F
→
08/30 19:04, , 5F
08/30 19:04, 5F
→
09/03 17:01, , 6F
09/03 17:01, 6F
推
09/03 17:16, , 7F
09/03 17:16, 7F
GameDesign 近期熱門文章
PTT遊戲區 即時熱門文章
23
67
38
65
5
15