Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nothing works out of the box when I clone the repo and try and run the samples. #155

Open
BjarkeCK opened this issue Mar 5, 2020 · 4 comments

Comments

@BjarkeCK
Copy link

BjarkeCK commented Mar 5, 2020

There's no install bat in the root of the directory.
There's no instructions in the readme.
There's a bunch of sln projects, but all for old vs versions, so not sure which one to use.

Gaaarh

@SuperDIMMaX
Copy link

I not sure what you mean exacly.
install what install? i just connect OpenGL.Net\OpenGL.Net_netstd2.0.csproj - netstd2.0 - net standart work probality on all platforms. i not use Windows .NET 4.x and platform dependes (Win Forms, etc.)
sln... sorry i use VS code and notepad++ :) no sln.
but if you need start working with OpenGL.NET -
i use SFML for create window, inputs, etc... and use .NET 5.0 (new .NET it all in one - net standart, net core, etc.)
in csproj file:
<ProjectReference Include="..\OpenGL.Net\OpenGL.Net\OpenGL.Net_netstd2.0.csproj" />
/ + add package SFML
in code:

using SFML;
using SFML.Window;
using OpenGL;

in main

Gl.Initialize();   // OpenGL.NET
Window window = new Window(new VideoMode(800,600),"test");    // SFML
window.SetActive();    // SFML
Gl.BindAPI();   // OpenGL.NET
while (window.IsOpen) // SFML
{
	window.DispatchEvents(); 
	// INSERT YOU OPENGL COMMANDS HERE.... 
	Gl.Clear(ClearBufferMask.ColorBufferBit);
	Gl.Begin(PrimitiveType.Triangles);
	Gl.Color3(1.0f, 0.0f, 0.0f); Gl.Vertex2(0.0f, 0.0f);
	Gl.Color3(0.0f, 1.0f, 0.0f); Gl.Vertex2(0.5f, 1.0f);
	Gl.Color3(0.0f, 0.0f, 1.0f); Gl.Vertex2(1.0f, 0.0f);
	Gl.End();
        // --------------
	window.Display(); // SFML -- not sure what this doing... but need 
}

@PtrMan
Copy link

PtrMan commented Apr 30, 2020

I have a similar problem. I am trying to use this library with the NuGet package of this. I fail to reference/access important classes, for example

new OpenGL.GlControl();

it just can't find/access the class for some reason.
Same was the case for Vertex3f, I just couldn't access it.

I will try SFML!
@SuperDIMMaX your little test program works great, thank you!

@SuperDIMMaX
Copy link

SuperDIMMaX commented Apr 30, 2020

I not use nuget only local copy of repro. nuget only have compiled dll - monoandroid, net35, net461
SFML - only create window for GL content, you probality can use SDL2 or samiliar...
Not use OpenGL.Net.CoreUI and etc. for create window (or use self writen WPF manager(or... find) if need only Windows)
I not use OpenGL.GlControl() .... new OpenGL.GlControl(); - not important ) this is OpenGL.Net.WinForms .... addon as OpenGL.Net.CoreUI and how i see not maintenance and not uptodate (

on that moment i just setup VAO, FBO, etc ...

@SuperDIMMaX
Copy link

SuperDIMMaX commented Apr 30, 2020

I will try SFML!

And try not mix SFML graphics and Opengl.NET - not use any SFML.Graphics to avoid problems -
texture load, render text, ... use only SFML.Window / Audio.

Vertex3f - Gl.Vertex3() - this class have 8 ovverides for double, float, short, int

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants