aliens

Author Topic: Graphics flow/pipeline.  (Read 1910 times)

Offline Skybuck

  • Colonel
  • ****
  • Posts: 223
    • View Profile
Graphics flow/pipeline.
« on: June 01, 2022, 12:18:13 am »
I could really use a description of/about the graphics pipeline/flow in this game/computer program.

It's kinda hard to see/understand because of "states" and "lists" and all kinds of classes doing all kinds of different things. It's also kinda hard to understand the main structure of this program.

So far from what I can tell, there is this main.cpp and maybe some game loop somewhere where it handles input from keyboard/mouse and then it passes this on to some kind of "state" that is active. It seems to cycle through some list of "states" that might be active/in the list... and then it executes a few of those. This kinda makes it hard to debug, also because it needs to load data first... setting breakpoints is a possibility ofcourse, but first I need to know where to set breakpoints and that is the part that I am struggling with and that is where I could use some kind of description or visual aid of the "graphics pipeline".

In other words what I want to know is:

1. What surface draws on what ? Maybe this is overkill, but what I really want to know is:

2. Which part of the program is responsible for "scaling" the 320x200 to 1600x900.  Depending on some kind of option setting. Perhaps I can search for options since it might be processed/look at somewhere in this scaling code. Depending on "original" or "2x original" or something. Ofcourse I need to find the correct setting because there are also a shitload of filters possible hehe... lot's of SSE code and all kinds of SDL code and ARM code and x86 code and god knows what else so I hope you can see that all these different codes it kinda makes it hard to see which code path is actually followed. Hmmmmmmm...... maybe time to split up this code base into different branches, for opengl/arm/android etc... instead of slamming it all together. Ofcourse I know/understand you want to keep it together to keep it nice and consistent/updated, but it does make analysis a whole lot harder and more confusing...

Thus shining some light on this with some documention or chart... how the "graphics" flow through the game... perhaps even from "load time" and "load functions"...  to surfaces...  then maybe from surfaces to some main surface or map surface and the maybe onto some zoom surface ??? and then onto screen surface and maybe finally onto window surface ????

I need to know this information to understand where to "hack" into the 8 bit color code path and convert some of it into 32 bit code path.... and I kinda want to try and benefit from zooming, want to try and keep that capability.

Plus surfaces and zooming also seems to be associated/restricted/intertwined with cropping code and clipping code and what not.

So if some clipping or cropping information could also be provided in this graphics flow analysis/pipeline info that be great.....

I am trying to "UNDERSTAND IT" with the special tool:

https://www.youtube.com/watch?v=RZc298i_UzE

« Last Edit: June 01, 2022, 12:27:52 am by Skybuck »