Thank you very much, Adam. I have made a slightly messy diagram
including some of what you and Alan have posted, I have yet to explore
in depth the parts related to Events so I could not extend that part
yet. I am sharing mostly in the hopes that it can be useful to instruct
other beginners to
what is 8 bit color depth visual's format?
If it's a PseudoColor visual, which is the most common type for 8-bit,
then it's an index of an entry in the Colormap.
This was my biggest difficulty yet it was under my nose this whole time,
thank you very much, Alan.
Thank you very much Adam, I have written a small diagram as an exercise,
I would appreciate if someone could tell me if this is correct:
Display -> is --> +---+
| | Server and |
V | Input Devices |
contains +---+
From the Xlib - C Language X Interface: "For each screen of the
display, there may be a list of valid visual types supported at
different depths of the screen."
Alright this is confusing me, this implies that one screen can handle
windows with 8, 16, 24, 32 bits color depth at the same time an
From the Xlib - C Language X Interface: "For each screen of the
display, there may be a list of valid visual types supported at
different depths of the screen."
Alright this is confusing me, this implies that one screen can handle
windows with 8, 16, 24, 32 bits color depth at the same time an
So, in X11,
A Colormap consists of a set of entries defining color values (I thought
this would be called a "palette").
A Visual manages the color resources but doesn't configure the color
depth, it sets colors in accordance with the current color depth of the
Screen and Colormap of the Visu
Thank you very much, Carsten. This explains why they have used the XShm
functions and the purpose of grabsharedmemory().
___
xorg@lists.x.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: https://lists.x.org/mailman/listinfo/
This should be slightly easier to read:
Display*X_display = NULL;
Window X_mainWindow;
ColormapX_cmap;
Visual* X_visual;
GC X_gc;
int X_screen;
XVisualInfo X_visualinfo;
XImage* image = NULL;
int X_width;
int
No, that is not intentional, the original function had x = width-1 and I
forgot to change that for clarity, and yes, the colors are converted
perfectly, by "squashed" I mean what is happening in this image (that is
Doom).
https://postimg.cc/MfRz0Dk7
You see, only 1/4 of the window is being fill
Thank you very much, Walter. st3_fixup() (adapted for my use) is a lot
more readable now:
void st3_fixup(XImage *image, int width, int height)
{
uint8_t *row_src;
for (int y = 0; y < height; y++) {
row_src = (uint8_t *)&image->data [y * image->bytes_per_line];
for (int x
Is there any documentation, article or book on how to convert the colors
displayed by a program that was originally written to work on 8 bit
screens? The problem I am facing seems to be related to how pixels are
represented in the 'data' member of the XImage structure, which results
in a squash
11 matches
Mail list logo