PDA

View Full Version : How to create a dual mode Desktop and mobile program



nomine
10-30-2017, 07:47 PM
I want to create a program that will at once utilize both Open GL on the desktop, and OpenGL ES on mobile.
Is such a thing conceivable?
Or will there be two entirely different approaches to rendering?
I only need to create rectangles (two triangles each) and to put bitmaps on their surfaces.
Thanks for any info.

Cornix
10-31-2017, 02:44 AM
What programming language are you planning to use?
For Android for example you would need to program in java. On other mobile phones you might need a different programming language. There are, however, frameworks which claim to automatically produce code which runs on android, iOS and the usual desktop OS's. For java you could take a look at libGDX which is a game framework, but it can be used for any kind of multi-media application. It allows you to use openGL calls directly or use their higher level abstraction for more comfort. I never used it myself, but I heard only positive things from people I know.

Dark Photon
10-31-2017, 07:47 AM
I want to create a program that will at once utilize both Open GL on the desktop, and OpenGL ES on mobile.
Is such a thing conceivable?

Definitely. There is OpenGL ES support on the desktop in multiple forms. For instance, NVidia's GL drivers provide GL-ES support natively (I vaguely recall it offers EGL support too). There are also other GL-ES/EGL implementations on the desktop (e.g. Mesa3D, ANGLE, PowerVR SDK, Adreno also has one IIRC).

When shopping for a desktop GL-ES implementation, if you care about performance you want to pay special attention to what is implemented natively (e.g. desktop-GPU-native texture compression extensions, GL rendering occurs on the GPU vs. CPU) vs. emulated.

nomine
10-31-2017, 08:13 AM
Definitely. There is OpenGL ES support on the desktop in multiple forms.

It seems not on macOS which is my initial desktop target. Basically though I want to target Mac, windows, and linux, coding in C or C++.

nomine
10-31-2017, 09:31 PM
What programming language are you planning to use?.

Most likely C or C++.