Comments (11)
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.
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:
- The unit tests must be run from the root project working directory so that it can access the Shaders folder
- 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.
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.
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)
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.
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.
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.
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.
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.
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.
Glad it's working. Can I close this issue now?
from skybolt.
Yes I think that fixes this issue. If I experience something else I will create a new one
from skybolt.
Related Issues (20)
- PlanetTileImagesLoader will go to pieces when “attributeLayer->getHighestAvailableLevel(key) ”not available; HOT 1
- Missing Environment/Ground/Ground026_1K_Color.jpg HOT 2
- Run minimalApp found camera are so sensitive HOT 2
- How to turn off sunlight in the scene graph? HOT 2
- Hao to add two maps in the scene graph? HOT 3
- The SKYBOLT_CACHE_DIR environmental variable doesn't take effect. HOT 6
- Can skyblt load tms tiles? HOT 3
- FreeCameraController and OrbitCameraController HOT 2
- How to remove all external forces on the helicopter uh60 HOT 5
- Load the model I found on the Internet to report an error. HOT 6
- building the v1.5.0 with JSBSIM failed HOT 4
- can not open include file: “SkyboltVis/Renderable/Planet/Tile/HeightMap.h”: No such file or directory HOT 7
- The material of the model loaded into the scene is wrong. HOT 3
- Customize the component display model HOT 7
- Building the v1.5.0 with package earcut not found HOT 1
- Terrain doesn't load in FlightSimApp. HOT 1
- conan version problem HOT 1
- Collisions with Terrain HOT 1
- Could not install packages with conan for v1.6 HOT 1
- Issues about the assets registered. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from skybolt.