Results 1 to 3 of 3

Thread: Using OpenGL with Child Windows (Win32)

  1. #1
    Junior Member Newbie
    Join Date
    Aug 2003
    Location
    Wichita, KS
    Posts
    1

    Using OpenGL with Child Windows (Win32)

    I am writing a program that uses Child Windows for viewing loaded textures. The textures need to be available to both the Parent and Child Windows.

    I would like to know the best way to specify which window I am wanting to render in.

    Each window current has its own Device Context and Rendering Context. I tried using wglMakeCurrent with the appropriate windows DC and RC as the parameters. The result was not so good, I ended up with solid colors only. I seem to be loosing texture information...

    Anyone have this problem before, or have an idea what I am doing wrong?

    Thanks!
    Will Reynard

  2. #2
    Senior Member OpenGL Guru Relic's Avatar
    Join Date
    Apr 2000
    Posts
    2,450

    Re: Using OpenGL with Child Windows (Win32)

    If the windows are spawned by the same process and use the same pixelformat (mainly the same OpenGL implementation) you need to call wglShareLists and use texture objects to have the texture available in both contexts without downloading it in each.

  3. #3
    Senior Member Regular Contributor
    Join Date
    Feb 2000
    Posts
    211

    Re: Using OpenGL with Child Windows (Win32)

    in my own small 3D-modeller written a while ago it did it very simple:
    holding the textures twice - yes, i know that means dubble memory-usage, but it's very easy; and if your texture (on harddisk) changes you only have to reload the file for getting the view in the editor updated, and to re-bind it to get the updated version in the 3D-rendering output too. this is the most simpliest way in my eyes...
    DJSnow

Similar Threads

  1. OpenGL Child Windows?
    By Sephiroth in forum OpenGL: Basic Coding
    Replies: 5
    Last Post: 01-27-2002, 07:12 AM
  2. win32, child windows, opengl
    By totoronet in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 07-05-2001, 10:59 AM
  3. child windows
    By lee in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 02-26-2001, 03:40 PM
  4. Multithreaded OpenGL in W32 child-windows
    By lasso in forum OpenGL: Advanced Coding
    Replies: 2
    Last Post: 01-22-2001, 11:58 PM
  5. OpenGL in a Windows MDI Child Window Splitter pane
    By [SW]Falcon in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 07-09-2000, 05:16 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