Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8827005
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T07:16:48+00:00 2026-06-14T07:16:48+00:00

I have got some code like that glNewList(displist_boxy, GL_COMPILE); for(int i=0; i<scene_max; i++) {

  • 0

I have got some code like that

      glNewList(displist_boxy, GL_COMPILE);


      for(int i=0; i<scene_max; i++)
      {
        DrawAABox( sceneGL[i].x,
                sceneGL[i].y,
                sceneGL[i].z,
                10,10,10
                 );
      }

     glEndList();

DrawAABox draws 6 quad axis aligned box ( with glBegin glNormal GlVertexx… glEnd)
It work in immediate mode but when I try to build a disoplay list as above,
then call the list it has no effect (no boxes are drawed) Should it work or this just should not work (I do not know much abut it )

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T07:16:49+00:00Added an answer on June 14, 2026 at 7:16 am

    A display list distills all OpenGL operations done inside the glNewList/glEndList block into a constant set of commands that are then executed when calling the display list (with glCallList). This means every “dynamic” code inside the list creation is, well, compiled into the list. So when called your box will use whatever position sceneGL[i] had when you built the list. In fact you will only have a constant number of boxes, that is whatever number scene_max was when building the list. So if you do this in initialization code, where scene_max might be 0, nothing will be drawn.

    Think about it, what could the driver possibly do when building this list? Just record all OpenGL commands called (and maybe convert them into some compressed and optimized format) for later submission or magically take the executed machine code (and its whole surrounding context) from your final executable when run and store this somehow to recall every operation you did between glNewList/glEndList (which wouldn’t be much of a performance boost when compared to just executing it immediately, anyway)?

    EDIT: As a side note, rather prefer the use of VBOs for pre-recording of geometry, which compared to display lists might loose some features, like state change recording, but give you others, like dynamic data updates. Likewise the implementation of display lists is totally up to the implementation and might not be faster than VBOs and the like. Likewise they’re deprecated (which might also speak for lousy/slow implementations on modern hardware, because drivers don’t tend to optimize rarely used paths that well).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have got some javascript code and I'd like to convert this to C#.
I have got a piece of code, that should countdown some number (in this
Ok, so I've got some legacy code from another company that I have to
I've got some UI code that looks like this: try { SomeClass classInstance =
I have got some code at the end of a button click event that
I've got some R code that looks basically like this: compute.quantiles <- function(mu, type)
I've got some code like the following. I want it so that when I
I've got some code that wobbles UIViews, much like when you edit your iOS
I've got some code where I have a variable that requires a lengthy class
Hi I have got some code that is reported as having the NP_GUARANTEED_DEREF issue

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.