yglukhov / nimx

GUI library
MIT License
1.09k stars 75 forks source link

[Question] How can I embed an OpenGL window #417

Closed mantielero closed 4 years ago

mantielero commented 4 years ago

First, I am not that experienced. How could I embed an openGL window?

I m thinking about inserting a window from gr framework.

Something like this.

yglukhov commented 4 years ago

To integrate something that draws to current opengl context into nimx, you just subclass a View, and override method draw. Here's a sample of integrating nanovg into nimx: https://github.com/yglukhov/nimx_nanovg/blob/master/main.nim