游戏开发论坛

 找回密码
 立即注册
搜索
查看: 1413|回复: 1

SetRenderTarget自动化错误

[复制链接]

6

主题

23

帖子

25

积分

注册会员

Rank: 2

积分
25
发表于 2006-7-29 18:21:00 | 显示全部楼层 |阅读模式
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


为什么无法社定渲染目标

32

主题

1583

帖子

1589

积分

金牌会员

Rank: 6Rank: 6

积分
1589
发表于 2006-7-30 12:13:00 | 显示全部楼层

Re:SetRenderTarget自动化错误

自动化错误的错误号是多少啊?
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

作品发布|文章投稿|广告合作|关于本站|游戏开发论坛 ( 闽ICP备17032699号-3 )

GMT+8, 2026-1-25 01:23

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表