Is there an simple example code of a program using c / c++ and OpenGL ES?

Is there an simple example code of a program using c / c++ and OpenGL ES?

I compiled the program code using glfw. However, it did not work well in gameshell’s environment.

well it is highly possible that there is no opengl library as there is no GPU acceleration.

I’m not sure if mesa work on ARM platform.

How does it fail?

hi Godzil

I am a beginner of “arm linux”.

Compare clockwork Pi and Raspberry Pi

“GPU Mail 400 MP 2 Supports OpneGL ES 2.0” was written.
There was “” and so on in “/ usr / lib / arm-linux-gnueabihf”.
From two conditions, maybe I can make a polygon display program? I thought.

window = glfwCreateWindow(WIDTH, HEIGHT, __FILE__, NULL, NULL);

However, the return value of glfwCreateWindow () was null.
Probably, I think that this program method was incorrect.

I hope that a simple triangle display program will be provided from “Clockwork”.

  • I used google translation

There is GL support via llvmpipe (ie, it’s software rendered)
GL works (RA video driver is GL based) it’s just slow.

It’s GL, not GLES btw (since llvmpipe is GL)

hi fr500

(Is “RA video driver” a “RetroArch video driver”…?)

There are currently no libraries or methods to use hardware rendering (OpenGL ES etc.) from c / c ++ programs of GameShell.
Is this my understanding correct?

  • I used google translation

OpenGL on Mali GPU (BananaPi, OrangePi PC, etc)

If glfw can’t create the window and an OpenGL context it mean that something is missing.

@AC_YOUCH what is the exact error you get?

Yes, RetroArch video driver.
I tried installing the sunxi drivers before and I failed. Let me know if it works for you.

@Godzil well GLX gears works. Regarding GLFW, I wouldn’t know, but I see he’s starting it with GLFW_OPENGL_ES_API, afaik llvmpipe supports GL not GLES, so maybe that has to be changed.

As I said, GL on the CPI is software rendered (so far), so the GPU supported APIs are irrelevant.

Well the thing is without proper output showing how it fail, it is hard to know why it fail :slight_smile:

I.E. if it is not a build error, I would highly recommend to use that : to get the exact reason why it fail

Thank you for your advice and trying.
I would like to try it, but that is difficult for me.
I used linux for gameshell for the first time.

I hope the clockwork formula will provide an OS image supporting hardware rendering.

Thank you for the advice.

The reason I tried glfw is because I had the programming experience with windows + glfw in the past.
I wanted to confirm hardware rendering of gameshell.
I think that whatever means of confirmation was good.