![]() |
【转帖】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. |