Results 1 to 5 of 5

Thread: OpenGL and windows.h: how not to stop rendering

  1. #1
    Junior Member Newbie
    Join Date
    Jun 2006
    Posts
    4

    OpenGL and windows.h: how not to stop rendering

    Hi. It's the first time I've used windows.h library to have a rendering context for opengl, I've still a lot to learn. Each time I activate menus or simply move the rendering window over the desktop the rendering stops - it pauses, better. Similarly if I select from the menu to open a file an explorer window correctly opens but if I move it over the rendering window it draws it's image upon it until I close it and the rendering starts again - reprises. Do you know if there's a way to tell Windows to keep on rendering while some event happens to the rendering window? please notice I'm not using MFC but only windows.h and Visual C++ 6.0
    Thank you

  2. #2
    Junior Member Newbie
    Join Date
    Jan 2006
    Location
    Kazakhstan
    Posts
    26

    Re: OpenGL and windows.h: how not to stop rendering

    I think if your application is something dynamic like game, you should call draw functions in main loop. In other way you just need to process WM_PAINT message, coming from Windows, did you process it?

  3. #3
    Junior Member Newbie
    Join Date
    Jun 2006
    Posts
    4

    Re: OpenGL and windows.h: how not to stop rendering

    yes I process it but not in the main window callback function, so non that way ( by WM_PAINT ). I followed nehe's tutorial ... mmmh you gave me a real good hint... let me try
    thank you

  4. #4
    Junior Member Newbie
    Join Date
    Jun 2006
    Posts
    4

    Re: OpenGL and windows.h: how not to stop rendering

    ok I modify my window callback function. now it manages the case msg==WM_PAINT:


    case WM_PAINT:
    PaintCanvas();
    SwapBuffers(hDC);
    break;


    but before it handles a menu entry in the case COMMAND... it should open a messagebox... well if you select that menu entry the window goes on rendering but it becomes inactive and you cannot even move it and the messagebox does not appear. now if you press ALT the message box appears and you can close it by OK button and then the window gets active again. so now I've resolved the rendering problem but I have a new one with messagebox opened from the same thread as the one calling the rendering function - that is the windows process...the window callback function -.

    SOB!


    SORRY! I've just noticed there's a more appropriate section of this forum for my question. I'll try overthere.

  5. #5
    Junior Member Newbie
    Join Date
    Jun 2006
    Posts
    4

    Re: OpenGL and windows.h: how not to stop rendering

    SOLVED: I used a timer initialized under the main windows function with the last parameter of SetTimer set to NULL. inside the windows callback function if msg==WM_TIMER... Paint();SwapBuffer(hDC);break;

    Now it shows messagebox and it keeps on rendering as well.

Similar Threads

  1. OpenGL Offscreen rendering using Windows Bitmap
    By inet in forum OpenGL: Advanced Coding
    Replies: 1
    Last Post: 12-07-2008, 03:54 PM
  2. Multipipe OpenGL rendering on Windows
    By vaibhavgl in forum OpenGL: Windows
    Replies: 3
    Last Post: 03-25-2006, 10:19 AM
  3. Multipipe OpenGL rendering on Windows
    By vaibhavgl in forum OpenGL: Advanced Coding
    Replies: 1
    Last Post: 03-24-2006, 01:54 PM
  4. OpenGL rendering in Windows Splitters
    By sandakith in forum OpenGL: Windows
    Replies: 1
    Last Post: 05-31-2005, 08:48 AM
  5. OpenGL Rendering on Splitter Windows(CSplitterWnd))
    By dguven in forum OpenGL: Advanced Coding
    Replies: 1
    Last Post: 08-12-2003, 07:01 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean