How to create a dual mode Desktop and mobile program

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.

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.

[QUOTE=nomine;1289136]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?[/QUOTE]

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.

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++.

Most likely C or C++.