-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
show amount of pixels painted per ip adress #6
base: stats_by_ip
Are you sure you want to change the base?
Conversation
Show the amount of pixels drawn by an ip on the canvas. The ip's are drawn in the upper left corner of over the pixelflut canvas. * This commit introduces an additional dependency on SDL2_ttf.h. You might have to install this header through your distros package managaer. * The drawing code was updated to support loading fonts into a glyph atlas. * To make this work this commit extends the existing connection tracker code to keep track of the amount of pixels painted by a connection. This is a very hacky version because I am busy af.
SDL_Texture * texture; | ||
} fontTexture; | ||
|
||
enum FontStatus { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This pattern does not really fit into the codebase.
(I copied this from an earlier test-version of mine)
|
||
#define TEX_SIZE_X 512 | ||
#define TEX_SIZE_Y 512 | ||
#define SCREEN_SIZE_X 1024 | ||
#define SCREEN_SIZE_Y 1024 | ||
#define NET_MASK 0xff |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(context) This is supposed to be the subnetmask of your LAN. It is required for correctly grouping the connections by ip.
Currently we don't keep track of connections that have terminated, so if we had a client that drew a lot of pixels and then quit immediately, it would only show for a split second. Then later if another client is started from the same ip, the old information is lost and it starts again at 0. I think before we can reasonably use this we need to write out the connection trackers of closing connections to a buffer somewhere (or to a file). This is why I dumped these trackers to the command line so far. (Of course, this new approach is nicer because of the immediate feedback, which we don't have on the command line) |
Show the amount of pixels drawn by an ip on the canvas. The ip's are drawn in the upper left corner of over the pixelflut canvas.
This is a very hacky version because I am busy af.