Comments (8)
And no default display for all :-)
` IntPtr defaultDisplay = new IntPtr (DEFAULT_DISPLAY);
// Support for BCM VideoCore API
if (IsAvailable && Bcm.IsAvailable) {
// This need to be executed before any EGL/GL routine
Bcm.bcm_host_init();
}
// Support for Vu+ Duo2 BCM VideoCore API
if (IsAvailable && VuDuo2.IsAvailable) {
// This need to be executed before any EGL/GL routine
defaultDisplay = VuDuo2.gles_init();
}
#if DEBUG
string envEglInit = Environment.GetEnvironmentVariable("EGL_INIT");
if (envEglInit != null && envEglInit == "NO")
return;
#endif
// Get EGL information
if (IsAvailable) {
IntPtr eglDisplay = GetDisplay(defaultDisplay);
`
from opengl.net.
Ups
from opengl.net.
VuDuo2.gles_init() returned value is a display handle? Then, it should be passed to DeviceContext.Create. Sadly, the display is got using eglGetDisplay with EGL_DEFAULT_DISPLAY; the returned value isn't suitable for your case?
It seems that you need optional EGL initialization. Isn't it?
Why don't you fork, so you can show your code in a better way?
from opengl.net.
But this seems to be a chicken/egg problem.
I have 3 extern Methods.
First of all and only once GLES_Native_Init()
GLES_Native_CreateNativeDisplay -> gives the value for eglGetDisplay(....)
GLES_Native_CreateNativeWindow -> gives the native window
Sorry, but all my test i do with Mono.Cairo, because it's hard to test with embedded system like i have.
The snippet is just like it can be...
If the getDisplay in the Initialize always use a "DEFAULT_DISPLAY" i cannot use it.
from opengl.net.
And i get a little confused with the naming..
A lot of devices have a "BCM VideoCore GPU", not just the Pi ;-)
from opengl.net.
Can you elaborate more about the naming? Did you intend the Bcm
wrapper class?
from opengl.net.
Just name the classes like the device, not as the chipset.
PI->bcm->videocore
Vuplus duo2->bcm->videocore
Vuplus 4k ->bcm->videocore
so how should be the classnames for the other devices?
from opengl.net.
Well, now that EGL can be initialized by hooking the KhronosApi.EglInitializing
event, every platform can initialize EGL with any native function, without including any P/Invoke declaration. Indeed I think that Bcm
wrapper will be moved in OpenGL.Net.VideoCore.
The naming of OpenGL.Net.VideoCore is originated by the fact that on RPi you must use the Video Core IV (4) API (VC4? VIV?), containing a libbcmhost.so binary. Indeed Bcm
wrapper, and "window" exposed in OpenGL.Net.VideoCore. This is not an API change, since Bcm
is internal.
If you want to pull some code on repository, to add support to specific platforms, I see a single OpenGL.Net.Bcm library project, that is able to support multiple hardware; this project could be the OpenGL.Net.VideoCore renamed. It will contains a Raspberry
class that is the actual Bcm
; and it will contains a VuplusDuo2
and Vuplus4k
classes that are the KhronosApi
implementation for the relative platforms. If VuplusDuo2
and Vuplus4k
have the very same API, that can be simplified in a single Vuplus
class. Indeed, the window implementation uses a factory pattern to support multiple implementation on different platforms.
However, I don't understand why naming a software layer VideoCore and not having a standard API. 😞
from opengl.net.
Related Issues (20)
- Steam Overlay fails to hook into Device Context Creation and SwapBuffers HOT 1
- HelloTriangle (.NET Core) on Windows 10 not working HOT 3
- Hardware-accelerated Matrix4x4f results are different from software results HOT 3
- Switch the GlControl to OpenGl.Net.WinForms_net461 with running exception HOT 5
- Status of .NET Core 3 Support, and offer of help HOT 1
- DrawBufferMode Missing Enums for ColorAttachments HOT 1
- Changing to NVIDIA GeForce GTX 1650 causes initialisation fail HOT 2
- How to ask Control to draw triangle when I click a button on winform? HOT 1
- Visual Studio 2015 to 2019 glControl designer view crashes in windows 10 HOT 4
- Crash with CoreUI HOT 2
- glGenVertexArrays() shows NullReferenceException HOT 3
- Nothing works out of the box when I clone the repo and try and run the samples. HOT 4
- having trouble drawing anything (using VBO/vertex buffer/etc) HOT 1
- pwglCreateContextAttribsARB not implemented HOT 1
- Support for .Net 5 HOT 1
- Release OpenGL.NET netstandard2.0 to nuget
- KeyCode doesn't support Backspace, Page down or Page Up HOT 1
- 'Object reference not set to an instance of an object.' HOT 2
- Equivalent of Glu.LookAt HOT 1
- What to do with...
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from opengl.net.