forked from JACoders/OpenJK
-
Notifications
You must be signed in to change notification settings - Fork 0
Renderer Development Notes
Willi Schinmeyer edited this page Mar 10, 2014
·
1 revision
Some things to keep in mind with regards to SDL:
- SDL has to be dynamically linked so the global variables are shared between renderer and client
- What does this mean for SDL versions? Presumably as long as they are ABI compatible it'll be fine?
- SDL Input may only work when using an SDL window?
- In that case, window creation should maybe not be left to the renderer?
- But the renderer certainly needs to create the GL context.
- What if we want to write a D3D renderer? Would that require different window creation parameters? Could SDL even do that?
- Screw D3D for now, all our current renderers and planned renderers are OpenGL.
- What if we want to write a D3D renderer? Would that require different window creation parameters? Could SDL even do that?
What problems would we run into if we try to use one renderer for SP and MP and how can they be fixed?
In general: There are differences between SP and MP so at startup a mode should be selected, changing a global setting which would then result in the desired behavior.
- differing enums. They could be translated at runtime.
- differing structs. They could be translated at runtime.
- differing functions, like Z_Malloc. Could possibly translate?
Differences that I don't know if they'll be problems? I need to investigate/ask about these.
- Z_Malloc vs Hunk_Alloc? See e.g. ParseFlare() in tr_bsp.
Things that MP has but SP lacks and vice-versa. A unified renderer would have these, they'd just not always be used.
- SP has Light Amplifying goggles
- SP has r_debugStyle
- SP has viewfog, presumably for LA goggles fog?
- MP shares Ghoul 2 instances between client and server
- SP has (different?) flares (?)
- MP has avidemo
- SP has save game images
- MP has sv_pure