Pixel formats

Advanced game related topics
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Pixel formats

Post 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


User avatar
Psychophanta
Always Here
Always Here
Posts: 5153
Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:

Post by Psychophanta »

I think ATI VGAs return BGR... so it is a hardware issue i think.
http://www.zeitgeistmovie.com

while (world==business) world+=mafia;
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post 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?
User avatar
Psychophanta
Always Here
Always Here
Posts: 5153
Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:

Post by Psychophanta »

Trond wrote:Do you get RGB with nvidia?
Have not nVidia just now, but i remember GeForce MX400 did.
http://www.zeitgeistmovie.com

while (world==business) world+=mafia;
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post by Trond »

Ok, thanks.
superadnim
Enthusiast
Enthusiast
Posts: 480
Joined: Thu Jul 27, 2006 4:06 am

Post by superadnim »

returned 7 on an nvidia gpu.

:lol: should I bash the keyboard and give up?
:?
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post by Trond »

7 is BGR. No one got RGB yet?
Thalius
Enthusiast
Enthusiast
Posts: 711
Joined: Thu Jul 17, 2003 4:15 pm
Contact:

Post by Thalius »

Nvidia GF7600 -> 7
"In 3D there is never enough Time to do Things right,
but there's always enough Time to make them *look* right."
"psssst! i steal signatures... don't tell anyone! ;)"
Baldrick
Addict
Addict
Posts: 860
Joined: Fri Jul 02, 2004 6:49 pm
Location: Australia

Post by Baldrick »

GeForce Fx5200 = 7 also
User avatar
Psychophanta
Always Here
Always Here
Posts: 5153
Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:

Post by Psychophanta »

nVidia GeForce2 MX400 AGPx4
returns 7 here
http://www.zeitgeistmovie.com

while (world==business) world+=mafia;
Post Reply