An example of android fingerpaint in opengl?

Tutorials concerning the OpenGL® ES cross-platform API for full-function 2D and 3D graphics on the Google-Android platform.

An example of android fingerpaint in opengl?

Postby eldruida » Mon Aug 01, 2011 5:07 pm

Hello,

I'm asking if anybody knows any example about drawing strokes like in paint with opengl.
I've been using the code that is in the demos of android, fingerpaint. However, in slows devices it works slow, so the stroke gets clumsy.

Well, if you know if great if not don't worry.

Thanks :)
eldruida
Freshman
Freshman
 
Posts: 2
Joined: Mon Apr 25, 2011 7:21 pm

Top

Re: An example of android fingerpaint in opengl?

Postby roopa » Mon Sep 19, 2011 12:52 pm

you can try Queue up touch points and connect them using GL_LINE_STRIP.
roopa
Developer
Developer
 
Posts: 27
Joined: Wed Sep 14, 2011 6:46 am

Re: An example of android fingerpaint in opengl?

Postby millerni456 » Fri Oct 07, 2011 12:54 am

Here's probably your best bet.

Start off by using a texture that represents the painting canvas.
In this case I would work in Orthogonal mode (not projection) because pick-selection would be frustrating.
So, in orthogonal mode, your OpenGL coordiates more or less match your screen coordinates.

By listening for onTouch event you can edit the bit map of your texture. Of course the implementation is up to you for how you want drawing to be done (ie. colors/shapes etc..)

So I'd reccomend you look into how you programmatically generate images based on input. (using bitmaps)
millerni456
Junior Developer
Junior Developer
 
Posts: 12
Joined: Wed Oct 05, 2011 12:39 am

Re: An example of android fingerpaint in opengl?

Postby Netsurfer » Sat Jan 28, 2012 10:17 pm

Linderdaum Engine http://www.linderdaum.com has a Test_FingerPaint demo that does exactly what you ask for. Take a look.
Precompiled demo for Android is also available: https://market.android.com/details?id=c ... iquidpaint
Netsurfer
Freshman
Freshman
 
Posts: 2
Joined: Mon Nov 28, 2011 7:43 am

Top

Return to Android 2D/3D Graphics - OpenGL Tutorials

Who is online

Users browsing this forum: Google Feedfetcher and 3 guests