Results 1 to 2 of 2

Thread: CS_OWNDC? strange behaviour?

  1. #1
    Junior Member Newbie
    Join Date
    Nov 2001
    Posts
    15

    CS_OWNDC? strange behaviour?

    Hi!
    I'm building a tool to make bezier-surfaces. I'm doing this
    with my Delphi rad-tool, because I need some Windows-stuff like
    panels, trackbars and so on. I use two panels to get two rendering-
    contexts. (The first panel is to have a look at the surface with rotation,
    texturing and stuff, and the second panel is the view from above on the
    surface with some GL_POINTS on it, on which can be clicked to modify
    the control points.)
    The problem is, that I have a second window in use, which offers some
    trackbars to modify colour and lighting. When this (tool-)window is
    shown, the first panel (with rendering context) isn't updated anymore, and
    the whole application seems to become strange. Sometimes the second
    panel (with rendering c.) seems to have become both rendering contextes
    (because on this panel both scenes are shown, they're just switching
    continuosly between each other...)
    I have the suggestion, that this behaviour is caused in the windowclass-parameter
    CS_OWNDC that I use, when I create the window without delphi...

    any suggestions?

    thanks!
    mathias_123

  2. #2
    Junior Member Newbie
    Join Date
    Jun 2001
    Posts
    19

    Re: CS_OWNDC? strange behaviour?

    Hi,

    I am a delphi programer and i have my opengl library too.

    For some time I was working with just one rendering window, but then when i needed to work with another i get exactly the same problem like yours.

    The problem is how to handle which opengl RC is active because you have two of them.

    When i was creating the Dc and Rc i was saving then for be used later in the command

    wglMakeCurrent( pdc, pRC);

    for make current the viewport at your render window, but i found that when two or more opengl Rc are created, seems that the DC is changing, so it;s more safer to use:

    wglMakeCurrent( getdc(pcontrol.handle), pRC);

    That is using the getdc function for get the DC for the render windows each time that you need to make it active. this fixed the problem.

    good luck

    tp.

Similar Threads

  1. Strange behaviour with length()
    By FrankBoltzmann in forum OpenGL: GLSL
    Replies: 4
    Last Post: 09-29-2015, 09:34 AM
  2. Strange Behaviour of glTexSubImage3D
    By t_guen03 in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 07-16-2013, 05:10 PM
  3. Strange OGL Behaviour
    By MagnumOpus in forum OpenGL: Advanced Coding
    Replies: 2
    Last Post: 06-02-2013, 02:14 AM
  4. Strange GL_LINE_STRIP behaviour
    By hemicube in forum OpenGL: Advanced Coding
    Replies: 4
    Last Post: 12-06-2007, 06:26 AM
  5. PDR strange behaviour...
    By yooyo in forum OpenGL: Advanced Coding
    Replies: 0
    Last Post: 03-22-2004, 02:52 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