查看单个帖子
旧 2009-05-07, 03:50 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】setviewportclip

setviewportclip
setviewportclip
hello.
in my application, i let setviewportclip() not be excuted.
then windirectx module couldn't draw anymore.
by the way, as i made onsize() excuted each time before drawing, it went well.
what is the functionality of setviewportclip()?

the functionality of exgsdirectxview::setviewportclip is
1. initialize a stencil-buffer
2. clear a z-buffer
3. fills a frame-buffer in accordance with viewport background settings.
if you don't call setviewportclip, directx device may stop render, e.g., because stencil test is turned on, but stencil buffer is not initialized. or because z-buffer is not clean. quite strange to comment out some piece of code and expect that everything will continue to be working
sincerely yours,
george udov
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)