![]() ![]() Usually pixel data is in "RGB" format, but this isn't always the case. For older versions of VBE there is no "bytes between lines for linear frame buffer" value, and the "bytes between lines for bank switched" value is used for both bank switching and linear frame buffer. The first one is used when the video mode is setup for bank switching and the second one is used when linear frame buffer is being used. Note that (for VBE 3.0) there may be 2 "bytes between lines" values returned by the "Get Mode Information" VBE function. In the same way, you can't use one "rep stosb/w/d/q" or "memset()" to fill the entire display, and you should fill each line separately to avoid writing to any padding. For example, for a 640 * 480 * 16-bpp video mode, the offset of a line is found by "offset = line * bytes_per_line" and not by "offset = line * (640 * 2)". The "Get Mode Information" VBE function returns the number of bytes between lines, and this value should be used. line 1, padding, then line 2, padding, then line 3. This isn't always the case, and for a variety of reasons there may be padding between lines (e.g. People tend to assume that pixel data is contiguous (e.g. Despite this, it's still possible to find obsolete information on the internet suggesting to use these old standard mode numbers. In VBE 2.0 these mode numbers were deprecated - VESA decided not to define any more of them, told video card manufacturers they don't need to use the old standard mode numbers, and told programmers to search for the mode they want without relying on any of the old standard mode numbers. There's some mistakes that beginners seem to make fairly often when they first start working with VBE.įor older versions of the VBE specification (VBE 1.0, VBE 1.1 and VBE 1.2) VESA defined some standard mode numbers. Struct vbe_mode_info_structure Common Mistakes
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |