Results 1 to 4 of 4

Thread: VBO + DisplayLists

  1. #1
    Junior Member Newbie
    Join Date
    Feb 2011
    Location
    United States
    Posts
    2

    VBO + DisplayLists

    I'm using OpenTk to make a quick prototype and am having a general OpenGL problem. I load an image into a heightmap using the image to create triangle vertices as well as using the image as a texture for those vertices. Both the texture and the vertices are loaded into a VBO. Everything looks great when I render only my VBO but if I render a grid plane or cube bounding box around the VBO as a Display List the display list colors are very dark. The VBO colors look fine but the DL is just too dark. Upon exiting when I'm cleaning up my memory momentarily the DLs are colored perfectly and then the app quits. BTW - I have no lighting in my app, just uses defaults.

    So my question is, is there some voodoo i need to perform in order to have VBOs play nice with DLs? Or are they incompatible.

    Thanks,
    Darren

  2. #2
    Senior Member OpenGL Lord
    Join Date
    Mar 2015
    Posts
    6,672

    Re: VBO + DisplayLists

    My guess is that you changed some state that the DL depends on.

  3. #3
    Junior Member Newbie
    Join Date
    Feb 2011
    Location
    United States
    Posts
    2

    Re: VBO + DisplayLists

    Thanks. What it ended up being, thanks to Fiddler in the OpenTk forums, was I needed to disable texturing before drawing my display lists and then enable texturing before drawing my VBOs.

    Sounds like exactly what you're suggesting too. I just didn't realize that texturing would affect Display Lists that way.

    Thanks again,
    Darren

  4. #4
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,574

    Re: VBO + DisplayLists

    Every state is kept until asked to change.
    Your display list should contains glDisable(GL_TEXTURE_2D) if no texture is wanted.

Similar Threads

  1. Displaylists
    By Matthias Markowski in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 04-08-2004, 08:40 AM
  2. displaylists and mfc
    By sblunsden in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 03-09-2002, 04:41 AM
  3. Displaylists and T&L
    By paddy in forum OpenGL: Advanced Coding
    Replies: 16
    Last Post: 01-26-2001, 05:39 PM
  4. DisplayLists's array
    By Gelero in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 07-08-2000, 08:42 PM
  5. Displaylists and colors
    By Sjonny in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 04-09-2000, 01:38 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