SaschaWillems / dglOpenGL

Delphi / Pascal OpenGL header translation (including WGL and GLX)
Mozilla Public License 2.0
82 stars 15 forks source link

Create ES context? #8

Open duzenko opened 5 years ago

duzenko commented 5 years ago

I want to write a cross-platform app using Delphi Windows/Android cross compile feature. I would like to create a ES/EGL context and limit myself to e.g. ES 3.2 API subset Is it possible with dgl?

Artem3213212 commented 5 years ago

1) ES isn't full cross platform it un supported on windows(but on windows you can use emulator from mali) 2) GL and GLES -similar but not one API 3) dglOpenGL is only for OpenGL if you need GLES You can use it https://github.com/TeamFND/OpenGLES30 or it http://git.ccs-baumann.de/Bergmann89/dglopengles/tree/428dd4e767b94384c9ede1c73e03d191bfe96571 more about opengl: see here https://bergmann89.de/en/openglcore/

duzenko commented 5 years ago
  1. OpenGL ES 3.2 should be supported on Windows https://en.wikipedia.org/wiki/OpenGL_ES#OpenGL_ES_3.2_2
  2. Isn't GLES merely a subset of GL?
Artem3213212 commented 5 years ago
  1. IF ES 3.2 Supported by windows why google made Angle project?
  2. GLES has other but very similar shader language. So WebGL n.m is GLES n+1.m (1.0->2.0 e.g) but with different initialization(webgl hasn't egl). GLES has't a big part GL's backward compatibility funtions(glbegin, glend and e.g.)
duzenko commented 5 years ago
  1. Sorry, are you saying that the existence of Angle is an actual proof that ES is not supported on Windows?
  2. This has nothing to do with WebGL or the removed fixed pipeline functions
Artem3213212 commented 5 years ago

Cromium use GLES to rendering WebGL but on windows GLES unsupported, so Google use Angle for GLES emulation. And why very clever google don't use OGL instead on windows? Because GLES and OGL has different shder languages. Read more about GLSL and GLSL ES.

duzenko commented 5 years ago

https://www.saschawillems.de/blog/2015/04/19/using-opengl-es-on-windows-desktops-via-egl/

Artem3213212 commented 5 years ago

PowerVR SDK - emulator not stable AMD OpenGL ES SDK - AMD I don't know what with nvidia ANGLE - emulator with different initialisation function (between official kronos) So you can use mali: https://developer.arm.com/tools-and-software/graphics-and-gaming/opengl-es-emulator/downloads

Artem3213212 commented 5 years ago

But all of this is only emulation and hasn't stability as need for production

duzenko commented 5 years ago

https://github.com/glfw/glfw/blob/master/src/egl_context.c https://github.com/duzenko/GLBenchmark/blob/10210708d17a24438e871a1b075ca243836ed85e/GLBench.Windows/src/main.cpp

Not sure what to say at this point. It seems Delphi is now dead and I must switch to C++.

image

Artem3213212 commented 5 years ago

Again it is not Delphi problem, in C++ it works similar(by emulator).