Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - vuln

Pages: [1]
1
Thank you for the information and your time.

2
Quote
Do other apps try to set it to 32-bit bit depth even though your desktop is set to 24-bit (I presume since getDesktop clearly gets 24-bit)
It doesnt seem like it. (my monitor does not change refresh rate when opening/closing the apps)

Quote
You likely don't need 32-bit anyway as its only transparency that's the improvement from 24-bit.
How big is actually the difference. (And why does it say on Lenovo's website ( https://www.lenovo.com/il/en/monitors/G27q-30) say that it has a color depth of 8-bit (6+FRC) color depth. maybe bits per color channel?)
And why can I set the bit depth to 32 (windowed) and not make the monitor switch hz?

Quote
Have you tried to open a fullscreen window with manual values (width and height) as well as manual 24-bit bit depth and does that work as expected?
yes I tried and everything behaved as it should like it did when using getDesktop().

3
It should be noted that the method descriptions above the declarations so the description for "getDesktopMode()" is:
Quote
    ////////////////////////////////////////////////////////////
    /// \brief Get the current desktop video mode
    ///
    /// \return Current desktop video mode
    ///
    ////////////////////////////////////////////////////////////

oops

Anyways, it seems like my monitor (Lenovo G27q-30) likes to be at 60hz when using 32bit depth (I suppose) but out of my curiosity I wanted to know at what bit depth the "getDesktopMode()" VideoMode was:

Quote
std::cout << sf::VideoMode::getDesktopMode().bitsPerPixel << "\n";
output: 24

So it seems like my monitor likes 24bit depth when at 165hz?
I don't really get it why it's doing this, because no other app does this (change hz or resolution of my monitor).

4
I have found the issue.

I used this to set up my screen:
sf::RenderWindow window(sf::VideoMode(SCREEN_WIDTH, SCREEN_HEIGHT), "App", sf::Style::Fullscreen);
This works fine but I set the Screen size manually and in some way it changes some things resulting in the monitor hz getting set to 60 (probably default) or gets the video mode with the resolution of 1920x1080 60hz.

however if I use this:
sf::VideoMode videoMode = sf::VideoMode::getDesktopMode();
sf::RenderWindow window(videoMode, "App", sf::Style::Fullscreen);
The VideoMode gets the screen size and information about the graphics driver / monitor and sets the video mode to the best one that is supported.

Here is the function in VideoMode.hpp:
Quote
static VideoMode getDesktopMode();

////////////////////////////////////////////////////////////
/// \brief Retrieve all the video modes supported in fullscreen mode
///
/// When creating a fullscreen window, the video mode is restricted
/// to be compatible with what the graphics driver and monitor
/// support. This function returns the complete list of all video
/// modes that can be used in fullscreen mode.
/// The returned array is sorted from best to worst, so that
/// the first element will always give the best mode (higher
/// width, height and bits-per-pixel).
///
/// \return Array containing all the supported fullscreen modes
///
////////////////////////////////////////////////////////////

Thank you for your time

5
On games I trieed:
CS2 and Hacknet: Fullscreen
Noita: Fullscreen (real)
Reassembly: Fullscreen: True fullscreen

every game listed here uses Opengl

6
I believe I am using true fullscreen.
I set it to fullscreen by using sf::Style::Fullscreen when creating the window.

I have messed around with the GPU settngs (nvidia-settings) and set my resolution to 1080p 165hz (I have a 1440p monitor) and the hz of my monitor was not changed when opening the app (no black screen for 5 sec when launching or closing the window).

When i set it to 1440p 165hz (what i normally use) the issue occurs.


7
No I only have one monitor

I have tried several OpenGL games (like CS2, Noita or hacknet) and had no issue at all

edit: I also tried to launch the app in KDE Plasma, Checked my drivers and my graphics card is new so it cant be failing

8
Hi there.

I am using Arch Linux with the window manager i3wm (X11) and have a 165hz monitor.

The issue that I am facing here is that when the window is set to fullscreen, the refresh rate of my monitor is set to 60hz.
(I can see that it changes the refresh rate of my monitor because the screen goes black for a couple of seconds and the cursor does not move smoothly)
sf::RenderWindow window(sf::VideoMode(SCREEN_WIDTH, SCREEN_HEIGHT), "App", sf::Style::Fullscreen);

If I enable v-sync, which should set the window FPS to my monitor refreshrate (in my case 165) but instead it sets the fps to 60.
window.setVerticalSyncEnabled(true);

If I disable v-sync, the FPS is as big as it can be regardless of monitor refresh rate but the mouse cursor does not feel smooth and so does everything on the screen.

However if I don't set the window to fullscreen, the fps/refresh rate is 165 when v-sync is enabled or as big as is can when v-sync is off.
sf::RenderWindow window(sf::VideoMode(SCREEN_WIDTH, SCREEN_HEIGHT), "App");

I built SFML 2.6.0 from source.

Thank you for your time.

Pages: [1]