Page 1 of 1

Pixel formats

Posted: Wed Dec 10, 2008 6:26 pm
by Trond
I see there's two different 32-bit pixel formats. But it seems to me like only one of them is ever used under Windows.

Does anyone know if it's common for this function to return #PB_PixelFormat_32Bits_RGB instead of BGR?

This code returns 7 (BGR) here:

Code: Select all

If InitSprite() = 0
  MessageRequester("Error", "Can't open screen & sprite enviroment!", 0)
  End
EndIf

OpenWindow(0, 0, 0, 512, 384, "", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
OpenWindowedScreen(WindowID(0), 0, 0, 512, 384, 0, 0, 0)


Repeat
  Repeat
    Event = WindowEvent()   
    Select Event
      Case #PB_Event_CloseWindow
        End
    EndSelect
  Until Event = 0

  ClearScreen(RGB(0, 0, 0))
  FlipBuffers()
  StartDrawing(ScreenOutput())
    Debug DrawingBufferPixelFormat()
  StopDrawing()
  End
  
  Delay(10)
ForEver



Posted: Thu Dec 11, 2008 12:30 pm
by Psychophanta
I think ATI VGAs return BGR... so it is a hardware issue i think.

Posted: Thu Dec 11, 2008 1:05 pm
by Trond
Psychophanta wrote:I think ATI VGAs return BGR... so it is a hardware issue i think.
I get BGR as well, for both Matrox and S3. Do you get RGB with nvidia?

Posted: Thu Dec 11, 2008 1:08 pm
by Psychophanta
Trond wrote:Do you get RGB with nvidia?
Have not nVidia just now, but i remember GeForce MX400 did.

Posted: Thu Dec 11, 2008 1:09 pm
by Trond
Ok, thanks.

Posted: Thu Dec 11, 2008 2:56 pm
by superadnim
returned 7 on an nvidia gpu.

Posted: Thu Dec 11, 2008 3:54 pm
by Trond
7 is BGR. No one got RGB yet?

Posted: Fri Dec 12, 2008 10:54 am
by Thalius
Nvidia GF7600 -> 7

Posted: Fri Dec 12, 2008 12:00 pm
by Baldrick
GeForce Fx5200 = 7 also

Posted: Fri Dec 12, 2008 3:02 pm
by Psychophanta
nVidia GeForce2 MX400 AGPx4
returns 7 here