几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量

几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 (http://www.dimcax.com/hust/index.php)
-   DirectDWG (http://www.dimcax.com/hust/forumdisplay.php?f=89)
-   -   【转帖】exgsopengldevicecreateview is never called why (http://www.dimcax.com/hust/showthread.php?t=16165)

yang686526 2009-05-05 10:05 AM

【转帖】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.


所有的时间均为北京时间。 现在的时间是 11:47 AM.