Results 1 to 5 of 5

Thread: Display list used in more than one control...

  1. #1
    Junior Member Newbie
    Join Date
    Dec 2009
    Posts
    3

    Display list used in more than one control...

    Hi,
    I am newbie in opengl programming.
    I am using a two different activex controls in my application. In both the controls i used the display list, in which i have dynamically delete and recreate the display. when i dynamically delete and recreate the list in one control, that list is not executing and it affects the existing list of the other control.

    Is there any problem in list creation?

    regards,
    palzit

  2. #2
    Junior Member Newbie Optik's Avatar
    Join Date
    Jun 2009
    Location
    Los Angeles, CA
    Posts
    22

    Re: Display list used in more than one control...

    I am not sure but I feel you are right. Since a display list is compiled code stored in the server side (you graphics card), when you modify a handle to it in one control the other is affected.

  3. #3
    Junior Member Newbie
    Join Date
    Dec 2009
    Posts
    3

    Re: Display list used in more than one control...

    Thanks for your response Optik,

    I have tested something for creation of display list and just i want to share this.

    I have tested the creation of display list in two different way.

    1. I created the display list within the OnCreate(LPCREATESTRUCT lpCreateStruct) function in both the control.

    2. In this, i created the display list within the invoke method [ GenerateLists() ] in both the control.

    I used the message box to display the generated base list id (which is returned from glGenLists) in both the control.

    In first condition, the base list id of both controls are same. i.e. it start with list id 1.


    In second condition, i called those two invoke methods in my application in which the base list id of both controls returned from glGenLists are different. i.e. For first control the list id start with 1 and for the second it start with 334.
    But in this condition, the lists of one control(Ctrl2) only executed properly which is recently inserted control in my application and lists of another control(Ctrl1) are not executing.

    Note: Ctrl1 is inserted first in application and Ctrl2 is inserted second in application.

    And i have tested the reverse condition also i.e. Ctrl2 is inserted first and Ctrl1 is inserted second in application. In this situation, the lists of Ctrl1 are executing properly and the lists of Ctrl2 are not executing.

    Do you have any idea about this?

    regards,
    palzit

  4. #4
    Junior Member Newbie Optik's Avatar
    Join Date
    Jun 2009
    Location
    Los Angeles, CA
    Posts
    22

    Re: Display list used in more than one control...

    Hi palzit

    I see what your problem is.

    It only makes sense calling both the glGenLists() in your application as you mentioned in the second condition. List IDs should be unique.

    However I cannot understand why only the latter list is executed.

    Also, Please tell me where you are actually building the lists. Are they built in their respective controls or in your application? Have you tried both? If not please do.

    regards
    Optik.

  5. #5
    Junior Member Newbie
    Join Date
    Dec 2009
    Posts
    3

    Re: Display list used in more than one control...

    Hi Optik,

    In both methods i have create, delete and recreate the lists within the corresponding activex control application only.

    1. How do i create the lists in main application instead of creating the lists in activex control application?

    2. Is that possible to create a list with our own specified ID?

    regards,
    palzit

Similar Threads

  1. Display list corruption when list created in shared library
    By Michael Wouters in forum OpenGL: Advanced Coding
    Replies: 2
    Last Post: 09-16-2005, 10:55 PM
  2. Control of display callback
    By Nelah in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 03-03-2003, 08:52 PM
  3. Can I display opengl map on window's control?
    By in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 09-21-2001, 11:27 AM
  4. Display list to display models...Should I use them?
    By in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 11-27-2000, 12:49 PM
  5. Display to more than one MFC control
    By in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 04-05-2000, 04:20 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