Hi,
purage wrote:Since we now know that it is not an issue with the put_pixel function, what else could be the issue.
The only thing I can think of (that hasn't already been ruled out), is that everything is working properly and there is no problem.
Note: Your idea of "working properly" might not be the same as the monitor manufacturer's idea of "working properly"...
Different LCD screens have different pixel layouts. For example, for a cheaper LCD screen pixels might be arranged like this:
Code: Select all
----- -----
|R|B|G| |R|B|G|
|R|B|G| |R|B|G|
|R|B|G| |R|B|G|
----- -----
A higher quality LCD screen might have pixels arranged like this:
Code: Select all
----- -----
|R|B|G| |GG|RR|
|R|B|G| |-----|
|-----| |R|B|G|
|GG|RR| |R|B|G|
----- -----
This arrangement helps to make a pixel look like a single pixel (and not like 3 different coloured dots).
There are other (more complex) arrangements. For some, the little pieces that make up a pixel are determined by what video mode you're using. For example:
Code: Select all
|-----|-----|
|R|B|G|BBBBB|
|R|B|G|-----|
|-----|GG|RR|
|GG|RR|-----|
|-----|R|B|G|
|BBBBB|R|B|G|
|-----|-----|
Which could be used as 4 separate pixels like this:
Code: Select all
----- -----
|R|B|G| |BBBBB|
|R|B|G| |-----|
|-----| |GG|RR|
----- -----
----- -----
|GG|RR| |-----|
|-----| |R|B|G|
|BBBBB| |R|B|G|
----- -----
Or, 2 separate (wide) pixels like this:
Code: Select all
----- -----
|R|B|G|BBBBB|
|R|B|G|-----|
|-----|GG|RR|
----- -----
----- -----
|GG|RR|-----|
|-----|R|B|G|
|BBBBB|R|B|G|
----- -----
Or, 2 separate (narrow) pixels like this:
Code: Select all
----- -----
|R|B|G| |BBBBB|
|R|B|G| |-----|
|-----| |GG|RR|
|GG|RR| |-----|
|-----| |R|B|G|
|BBBBB| |R|B|G|
----- -----
For CRTs, pixels are typically grouped in triangles, like this:
In all cases, if you use a video mode with a smaller resolution that the native/maximum resolution you end up with scaling, where a (small) picture is stretched across the (larger) screen. This helps to hide the little pieces that make up a pixel too.
Note: for CRT monitors the picture is only scaled in the horizontal direction and this scaling is a natural consequence of the technology used. For LCD screens the scaling happens in both directions and is done by special electronics/software inside the monitor.
Also, for a tiny LCD screen that supports a maximum resolution of (for e.g.) 1680 * 1050 the pieces that make up a pixel would be extremely small and harder to see, while a huge LCD screen that supports the same maximum resolution (and same pixel layout) would have much larger pieces that make up a pixel that are easier to see.
Basically, my guess is that you're using a large LCD screen (that was cheaper than other LCD screens with the same size and same maximum resolution) and that the video mode is close to the maximum resolution of the monitor.
Cheers,
Brendan