How does video work?
Posted: Sun Jan 25, 2009 3:20 pm
Hello,
Currently my o/s can read files on the floppy disk, execute ELF files, and even connect to google.fr and download the index
But now I'd like to create a graphical shell and I'm a bit confused with all these things
I have already searched through the forum and the wiki, but I only find incomplete or confusing informations :-/
The purpose of this topic is to sum up how the video works and you correct me if I'm wrong
So :
- almost all video cards conform to the VGA standarts which define a lot of things including ports and memory addresses you can write ; VGA is based on how the first video chipsets were working
- almost all video cards conform to the VBE standarts which define a set of functions accessible using the video BIOS ; the video BIOS can thus be used by operating systems, but in practice it's not really the case because it's very slow
- the VBE standarts only define screen resolutions up to 1280x1024. If you want something higher you have to use a card-specific driver
- SVGA, XGA, etc. are not really standarts ; they are just names for screen resolutions (not part of the VBE standarts)
- OpenGL is just a set of functions that may be directly handled by the video card. In fact each video card has a different way to provide these functions (which is why you have a video card driver). If a function can't be provided by the video card, the o/s has to provide it (in which case its execution will be slower)
- When you call an OpenGL function in a user-mode program, this call is handled by a shared library. This library then makes a syscall, and each syscall is redirected either to the video card (if the video card provides this function) or to the o/s implementation of it
- Any video card may also provide non-opengl and non-vbe functions which may be used by the operating system (like mouse cursor handling, bitblt, etc.) but there are no standarts for this
- functions like "CreateWindow" are syscalls on Microsoft Windows (as windowing is handled by the kernel) or inter-process communication on Linux (as windowing is handled by the software X11)
- In fact OpenGL functions calls first go through the windows manager, which can then adapt the parameters with the position of the window (in case of windowed rendering). Functions like changing rendering viewport are in fact handled by the windows manager, so it can save these values
- Qt, SDL, etc. are just libraries that are hiding OpenGL or o/s-dependent calls
Many of these things are assumptions, that's why I hope you'll correct me
Currently my o/s can read files on the floppy disk, execute ELF files, and even connect to google.fr and download the index
But now I'd like to create a graphical shell and I'm a bit confused with all these things
I have already searched through the forum and the wiki, but I only find incomplete or confusing informations :-/
The purpose of this topic is to sum up how the video works and you correct me if I'm wrong
So :
- almost all video cards conform to the VGA standarts which define a lot of things including ports and memory addresses you can write ; VGA is based on how the first video chipsets were working
- almost all video cards conform to the VBE standarts which define a set of functions accessible using the video BIOS ; the video BIOS can thus be used by operating systems, but in practice it's not really the case because it's very slow
- the VBE standarts only define screen resolutions up to 1280x1024. If you want something higher you have to use a card-specific driver
- SVGA, XGA, etc. are not really standarts ; they are just names for screen resolutions (not part of the VBE standarts)
- OpenGL is just a set of functions that may be directly handled by the video card. In fact each video card has a different way to provide these functions (which is why you have a video card driver). If a function can't be provided by the video card, the o/s has to provide it (in which case its execution will be slower)
- When you call an OpenGL function in a user-mode program, this call is handled by a shared library. This library then makes a syscall, and each syscall is redirected either to the video card (if the video card provides this function) or to the o/s implementation of it
- Any video card may also provide non-opengl and non-vbe functions which may be used by the operating system (like mouse cursor handling, bitblt, etc.) but there are no standarts for this
- functions like "CreateWindow" are syscalls on Microsoft Windows (as windowing is handled by the kernel) or inter-process communication on Linux (as windowing is handled by the software X11)
- In fact OpenGL functions calls first go through the windows manager, which can then adapt the parameters with the position of the window (in case of windowed rendering). Functions like changing rendering viewport are in fact handled by the windows manager, so it can save these values
- Qt, SDL, etc. are just libraries that are hiding OpenGL or o/s-dependent calls
Many of these things are assumptions, that's why I hope you'll correct me