Jump to content

Ultralight Integration C++ (Almost Complete)


photo

Recommended Posts

before i lose hours in trying to make it work i just want to know if it is possible to integrate ultralight with unigine, when i read the docs i noticed this: Integrating With Games (ultralig.ht)
image.png.b19fc5e12ed2a34ba9ba03d28504c290.png

is this enough information to know if it is possible to integrate it or not?

i am looking at this repository: ImpromptuNinjas/UltralightSharp: Multi-platform .NET bindings to the Ultralight project. (github.com)

to see if it would be possible but i don't want to be hit by a paywall before get anywhere.

 

thanks in advance.

Edited by Kireita
Link to comment

The limitation is the same as for previous GUI integrations:

  • If the shared rendering context is required - you can't do the integration in Community SDK

As far as I can see there is CPU renderer available, so you can start with it. If there is a way to render on GPU similar to IMGUI - you also don't need a shared context and you can do the integration.

 

  • Like 1

How to submit a good bug report
---
FTP server for test scenes and user uploads:

Link to comment
On 4/1/2021 at 7:01 AM, silent said:

The limitation is the same as for previous GUI integrations:

  • If the shared rendering context is required - you can't do the integration in Community SDK

As far as I can see there is CPU renderer available, so you can start with it. If there is a way to render on GPU similar to IMGUI - you also don't need a shared context and you can do the integration.

 


Hey i started implementing and now i am at a point where i don't know how to draw the pixeldata i have, i uploaded my project to GitHub: kireita/UltraLightCpp: Ultralight integration with Unigine (github.com) if anyone is interested in helping me on this.

So i 'think' i have it almost working i just need to understand how to draw the pixel data on screen.
for now everything is taken from this page: Integrating With Games (ultralig.ht) and i placed everything in the file called UltralightImpl.cpp

and now i don't know how to draw this data:
image.png.7dcf1d0186b534fbf21d27dea6ae69c1.png

and yes i was taking notes from the previous ImGui implementation so things will look similar. if anyone can help it would be much appreciated.

this project should compile with no errors

 

thanks in advance

Edited by Kireita
  • Thanks 1
Link to comment

Wow! Great work so far!
In theory you'd just have to pass it to the screen.

The easiest way would be to make a post process shader/material that just draws a texture on top of everything.

Take a look at the shaders and renderer samples in the SDK browser, also here's an example on how to do a simple post-process shader https://developer.unigine.com/en/docs/2.10/code/uusl/create_post

I might look into this some time because I'd really need a UI system too.

Link to comment
6 hours ago, polyk.kristf said:

Wow! Great work so far!
In theory you'd just have to pass it to the screen.

The easiest way would be to make a post process shader/material that just draws a texture on top of everything.

Take a look at the shaders and renderer samples in the SDK browser, also here's an example on how to do a simple post-process shader https://developer.unigine.com/en/docs/2.10/code/uusl/create_post

I might look into this some time because I'd really need a UI system too.

for now its not handling any input but i got this:

Link to comment
On 4/1/2021 at 7:01 AM, silent said:

The limitation is the same as for previous GUI integrations:

  • If the shared rendering context is required - you can't do the integration in Community SDK

As far as I can see there is CPU renderer available, so you can start with it. If there is a way to render on GPU similar to IMGUI - you also don't need a shared context and you can do the integration.

 

Hey i was finally able to integrate it!

here is the repository: kireita/UltraLightCpp: Ultralight integration with Unigine (github.com)
and if you know immediately where to look here is the cpp file: UltraLightCpp/UltralightImpl.cpp at master · kireita/UltraLightCpp (github.com)

i dont mind if someone helps me out with cleaning up the code :) this was a messy project and i have almost 0 C++ knowledge. this was a lot of asking and copy paste XD.

the other samples are a bit over the top for me, so if anyone can contribute i will be very gratefull :D

here are the samples i have been able to make work so far, these are samples 1,2,4,5,6 and my own sample.

Edited by Kireita
  • Like 4
Link to comment
  • Kireita changed the title to Ultralight Integration C++ (Almost Complete)
×
×
  • Create New...