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

exgsopengldevice::createview is never called & why
exgsopengldevice::createview is never called & why
while studying the odamdiapp example, i noticed that exgsopengldevice::createview was never called. here抯 the reason. the prototype in exgsopengldevice is:
odgsview* createview(const odgsclientviewinfo* pinfo = 0,
bool benablelayervisibilityperview = false, odgicontext* pctx = null);
in odgsbaseopengldevice the prototype is:
odgsviewptr createview(const odgsclientviewinfo* pinfo = 0, bool benablelayervisibilityperview = false);
note the third parameter in exgsopengldevice抯 prototype. that抯 why it抯 never called. once i removed the unused third parameter and changed the return type from odgsview* to odgsviewptr, createview was called. previously, when exgsopengldevice::createview was not being called, an instance of exopenglview was never created. that抯 why my breakpoints were never being hit.
did createview used to take a third parameter (prior to 1.09) and the example was never updated?
yes - the prototype was changed and it was apparently missed.
on that note: the purpose for odamdiapp was/is to somewhat show the minimum code base for an mfc viewer. i'm currently toying with the idea of removing all the display devices but one from it - solely for the purpose of making is simpler to "see" by new comers. odamfcapp will remain the robust tool that implements most of the features available.
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)