6

I'm quite new to animations in Android. For 3D animations I have to use OpenGL to make it look more fluid.

Is it possible to convert a Drawable that is i draw some rectangle or circle on a canvas and i want that to convert into a View using OpenGL. Is that possible and if so then how?

Can anyone please let me know what does the first point in the FEATURES say in this URL http://developer.android.com/reference/android/opengl/GLSurfaceView.html

0

2 Answers 2

3

Well, you can try to convert a Drawable to a bitmap and then map this bitmap on a 3D surface in OpenGL as a texture.

Sign up to request clarification or add additional context in comments.

Comments

3

OpenGL doesn't operate on that level. OpenGL is just a drawing API, giving you "pens and brushes" to draw on some canvas provided by the operating system. Any OS specific concepts like Drawables and Views are out of the scope of OpenGL and won't be dealt with by it.

However maybe if you described in detail what it is you want to achieve we may be able to help.

7 Comments

i want to draw a shape say some rectangle or circle on screen and then convert it into a view. Is that possible?
can you please tell me wat does the first point in the Features describe in this url developer.android.com/reference/android/opengl/…
For just drawing rectangles/circles you can create a custom Android view and draw stuff in the onDraw function. GLSurfaceView is a wrapper for rendering 3D graphics.
after drawing that i want to convert into a view... will that be possible?
All the drawing will happen inside a View which can be used like any other View in Android.
|

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.