Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to support shaders? #49

Closed
qq1053831109 opened this issue Nov 16, 2023 · 2 comments
Closed

Is it possible to support shaders? #49

qq1053831109 opened this issue Nov 16, 2023 · 2 comments

Comments

@qq1053831109
Copy link

Is it possible to directly use the gl context of Javafx and support shaders. This allows you to create a 3D game engine based on Javafx

@husker-dev
Copy link
Owner

At the very beginning of my project, this was part of the GL content rendering mechanism into JavaFX.
But this solution has a large number of disadvantages, because we don't know what parameters are specified when creating an OpenGL context in JavaFX.
Also, we cannot specify the version and be sure of the allocated resources, such as FBO or VBO.

Therefore, a shared context mechanism was created. A new pure context is created that can share its objects with JavaFX.


Also, I don't recommend using JavaFX + openglfx to create games. You lose a lot of graphical settings, and add a lot of problems. It's better to use glfw (lwjgl) and imgui.


About shaders.
You can use shaders in OpenGLCanvas. But for easier use in the UI, I have created this issue #47.

@qq1053831109
Copy link
Author

ok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants