Giter Site home page Giter Site logo

Comments (11)

matthew-reid avatar matthew-reid commented on August 19, 2024 1

Keyboard input should be working now, but mouse input is still broken. I've isolated the problem, it's caused by OSG consuming the X11 mouse events before OIS has a chance to handle them. I'm going to rework the InputManager and I'll report back once I've got a fix.

from skybolt.

matthew-reid avatar matthew-reid commented on August 19, 2024

What version of OSG are you using? There was a long standing threading bug in the osgdb_curl plugin which caused a crash when loading images from multiple threads. It looks like that might be the source of your problem. The bug was fixed in OpenSceneGraph commit ccf6554d2d145017a277312e3848e6f8af859f21 which is in the master branch, but I don't think it has made it into any released versions yet. I would recommend using the master version of OSG until the next OSG release.

As a workaround you can force the application to be single threaded by setting coreCount=1 in EngineRoot.cpp:71. It should avoid the crash, but tile streaming performance will suffer greatly.

The unit tests are failing for 2 reasons:

  1. The unit tests must be run from the root project working directory so that it can access the Shaders folder
  2. It can't create an off-screen OpenGL context on your system. It looks like you're running on Linux which might currently have some graphics compatibility issues due to lack of testing on my part (I develop on Windows).

from skybolt.

kit047 avatar kit047 commented on August 19, 2024

That workaround did work, and updating to the current master of osg also worked. I'll try and keep up with osg updates from here.

Now the MinimalApp doesn't crash and I do get the planet model being displayed. I still have no input, however. I plan to look into my version of ois next when I get a chance since I don't know what my issue is.

Those were the reasons the unit tests were failing. I didn't look too far into not being able to create an off-screen OpenGL context, so I'm not sure of the solution to that one.

I may try and run this on Windows so I can see what your output is like as well.

Thanks for your response!

from skybolt.

kit047 avatar kit047 commented on August 19, 2024

Ok, there is still no input ability in the app (mouse drag, scroll, keyboard, etc). Am I missing something else? I've checked/changed ois versions and I am getting the same results. Should I even have input here? Or am I terribly mistaken with how this should be working? Here is an image of what I see when I run. I get no errors, running with 8 CPU cores (7 background threads)

Skybolt-App

Also, If this is not the place to be having a conversation about my specific issues please point in the correct direction. And aside from the source code, is there any documentation I could be looking through? I appreciate the responses.

from skybolt.

matthew-reid avatar matthew-reid commented on August 19, 2024

The app should respond to these inputs:

  • Mouse move orbits the camera around the planet
  • Mouse scroll wheel zooms in and out
  • Escape key exits application

I suspect OIS is having an internal error of some kind which you'll need to debug to get more information. Look at InputPlatformOis.cpp and put breakpoints in to check whether the OIS objects initialize correctly, and that events are fired. If you can't see anything wrong at that level, you might need to go inside the OIS library code itself.

Your screenshot is sort of correct, except that you're not getting any terrain tiles, which I think is why there's a hole in the earth. You need to put a mapbox key into the settings file (should be a path to the file printed at the start of the application log output). You can find info about getting a mapbox key at the bottom of the README file https://github.com/Piraxus/Skybolt/blob/master/README.md

The only documentation so far is in that README file and the source code. I plan to create a wiki soon where users can add additional documentation and how-to's.

from skybolt.

kit047 avatar kit047 commented on August 19, 2024

When running in Linux, I can follow the debugger through setting up the InputPlatform, though I never hit input events after that (mouseMoved, keyPressed, etc.) On the other hand, I DID get it running in windows and I believe I am seeing proper behavior. The app is responsive to mouse movements and exits with esc. I still see the hole when at a certain zoom level, I will have to double check my mapbox key. EDIT: it was the key, tile streaming is good to go.

There are differences between the apps in windows and linux. In linux, I get a window with a title bar with Minimize, Maximize, and Close buttons (they do nothing). In Windows, there is no title bar, just the window. Some difference in that I think is causing the input issue.

from skybolt.

matthew-reid avatar matthew-reid commented on August 19, 2024

I fixed a bug where the incorrect window handle was passed into the input system on linux. The fix is now on master. See if that helps your input issues.

from skybolt.

matthew-reid avatar matthew-reid commented on August 19, 2024

I pushed a fix to the master branch which uses OSG's mouse/keyboard input system instead of OIS for the MinimalApp. As a result, input should now work with linux, and OIS is no longer required as a SkyboltEngine dependency. I have successfully tested it running ubuntu on windows through wsl2. Let me know if it works, and I'll close the issue if there are no other problems.

OIS is still required for building Sprocket because the Sprocket window is provided by Qt instead of OSG hence there's no OSG input available. I have not had a chance to test Sprocket on linux yet, but if there's a similar problem with Qt and OIS competing for mouse input, I could use Qt as the input source to fix this case.

from skybolt.

kit047 avatar kit047 commented on August 19, 2024

I pulled your updates and mouse and keyboard inputs are now working in the Minimal App. The app performance/responsiveness is definitely lesser than when I run it on windows, though that is likely something I can look into in my particular setup.

from skybolt.

matthew-reid avatar matthew-reid commented on August 19, 2024

Glad it's working. Can I close this issue now?

from skybolt.

kit047 avatar kit047 commented on August 19, 2024

Yes I think that fixes this issue. If I experience something else I will create a new one

from skybolt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.