luca-piccioni / OpenGL.Net

Modern OpenGL bindings for C#.
MIT License
568 stars 108 forks source link

OpenGL.CoreUI does not exist .NET Core 2.0 #78

Closed hugglesfox closed 6 years ago

hugglesfox commented 6 years ago

When trying using OpenGL.CoreUI on .NET Core 2.0 after installing the nuget package I get the error saying something along the lines of namespace CoreUI does not exist. Help would be much appreciated (I'm using Ubuntu 17.10).

luca-piccioni commented 6 years ago

The CoreUI namespace is not included in nuget package (it will be in a separated package, anyway).

Moreover, the CoreUI currently support only Windows (altought it should be straightforward to support Linux too).

hugglesfox commented 6 years ago

How do you create a window then without the NativeWindow class? (I'm new to OpenGL programming)

luca-piccioni commented 6 years ago

The NativeWindow can be created with the factory pattern, just extend NativeWindow with a class NativeWindowX11 (or NativeWindowGLX), which implements windowing using XLib/X11 methods.

You can start from scratch using an authoritative sample, just translating calls using P/Invoke (Glx has the necessary definitions, they could made public). A faster method could be copy and replicate the internal implementation of the native window.

At the moment in CoreUI there is only the strictly necessary for running .NET Core 1/2 samples on Windows, and I don't require anymore; your can PR the Linux implementation, if you wish; however, be warned that recently I've noticed instabilities when using my GLX implementation.