sbarisic / NuklearDotNet

.NET binding for the Nuklear immediate mode GUI
Other
189 stars 15 forks source link

How do I get the NuklearDevice? #7

Closed NotHunter101 closed 5 years ago

NotHunter101 commented 5 years ago

I don't know how to find this for the Init method.

sbarisic commented 5 years ago

You are supposed to create your own class which inherits from NuklearDevice, this is made this way so you can use any renderer that you like. OpenGL, DirectX, SFML... whatever.

Here's an example one for SFML https://github.com/sbarisic/NuklearDotNet/blob/master/Example_SFML/Program.cs#L19-L101

And then you just create an instance of it and pass it to Init

SFMLDevice Dev = new SFMLDevice(SFML_RenderWindow);
NuklearAPI.Init(Dev);