Comments (5)
This issue had nothing to do with the flat shader, and instead, me not enabling blending, with the following code:
Magnum::Renderer::setFeature(Magnum::Renderer::Feature::Blending, true);
Magnum::Renderer::setBlendFunction(Magnum::Renderer::BlendFunction::SourceAlpha, Magnum::Renderer::BlendFunction::OneMinusSourceAlpha);
Magnum::Renderer::setBlendEquation(Magnum::Renderer::BlendEquation::Add, Magnum::Renderer::BlendEquation::Add);
LibRocket Integration is complete! Now I just have to get it working completely with SDL 2. :)
The cropped image in the background of the libRocket window is just a triangle with the texture of libRocket's GUI. I forgot to remove the code to render that triangle.
from magnum.
If you would like to see the code used to integrate Magnum with libRocket, you can look at my recently added repository on github. Here: https://github.com/miguelishawt/Magnum-libRocket.
from magnum.
Great, this will save me a lot of time. Thank you!
from magnum.
Awesome :-) Is there anything that can be done on Magnum side to simplify the integration (i.e. conversion between libRocket and Magnum vector types)? Or the integration class is all you need on the C++ side and everything else is done in HTML?
from magnum.
Is there anything that can be done on Magnum side to simplify the integration (i.e. conversion between libRocket and Magnum vector types)?
The only thing that I can think of is that libRocket supplies vertices that contain a colour component within them. And Flat2D does not support colour per vertex. But it seems that it does not affect the resulting images rendered.
The conversion between magnum and libRocket's vector types are not required, but it may be if sizeof(Magnum::Vector2) != sizeof(Rocket::Core::Vector2f)
. This may be the case if you are using a vector with double
's in the implementation within magnum (that is a Magnum::Vector2<double>
within the Flat2D shader's implementation for the attributes).
Or the integration class is all you need on the C++ side and everything else is done in HTML?
On magnum's side yes, but you do require a system interface, which basically handles the input for libRocket. I have implemented a SystemInterface with SDL 2, which is located here on GitHub: https://github.com/miguelishawt/SDL2-libRocket-SystemInterface.
from magnum.
Related Issues (20)
- few compile warnings HOT 1
- How to point to a local installation of `corrade` without using the bootstrap project? HOT 3
- undefined symbol: flextGLInit HOT 4
- Image rendered in gray since 1847c72 HOT 18
- Emscripten 3.1.21+ crashes EmscriptenApplication: "AsciiToString is not defined" HOT 4
- How to build from source on MSYS2 MINGW64? HOT 1
- keyReleaseEvent not triggered after printscreen on OSX HOT 6
- Conversion from CubicHermite to Bezier is wrong
- Mixing with raw openGL calls and Context::current().resetState() HOT 3
- C Bindings HOT 5
- WebGPU backend HOT 2
- Parallel rendering with glb files HOT 5
- Conflict with near and far Macros When Including WinSock2.h After Matrix4.h HOT 2
- emsdk compile error: typedef redefinition with different types HOT 4
- Memory leak when destroying GL::Mesh HOT 3
- Linking in Emscripten >= 3.1.52 doesn't work HOT 4
- Some trouble with LineGL3D shader when camera is close HOT 1
- Segmentation fault with nullptr instruction in AbstractShaderProgram at Cross-Compile HOT 21
- Apply MAGNUM_BUILD_STATIC_UNIQUE_GLOBALS for the flextGL globals as well HOT 4
- EmscriptenApplication keyboard handler doesn't send key event corresponding to text input events HOT 2
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 magnum.