Results 1 to 9 of 9

Thread: TBGL_GetFullscreenModes?

  1. #1
    thinBasic MVPs
    Join Date
    Oct 2012
    Location
    Germany
    Age
    54
    Posts
    1,529
    Rep Power
    170

    TBGL_GetFullscreenModes?

    So i do the usual thing as first determine desktop-size and available screen-modes...

    Now what happens? Is my pc unable to display 16Bit-depth?
    Or is the function returning only modes that match the current depth?
    this
    Uses "console", "TBGL"
    
    
    
    String modi = TBGL_GetFullscreenModes
    String mode()
    Long i
    Long nModi = Parse modi, mode, ","
    
    If nModi Then
      For i = 1 To nModi
        PrintL mode(i)
      Next
    EndIf
    
    WaitKey
    
    prints out:
    640x480x32
    720x480x32
    720x576x32
    800x600x32
    1024x768x32
    1152x864x32
    1280x720x32
    1280x768x32
    1280x800x32
    1280x960x32
    1280x1024x32
    1360x768x32
    1366x768x32
    1440x900x32
    1600x900x32
    1680x1050x32
    1920x1080x32
    Where's the catch?


    +++ Petr, if you read this: the \GameConcepts\VehicleRide-example does not work any more because of new keyword Version. I don't know if this was part of an additional TBGL-Samples-Package since i have them all in the same folder, i.e. "c:\thinbasic\SampleScripts\TBGL\..." or if it's part of the with tB shipped samples.
    Last edited by ReneMiner; 19-02-2015 at 14:21.
    I think there are missing some Forum-sections as beta-testing and support

  2. #2
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732
    Hi Rene,

    I am using the EnumDisplaySettings/ChangeDisplaySettings API to get the list of resolutions. On my Windows 8 PC, I also don't get any 16bit modes, although the code allows to list them.
    It seems the driver does not want to tell you about them I tried to force 16 bits then, but the colors rendered are again obviously 32bit.

    I know it works okay for example on Windows XP.

    I think it does have something to do with note "Desktop Composition cannot run unless the color depth is set to 32 bits per pixel" here:
    https://msdn.microsoft.com/en-us/lib...=vs.85%29.aspx


    Petr

    P.S. Thanks for the notice regarding Version issue - the same occurs in TBASS. I would prefer if thinBASIC could allow using these words.
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

  3. #3
    thinBasic MVPs
    Join Date
    Oct 2012
    Location
    Germany
    Age
    54
    Posts
    1,529
    Rep Power
    170
    something strange i discovered today about this topic:

    If running a thinBasic-script directly from thinAir, TBGL_GetFullscreenModes returns only 32-Bit-Depth resolutions.
    If running the same script after bundling it to .exe, started by another tB-script using OS_Shell-function it also shows 16-Bit-Depth resolutions
    Attached Images Attached Images
    Last edited by ReneMiner; 29-08-2015 at 16:49.
    I think there are missing some Forum-sections as beta-testing and support

  4. #4
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732
    Hi Rene,

    thank you, I will check this one. Kind of mysterious indeed
    On the other side - as of today, there is no practical benefit of going 16bit, or do you have any special application for it?


    Petr
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

  5. #5
    thinBasic MVPs
    Join Date
    Oct 2012
    Location
    Germany
    Age
    54
    Posts
    1,529
    Rep Power
    170
    Nope, I don't need 16-Bit, may the users decide what they want.
    It's just that i found it out when i already accepted "OK, it shows 32 Bit resolutions only" - and what a surprise when i started the bundled version. Just was thinking others might be interested to know about that 16-Bit-res will show up in the .exe but not in .tBasic-Scripts
    I think there are missing some Forum-sections as beta-testing and support

  6. #6
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732
    Hi Rene,

    I think the behavior you observe could be closely related to the following, listed here: https://msdn.microsoft.com/en-us/lib...=vs.85%29.aspx
    Note Apps that you design to target Windows 8 and later can no longer query or set display modes that are less than 32 bits per pixel (bpp); these operations will fail. These apps have a compatibility manifest that targets Windows 8. Windows 8 still supports 8-bit and 16-bit color modes for desktop apps that were built without a Windows 8 manifest; Windows 8 emulates these modes but still runs in 32-bit color mode.
    On my Windows 8 PC, I get just 32bit modes both from ThinAIR and when script is run directly.


    Petr
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

  7. #7
    thinBasic MVPs
    Join Date
    Oct 2012
    Location
    Germany
    Age
    54
    Posts
    1,529
    Rep Power
    170
    And how does it behave if creating a bundled .exe from the script and running this?

    Btw. i'm running thinBasic on Windows 10 already
    I think there are missing some Forum-sections as beta-testing and support

  8. #8
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732
    Bundled EXE is the only form which shows the 16bit modes.

    How is Windows 10, do you like it?


    Petr
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

  9. #9
    thinBasic MVPs
    Join Date
    Oct 2012
    Location
    Germany
    Age
    54
    Posts
    1,529
    Rep Power
    170
    I like it more than Win 8(.1) since it's not that touchscreen/touchpad-oriented.
    I think there are missing some Forum-sections as beta-testing and support

Members who have read this thread: 0

There are no members to list at the moment.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •