Is there possibility to get array of vertices stored within display list in opengl? From some other code I get a display list which I should draw , but I need to know a bounding box of that model. Is there a possibility that I could extract that information from display list?
Get array of vertices stored in display list
454 Views Asked by user629926 At
2
There are 2 best solutions below
0
derhass
On
No. The GL has no support for inspecting display lists. DLs are just for the GL, not for the user.
Having said that, there is still a theoretical possibility to get the contents of the DL. You could intercept all GL calls the code generating the DL is calling, track dlist state and compute the bounding boxes based on the vertex data. The old chromium open source project would in principle allow you to do this. However, the effort for this would be extraordinarily high, and I doubt that it would be a viable solution to your problem.
Related Questions in C#
- Passing arguments to main in C using Eclipse
- kernel module does not print packet info
- error C2016 (C requires that a struct or union has at least one member) and structs typedefs
- Drawing with ncurses, sockets and fork
- How to catch delay-import dll errors (missing dll or symbol) in MinGW(-w64)?
- Configured TTL for A record(s) backing CNAME records
- Allocating memory for pointers inside structures in functions
- Finding articulation point of undirected graph by DFS
- C first fgets() is being skipped while the second runs
- C std library don't appear to be linked in object file
- gcc static library compilation
- How to do a case-insensitive string comparison?
- C programming: Create and write 2D array of files as function
- How to read a file then store to array and then print?
- Function timeouts in C and thread
Related Questions in OPENGL
- setting OpenGL version in objective-C
- How to run OpenGL version 3.3 (with Intel HD 4000) on Ubuntu 15.04
- Can linear filtering be used for an FBO blit of an MSAA texture to non-MSAA texture?
- How to get shader version from QOpenGLShader?
- "Capture GPU Frame" in XCode -- iOS only?
- Difference between glewGetString(GLEW_VERSION) and glewIsSupported
- Tesselation result flickering - OpenGL/GLSL
- Water rendering in opengl
- Texture mapping consuming physical memory
- Rotating a Cube using Quaternions in PyOpenGL
- Switching from perspective orthographic projection in OpenGL
- FreeType2 and OpenGL : Use unicode
- Should Meshes with and without Skeleton use different Shaders?
- How to get accurate 3D depth from 2D screen mouse click for large scale object in OpenGL?
- Trying to load 2d texture with glTexImage2D, but just getting blank
Related Questions in DISPLAYLIST
- Link list program to Display Student marks
- OpenGL: Copy Contents Of Display List
- Get array of vertices stored in display list
- How do I pass reference of an initialised object from one class to another class, to add (addChild) to display list?
- Actionscript without display list (update/draw loop)
- OpenGL VBO / DisplayList in a game environment
- Detecting MouseEvents for object below another object
- Python Media Player Playlist
- GLU quadrics in display lists?
- OpenGL Display list blocks glEnable(GL_COLOR_MATERIAL)
- How to change the label in display_list of a field in the model in django admin?
- Why is everyone still constructing parent-child views using the render method?
- Passing parameters to OpenGL display lists
- Unable to call multiple display list glCallList()
- Python - TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'? What am i doing wrong?
Related Questions in TAO-FRAMEWORK
- OpenGL Fitting Viewer to Object (written in VB .NET but C# answers will work too)
- OpenGL - Prevent double buffers
- Glut functions. Use a glut functions leads to a drop of a program
- text in Tao Framework with Visual C#
- Get array of vertices stored in display list
- Can I make OpenTK and Tao.FreeGlut work together?
- nullreference glBindFramebufferEXT C#
- Exception in "_openGLControl.InitializeContexts();" line
- using Projection in OpenGL using C#?
- How to draw a textured torus in OpenGL without using GLUT?
- When Should One Call glGetError?
- OpenGL generating rectangles in Tao Framework C#
- Open GL Positioning Lighting at camera always
- C# OpenGL Texture Does not show up
- Picking, translating, rotating objects. How do I do this?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Have you considered using the feedback buffer, since this is deprecated OpenGL?
You can set the render mode to
GL_FEEDBACKbefore drawing your display list and then get a buffer full of all the vertices. Since this is a rarely used feature and a deprecated one at that (transform feedback is the modern equivalent, though it functions in a different pipeline stage), some language bindings may not have it.Unfortunately, the feedback buffer contains more than just vertices. It contains a list of all the raster operations that occurred, and you would have to build some software to make sense of this list. The OpenGL SuperBible has an example of how to do this in C.
The other thing to note is that vertex positions are in screen space, you will need to reverse project them into object space for this to work the way you want in your example. This also means that the original positions for any vertices that had to be clipped will be lost. It is far from a perfect solution, more of a hack if anything, but it could be useful.