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

"Hello Triangle" API not supported #110

Open
Audionysos opened this issue Jul 22, 2018 · 2 comments
Open

"Hello Triangle" API not supported #110

Audionysos opened this issue Jul 22, 2018 · 2 comments

Comments

@Audionysos
Copy link

Hello, I've just started using your project but have problem with basic example.
The view is not rendering. As I started investigating it the context is never created and a NotSupportedException is thrown at CreateContextAttrib(IntPtr sharedContext, int[] attribsList, KhronosVersion api) which I missed at fist.
Sorry for not providing more data but I don't have enough memory to work with such big solution so I've just compiled my own version of GLControl and can't dig any further.
The strange thing is that I've tried to explicitly set API version to ApiGles2 but the same error is still thrown even if from what I see in DeviceContext it's should be accepted without any restrictions.
Could this error be thrown from some other call? It's hard for me to navigate throught all the methods without having solution loaded.

opengldotnet

I use OpenGL.Net 0.7.1 OpenGL.Net.WinForms 0.7.1 in WPF Application
.NET Framework 4.6.1 (First tried on 4.5 with the same result)
Windows 7

Producent karty graficznej Powered by AMD
Mikrouklad graficzny AMD Radeon HD 7700 Series
ID urzadzenia 683D
Ident. dostawcy 1002
ID podsystemu E227
Identyfikator dostawcy podsystemu 174B
Funkcje magistrali graficznej PCI Express
Maksymalne ustawienie magistrali PCI Express x16
Wersja BIOS 015.022.000.005
Numer czesci BIOS 113-22700XTEL-X02
Data BIOS 2012/07/24
Rozmiar pamieci 1024 MB
Typ pamieci GDDR5
Taktowanie rdzenia w MHz 1000 MHz
Taktowanie pamieci w MHz 1125 MHz
Calkowita przepustowosc pamieci w GB/s 72,0 GB/s

@luca-piccioni
Copy link
Owner

Do your system provides the OpenGL extension WGL_EXT_create_context_es2_profile? If it is not supported, you cannot create an OpenGL ES2 context in that way. Maybe you may have success by using ANGLE and EGL.

Include in the working directory the ANGLE pre-compiled libraries (or just compile them yourself): in this way EGL backend should be available (Egl.IsAvailable == true), and you could require the use of EGL (Egl.IsRequired = true): in this way the DeviceContext instance is a DeviceContextEGL, and it can create GL ES2 contextes (just like HelloTriangle.ANGLE sample does).

Sorry for not providing more data but I don't have enough memory to work with such big solution

Just create a new solution for you, including only the projects you require. Samples and ancillary projects takes lot of RAM. Or just unload unnecessary projects.

@Audionysos
Copy link
Author

I can't find WGL_EXT_create_context_es2_profile in OpenGL Extensions Viewer 5.1.4. so I tried the ANGLE.
First I tried the sample project from repository. I'm still not sure how I could figure out which projects include referenced libraries so I just removed the references and installed nuget package in sample project. This kind of works in that Egl.IsAvailable returns true but compilator complained about Matrix4x4f don't have definition for SetOrtho2D so I commented out whole call to Gl.UniformMatrix2f and I'm not sure if that is why nothing is visible one the screen, it's just black.

Then I've tried to use the ANGLE in initial WPF project but with no luck. No matter what I do, the Egl.IsAvailable returns false. I've changed target framework to net 4.5 and reinstalled nuget packages and Now I got tons of errors like

'Gl' does not contain a definition for 'Color3' GLTest

Before this I've also tried to use KhronosVersion.ApiGl - this time _DeviceContext.CreateContextAttrib()
returns, giving Gl error "invalid operation"

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

2 participants