Hi Dj.

Here is the fragment shader that does the polar coordinates I spoke of:

#extension GL_OES_EGL_image_external: require
uniform samplerExternalOES tex_sampler_0;
precision mediump float;
varying vec2 v_texcoord;

const float PI = 3.14159265358979323846264;

const vec2 texOff = vec2(0.0, 0.0);
const vec2 texSize = vec2(1.0, 1.0);

void main(void) {

    vec2 norm = (1.0 - v_texcoord) * 2.0 - 1.0;
    float theta = PI + atan(norm.x, norm.y);
    float r = length(norm);
    vec2 polar = 1.0 - vec2(theta / (2.0 * PI), r);
    gl_FragColor = texture2D(tex_sampler_0, (polar + texOff) * texSize);
}


I have tested it myself, and it seems to work great.


On Thursday, December 13, 2012 10:37:02 AM UTC-6, djhacktor wrote:
>
>
> see this image i want this kinda  ui
>
>
> On Thursday, 13 December 2012 17:53:09 UTC+5:30, skink wrote:
>>
>>
>>
>> djhacktor wrote: 
>> > @ sink i mean that how can i put image in seek bar progressdrawable  ( 
>> > image is a circle ) and same with thumb 
>> > 
>> > 
>>
>> how to put an image in a drawable? i still dont understand... 
>>
>> pskink 
>>
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to