pumpitupdev / pumptools

A collection of tools to run Pump It Up games.
The Unlicense
22 stars 7 forks source link

Flexible GFX backend in pumptools using GLFW #26

Open voidderef opened 3 years ago

voidderef commented 3 years ago

In GitLab by @icex2 on Mar 21, 2021, 19:25

There are a bunch of currently unsolved problems that are annoying to deal with on various levels:

I spent some time crunching on these problems and creating a POC of some sort for all three points. However, this POC depends on how the rendering engine is working in regards of rendering state and passes. Since the game went through a bunch of iterations, things changed. So the POC code doesn't work on all games equally well or at all. Furthermore, there are edge cases like the Linux MK3 ports, or newer games supporting HD mode natively. Piu Pro, being Stepmania, might not need this feature since you can just modify the Static.ini file and should be good to go.

Now, one option to solve this is would be using a library that takes care of all the OpenGL and window manager foo for us. Furthermore, it would allow us initializing modern OpenGL contexts (3+) and still let the game use the fixed-function stuff. pumptools features can use more modern features transparently, e.g. render to texture for scaling and pillarboxing.

Some references for this issue:

PIU gfx subsystem, gfx API relevant calls call trace: piu gfx subsystem init calls trace

XOpenDisplay
glXChooseVisual
RootWindow (???)
XCreateWindow
XSetNormalHints
XSetStandardProperties
glXCreateContext
XMapWindow
glXMakeCurrent