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 - NoxFly

Pages: [1]
1
Window / Re: setMouseCursorGrabbed and setMouseCursorVisible not working
« on: February 06, 2021, 12:54:38 pm »
Indeed it's working on real Linux's environment. So it's occuring because of the indirect display port.
Also, because it's indirect display port, it's limiting OpenGL to the version 1.4, and it's affecting SFML.
Even with the -keyhook option on VcXsrv it's not working.

2
Window / Re: setMouseCursorGrabbed and setMouseCursorVisible not working
« on: February 02, 2021, 09:27:21 am »
I'm on Debian 10, using VcXsrv.
By "not working" I mean that mouse is still beeing in normal state, visible and movable everywhere, even outside the window.

3
Window / setMouseCursorGrabbed and setMouseCursorVisible not working
« on: January 30, 2021, 11:34:47 pm »
Hello !

I'm having some problems with the functions setMouseCursorGrabbed and setMouseCursorVisible (as the title let you know).

Here's a minimal example. If I try this, it's not working for me. Even if I left click on the window.

Also, I'm trying it on WSL2. All other OpenGL stuff is well working.

Am I doing something wrong ?

#include <iostream>

#include <SFML/Window.hpp>
#include <SFML/Graphics.hpp>

int main(int argc, char** argv) {
    sf::RenderWindow window(sf::VideoMode(1280, 720), "My window", sf::Style::Titlebar | sf::Style::Close);
    window.setMouseCursorGrabbed(true);
    window.setMouseCursorVisible(false);

    while(window.isOpen()) {
        while(window.pollEvent(event)) {
            switch(event.type) {
                case sf::Event::Closed:
                window.close();
                break;
            }
        }
        window.clear(sf::Color(255, 255, 255));
        window.display();
    }

    return 0;
}

4
Ok thanks, now I undertand (yes it's WSL). Is there a way to resolve it ?

5
Hello,
I know there is a lot of topics with the same question, but I can't find something that can help me.

I'm on Win10, and I installed Debian from MS.
I installed make, cmake, gcc, (clang to test some things), SDL2, SFML (2.5.1), glm, OpenGL (freeglut etc...).

I clone this repo: https://github.com/Hopson97/MineCraft-One-Week-Challenge
with git ssh. Then I followed what's written in the README.md:
- sh scripts/build.sh release
- sh scripts/run.sh release

All is compiling, and when I execute, the program is saying to me to press Enter, ok, but when it must load the game (create window etc...) I get this:

Code: [Select]
============Press enter to begin ============

Loading game...
Failed to enable udev monitor, joystick connections and disconnections won't be notified: -22
Warning: The created OpenGL context does not fully meet the settings that were requested
Requested: version = 3.3 ; depth bits = 24 ; stencil bits = 8 ; AA level = 0 ; core = false ; debug = false ; sRGB = false
Created: version = 0.0 ; depth bits = 24 ; stencil bits = 8 ; AA level = 0 ; core = false ; debug = false ; sRGB = false
Setting vertical sync failed
Segmentation fault (core dumped)

What must I do ?

Pages: [1]
anything