Re: OpenGL ES wrapper for wince
"smartmobili" <smartmobili-/[email protected]>
| Newsgroups | gmane.comp.windows.wtl |
|---|---|
| Message-ID | <[email protected]> |
--- In [email protected], "smartmobili" <smartmobili@...> wrote: > > Hi, > > I wrote a small openGL ES wrapper for pocket pc platform but I have some issues. > For instance I would like to make some actions in the OnIdle method(). > First I tried to use CMessageFilter and CIdleHandler as shown below > > class CMainFrame : > public CFrameWindowImpl<CMainFrame>, > public COpenGLES<CMainFrame>, > public CUpdateUI<CMainFrame>, > public CMessageFilter, public CIdleHandler, > public CAppWindow<CMainFrame> > { > public: > ... > virtual BOOL OnIdle() > { > RedrawWindow(); > return FALSE; > } > }; > > The problem is OnIdle is almost never called, so I choose to call SetTimer in the OnCreate method as shown below : > > LRESULT OnCreate(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM lParam, BOOL& bHandled) > { > AtlCreateEmptyMenuBar(m_hWnd); > > // register object for message filtering and idle updates > CMessageLoop* pLoop = _Module.GetMessageLoop(); > ATLASSERT(pLoop != NULL); > pLoop->AddMessageFilter(this); > pLoop->AddIdleHandler(this); > > UINT nIDEvent = ::SetTimer(m_hWnd, 1, 40, NULL); > ATLTRACE(_T("nIDEvent = %d\r\n"), nIDEvent); > > return bHandled = FALSE; > } > > The problem is I NEVER receive the WM_TIMER message and of course I have declared it in the message map. > In the files group I will upload my sample code (TestOgles.zip) > > If you have any idea please let me know. > Actually I think I found, it seems I receive lots of WM_PAINT messages and since WM_TIMER is not a prioritary one I suppose this is the reason OnTimer is never called... ------------------------------------ Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/wtl/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/wtl/join (Yahoo! ID required) <*> To change settings via email: mailto:[email protected] mailto:[email protected] <*> To unsubscribe from this group, send an email to: [email protected] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/