OpenGL: Copy Contents Of Display List

262 views Asked by At

I am stuck on OpenGL 1.1 for a particular game-modding project, and I am using a display list as a sort of snapshot of part of the game, where I begin the display list, direct those parts to render, and close the display list. This correctly results in a display list I can then transform and render at will.

However, while I am transforming and rendering that display list, the part of the game that was snapshotted ceases to exist, and it destroys any display lists that it had been using, meaning when I render my snapshot, those parts that were display lists then fail to render.

What I would like to be able to do is somehow direct OpenGL to copy the contents of nested display lists into the top-level one instead of just embedding the call to the nested display list. I haven't been able to find any function that would do what I want. Does one exist?

(No, the parts of the game I am snapshotting are not predictable, and are likely to be wildly different every single time.)

1

There are 1 answers

0
datenwolf On

I think your best bet would be to hook into all relevant OpenGL calls, by injecting a "opengl32.dll" hooking DLL with entry points identical to the OpenGL ones, but each one making a copy of the relevant data.