openGL 2.0 Alpha blending #408
Replies: 3 comments 3 replies
-
It sounds pretty wild to use both DirectX and OpenGL in the same application. To me it seems a lot simpler to write a DirectX backend instead. I guess in your setup there could be many reasons why translucency isn't working. You need to ensure the RmlUi output is actually alpha blended correctly with the DX target when compositing the two, I can't really help you with that. |
Beta Was this translation helpful? Give feedback.
-
Yes, the idea is a bit wild, but the result is more than satisfying. I have no problem synchronizing the interaction with the interface, with all the gui rendered and updated in a separate thread and does not affect the performance of the main game scene, which is already "barely breathing" on the old unreal engine. I have a renderer for your lib on directx 9, the basis are taken from libRocket, but it is very poor performance, for example during the playback of such animation render on Directx9 and OpenGL 2.0 takes 5 ms per tick, which is very bad for me, it is very much. That's why I decided to render the ui in a different thread. I would be glad to use render gui on directx9 if it were more productive than now or render on OpenGL 2.0 in another thread if it rendered alpha channel on the main scene correctly... I'm even ready to pay someone who can help me with any of my problems, but I don't even know who to ask :( |
Beta Was this translation helpful? Give feedback.
-
https://prnt.sc/Qv-Vp4Vusng6 ` HWND hwNative = glfwGetWin32Window(window);
Why is this happening and how to solve it? What is the problem with win32 windows? :) |
Beta Was this translation helpful? Give feedback.
-
hello, help me deal with the problem, because I do not have enough knowledge or experience with rendering.
I have a game that uses directx9 rendering (of course, there is no access to the sources :)), I want to use your library in it to write my GUI. What I want to do - for the best performance, I came up with the idea to use the opengl2 renderer in a separate independent thread with my context, that is, let the game render its main scene with its direct9, and the UI will spin in its thread on opengl2, I managed to do this but there is one problem when the gui element is rendered on top of the main scene - the translucency of the alpha channel does not work, this is how it looks like https://prnt.sc/EOzrM0m_FiSR if you look closely - you will see that the alpha channel works correctly when the element is on top of another element but on the background of the main scene is solid black instead of a light shadow..
this is how i initialize the window to render the gui
please, if you can help me suggest what needs to be changed or added to correctly display the alpha channel on the background of the main scene - I will be very grateful
Beta Was this translation helpful? Give feedback.
All reactions