![]() |
|
Welcome to the Computer Webmaster Gaming Console Graphics Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
| |||||||
| Software Programming Software programming talk, ask questions about computer software programming or help others |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| | #1 | ||
| I'm reading LaMothe's "Tricks.. Windows.. Gurus" book, but am having trouble understanding 24-bit mode. I don't even think my video card supports it (the demo he included the disc doesn't work), but I'd still like to understand how this works. In 24-bit mode, he writes the 3 bytes to the surface in BGR. Why does he do this? Why isn't it RGB? In 32-bit mode the bytes are arranged (A)RGB, and in 16-bit mode the bits are RGB, too. Why is 24-bit mode so different? It's the whole endian thing, isn't it? That confuses me, too. Shouldn't all the modes then be in the same BGR order? Will someone please explain this to me? | |||
| Advertisements |
| | #2 | ||
| Hi Steven, cr88192, all, Yes, it does seem very arbitrary. It all depends on how the hardware maker engineered the card to read the data from video memory. Luckily, if the hardware maker designed the card to be DX compliant then it is required to expose its supported formats through the DX interface. See the SDK docs or LaMothe on how to do this (if you don't already know). -- Best wishes, Allen "cr88192" <cr88192@hotmail.com> wrote in message news:vgtimd626qhg55@corp.supernews.com... > > "Steven" <windecks@hotmail.com> wrote in message > news:ce9a7d65.0307101724.1eb77d69@posting.google.c om... > > I'm reading LaMothe's "Tricks.. Windows.. Gurus" book, but am having > > trouble understanding 24-bit mode. I don't even think my video card > > supports it (the demo he included the disc doesn't work), but I'd > > still like to understand how this works. > > > > In 24-bit mode, he writes the 3 bytes to the surface in BGR. Why does > > he do this? Why isn't it RGB? In 32-bit mode the bytes are arranged > > (A)RGB, and in 16-bit mode the bits are RGB, too. Why is 24-bit mode > > so different? > > > > It's the whole endian thing, isn't it? That confuses me, too. > > Shouldn't all the modes then be in the same BGR order? > > > > Will someone please explain this to me? > > it is just one of those arbitrary details I guess. a lot of formats are like > this, ie: some being RGBA, others being BGRA... with graphics formats > another arbitrary detail is whether y is up or down, and with some formats > there is a need to conditionally flip the image. > > many things in software are arbitarary. > > > | |||
| | #3 | ||
| > > Yes, it does seem very arbitrary. It all depends on how the hardware > maker engineered the card to read the data from video memory. Luckily, if > the hardware maker designed the card to be DX compliant then it is required > to expose its supported formats through the DX interface. See the SDK docs > or LaMothe on how to do this (if you don't already know). yes. I don't really use directx though, I tend to do things through gl myself... | |||
| Featured Websites | ||||
|
![]() |
| Tags: 24bit, mode, understanding |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Reduce color-thickness in cmyk-mode | Christian Hell | Graphics in general | 0 | 06-11-2007 10:36 PM |
| DMA Mode Problem...? | Tiscali | Motherboards | 0 | 06-11-2007 1:03 PM |
| GTALK LOGIN BUT AS INVISIBLE MODE ?? | talktosunnysethi@gmail.com | Google questions | 1 | 05-28-2007 1:45 AM |
| Featured Websites | ||||
|