|
|
Dim texSurf As Direct3DSurface8
Dim stencilS As Direct3DSurface8
Dim backBuffS As Direct3DSurface8
Dim ZbuffS As Direct3DSurface8
Dim tex As Direct3DTexture8
Set tex = D3DX.CreateTexture(D3DDevice, 800, 600, 1, D3DUSAGE_RENDERTARGET, D3DFMT_R5G6B5, D3DPOOL_DEFAULT)
'Set texSurf = tex.GetSurfaceLevel(0)
Set stencilS = D3DDevice.CreateDepthStencilSurface(800, 600, D3DFMT_D16, D3DMULTISAMPLE_NONE)
Set texSurf = tex.GetSurfaceLevel(0)
Set backBuffS = D3DDevice.GetRenderTarget
Set ZbuffS = D3DDevice.GetDepthStencilSurface‘这里也有问题,也会自动化错误
D3DDevice.SetRenderTarget texSurf, stencilS, 0'''到这里就发生自动化错误了
'D3DDevice.Clear 0, ByVal 0, D3DCLEAR_TARGET Or D3DCLEAR_ZBUFFER, D3DColorMake(0.3, 0.3, 1, 1), 1#, 0 'pulisce lo schermo
PaintScreen xgblack
D3DDevice.BeginScene 'inizia il rendering
'tutto il codice che deve eseguire le varie fasi di rendering
Sprite.Begin
InitDX.DrawGraph 0, 600 - bb.Height, bb ’BB是一个已经加载的纹理
Sprite.End
D3DDevice.EndScene 'fa terminare il rendering
为什么无法社定渲染目标 |
|