markaren / threepp Goto Github PK
View Code? Open in Web Editor NEWC++20 port of three.js (r129)
License: MIT License
C++20 port of three.js (r129)
License: MIT License
Good day!
It's not an issue, but feature or advice request.
I use ImGui with lots of widgets and 2d plots. Now I want to have 3d visualisation, like threepp does.
I have tried to launch two ImGui windows in two different threads and different glfw and ImGui contexts, but, unfortunately, ImGui is using global variables and can have only one context inside application.
Is it possible to launch threepp with ImGui in another window?
If not. Could you, please, give me an advice on how to make threepp rendering inside ImGui widget like in this article: https://uysalaltas.github.io/2022/01/09/OpenGL_Imgui.html
Here is a gif of what it looks like:
https://uysalaltas.github.io/img/posts/OpenGL_Imgui/Scene%20Gif.gif
Kindest regards!
hey folks, thanks for the great work on this project...
its prolly not a bug but i get the following error when trying to build on Ubuntu 21.10. via cmake
any thoughts?
glad/0.1.34: ERROR: Error downloading binary package: 'glad/0.1.34:7cd8e60b35bfb26d6dc0e23acc1bb0467b1b6545'
ERROR: HTTPSConnectionPool(host='center.conan.io', port=443): Max retries exceeded with url: /v1/ping (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1129)')))
Unable to connect to conancenter=https://center.conan.io
1. Make sure the remote is reachable or,
2. Disable it by using conan remote disable,
Then try again.
i can do cpp but not so hot on conan/cmake/devops.
thanks,
sean
Hello... I got it working on Qt. Now I played around with some examples. In the following example the shadow seems to be clipped.
main.cpp.txt
Make sure dispose can be / is called
Upon minimizing my threepp application I get an error and the program crashes with the following output:
Assertion failed: width > 0, file C:\Users\peter\Documents\vcpkg\buildtrees\threepp\src\ee0c203ca4-4c0a13da5e.clean\glte
xt.h, line 356
Process finished with exit code 3
On a Mac with Retina display the screen size is wrong and you only get an image in the bottom quater of the screen.
To fix you need to use
int width,height;
glfwGetFramebufferSize(window,&width,&height);
size_.width=width;
size_.height=height;
In the Canvas::Impl method after window construction.
Also the resize event needs changing
static void window_size_callback(GLFWwindow *w, int width, int height) {
auto p = static_cast<Canvas::Impl *>(glfwGetWindowUserPointer(w));
glfwGetFramebufferSize(w,&width,&height);
p->size_ = {width, height};
if (p->resizeListener) p->resizeListener.value().operator()(p->size_);
}
It may be better to split frambuffer size and canvas size into different things as this will cause issues with some platforms. Great project BTW.
I need a urdf Loader similar to this - https://github.com/gkjohnson/urdf-loaders
First I wanted to thank you for this port. I'm getting up-to-speed with it fairly quickly and so far it's an enjoyable experience.
I just wanted to report a difficulty I had initially building the threepp library.
In src\threepp\renderers\gl\GLCapabilities.cpp
, three of the defines (GL_MAX_VERTEX_UNIFORM_VECTORS
, GL_MAX_VARYING_VECTORS
, and GL_MAX_FRAGMENT_UNIFORM_VECTORS
) were undefined when I first attempted to build.
I discovered this was related to the opengl version that glad was fetching by default. Apparently these aren't included in the opengl 3.3 compatibility extensions. I boosted the version up to opengl 4.6 compat and it resolved the issue. I'm pulling down glad via ConanCenter so it was fairly easy to change the recipe, but it definitely confused me for a short while. Thought I'd mention it in case others had trouble.
Relates to #89
There is some conflict between the way gltext and threepp handles the OpenGL API, which may lead to strange behavior. Likely, threepp is missing some finalizing calls between render passes.
More intrusive changes than normal will be scheduled during the summer
Things to look at in the future:
- [ ] Rethink physics integration
- [ ] Rethink BufferAttributes
- [ ] Less public fields
- [ ] Make it easier to add EventListeners
- [ ] Target C++20
Need to consider this route sometime in the future.
716550d includes code for raycasting lines, but the result was weird, so the code returns noop.
I want to add a cubemap texture function and implement the envMap feature in GLBackground.cpp. I tried adding CubeTexture and CubeTextureLoader and wrote a shader code to verify. I used RenderDoc to see that the cubemap texture was loaded correctly, but I still can't see the result. I've been trying for a week, and I think I'm very close. I can provide the code I wrote, can you help me identify the problem?
I'm on OSX - this looks like a nice project!
Trying to install, I do this, all fine.
conan remote add ais https://ais.jfrog.io/artifactory/api/conan/ais-conan-local
Then on this step - I am stuck.
Then add a dependency to:
threepp/<version>@ais/stable (stable channel -> releases)
threepp/<version>@ais/testing (development builds -> master)
threepp/<version>@ais/testing-<branch> (development builds -> branches)
I am not familiar enough with conan to do this. Can you make the instructions more
clear? What command do I need to run to do this? Thanks for your help with this.
E.g. pointlight gets darker as the camera gets closer and brighter the other way.
According to https://threejs.org/docs/index.html#api/en/math/Matrix4.setPosition, the function Matrix4.setposition() should set elements with index 3, 7 and 11 to x, y, z respectively.
However, currently threepp is setting the indexes 12, 13 and 14.
threepp/src/threepp/math/Matrix4.cpp
Line 437 in 7e9ba7e
Possibly an error?
Experiencing frequent gimbal locks.. Never had this issue with three.js or three.kt ..
Do you plan to support macOS?
Right now you are targeting OpenGL 4.6 which is not supported on macOS , and the latest supported version is 4.1
Make a separate dev branch from master for contributions, and pull dev to master when publishing new versions.
Add audio support
Will investigate whether or not SDL2 is a better fit for threepp
#178 added SkinnedMesh, but it has little utility without support in loaders.
I've looked briefly at the AssimpLoader, but I am at a loss on how to load skeletal information..
Help would be appriciated if animation ever should be a thing.
could you support the animation of 3D model file
Easy to reproduce using the decal demo with MeshPhongMaterial.
I'm very new to threepp and vcpkg. I created the library as described and all demos are working very well. Now I wanted to create my own test application in qt creator and I'm getting the following errors. I don't understand, what I am missing...
threepp.lib(Color.obj) : error LNK2019: unresolved external symbol __std_find_trivial_1 referenced in function "char const * __cdecl __std_find_trivial<char const ,unsigned char>(char const *,char const *,unsigned char)" (??$__std_find_trivial@$$CBDE@@YAPEBDPEBD0E@Z)
threepp.lib(GLProgram.obj) : error LNK2001: unresolved external symbol __std_find_trivial_1
threepp.lib(GLUniforms.obj) : error LNK2001: unresolved external symbol __std_find_trivial_1
threepp.lib(PeripheralsEventSource.obj) : error LNK2019: unresolved external symbol __std_find_trivial_8 referenced in function "struct threepp::KeyListener * * __cdecl __std_find_trivial<struct threepp::KeyListener *,unsigned __int64>(struct threepp::KeyListener * *,struct threepp::KeyListener * *,unsigned __int64)" (??$__std_find_trivial@PEAUKeyListener@threepp@@_K@@YAPEAPEAUKeyListener@threepp@@PEAPEAU01@0_K@Z)
threepp.lib(StringUtils.obj) : error LNK2001: unresolved external symbol "unsigned int const * const std::_Large_power_data" (?_Large_power_data@std@@3QBIB)
The project can be simplified a lot by dropping Conan support.
Ran several demos. All has the same issue.
Rendering is fine. However, when I try to resize the window, the window does not resize correctly.
The window keeps getting bigger when I drag the mouse and stop responding to the minimize, maximize and close button.
Had to press Ctrl-C at the terminal to close the window.
I'm using Ubuntu 22.04 LTS.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.