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

several problems in rendering
several problems in rendering
hello.
i'm trying to render dwg files and satellite images simultaneously using the same directx9 device.
but i have some problems in doing that.
when rendering dwg files only, it was ok.
but if rendering them simultaneously, the dwg was not rendered.
by the way, only the time i changed the size of the window, it was drawn on the screen well.
so i inserted onsize() before update(), and it worked well.
code:
cview *pview = (cview*)(*m_lstview.begin());
crect rc;
getclientrect( pview->m_hwnd, &rc );
odgsdcrect outputrect( odgsdcpoint(rc.left, rc.bottom), odgsdcpoint(rc.right, rc.top) );
mdeviceptr->onsize(outputrect);
mdeviceptr->update(0);
but its rendering speed was not good.
is there any methods to resolve this problem?

1) what dd version do you use?
2) i don't very understand the question. do you want to say that calling onsize() before single update() noticeably reduces the performance? or are you calling the pair onsize()-update() frequently? if so, what does changes between these calls? do you change the drawing or just change the camera?
sincerely yours,
george udov
1) i use the latest dd version ( 1.14.02 )
2) i mean that anything can not be seen on the screen if excute just update() alone. only when i changed the size of the window, dwg files were drawn. so i inserted onsize() into the drawing routine. then i got the result that i wanted. but the pair onsize()-update() cause the flickering.

dd samples (e.g. odamfcapp) always call odgsdevice:nsize() before first updating. gsdevice must know the client size :-)
sincerely yours,
george udov
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)