I am looking for some directions as i am new to OpenGL.
My objective is to create an Analog clock and display some text inside the clock. So far the directions i have received are to use OpenGl ES and Debian because i am developing for Raspberrypi. These are my specific questions:
My guess is this kind of work has been done before, is there any place where i can look for sample code?
If not than i am certainly open to deep dive into graphic world, i am looking for directions on how this can be done on Debian.
- My guess is this kind of work has been done before, is there any place where i can look for sample code?
Yes. And you used it to post here. Maybe you should google for internet.
This task isn’t specific Debian - or to any other Linux distro. The problem you’re gonna have is to pick a suitable library for rendering text. There’s nothing official of the sort.
In general you can start by drawing an approximate circle using a triangle fan. Then render the numbers (as soon as you find a font or text rendering API). Then draw three (or two) lines from the center with a certain radius to simulate the fingers.
Furthermore, this isn’t an GLES forum. Check out the Khronos GLES board.
Thanks Thokra for your response this information will help and i love getting pointed in right direction.
I’m very interested in the Raspberry Pi, do you have one or are you just anticipating getting one?
It is important for you to determine if the platform will support OpenGL ES 1.0 or OpenGL ES 2.0. I checked and it’s OpenGL ES 2.0, you’ll probably need a separate library to get the OpenGL ES 2.0 API on Debian.
They are very different, being fixed function vs programmable and 2.0 does not have backwards compatible features like ftransform or fixed function attributes. It is a completely blank slate for shaders to be written on.