|
|
square texture on circle (using gluDisk)
I would like to drape a square texture on a 2D circle (using gluDisk),
without the textue being distored.
Use case: I have picture of watch as a square picture. Basically a white
square with a swatch in the middle of it (as a circle). I want the gluDisk
to carry the texture basically cutting out the white part of the texture.
The OpenGL FAQ (21.140) mentions using fractional texture coordinates, but
no sample code.
Thanks
Latti
I know I can solve this adding alpha to the picture, but that is not what I
want to do.
|
|
0
|
|
|
|
Reply
|
Latti
|
7/3/2006 8:33:21 PM |
|
This seems to work:
::glEnable(GL_TEXTURE_2D);
::gluQuadricDrawStyle(m_qCircle, GLU_FILL);
::gluQuadricTexture(m_qCircle, GL_TRUE);
::gluDisk(m_qCircle, 0, 200, 50, 10);
::glDisable(GL_TEXTURE_2D);
I found it myself :-)
Latti
"Latti" <latti@pandora.be> wrote in message
news:lafqg.517410$p7.12812393@phobos.telenet-ops.be...
>I would like to drape a square texture on a 2D circle (using gluDisk),
>without the textue being distored.
>
> Use case: I have picture of watch as a square picture. Basically a white
> square with a swatch in the middle of it (as a circle). I want the gluDisk
> to carry the texture basically cutting out the white part of the texture.
> The OpenGL FAQ (21.140) mentions using fractional texture coordinates, but
> no sample code.
>
> Thanks
> Latti
>
> I know I can solve this adding alpha to the picture, but that is not what
> I want to do.
>
|
|
0
|
|
|
|
Reply
|
Latti
|
7/3/2006 8:50:01 PM
|
|
|
1 Replies
528 Views
(page loaded in 0.101 seconds)
Similiar Articles: Drawing a circle. - comp.graphics.api.opengl... found was to use a texture. If ... Yes I know gluDisk( qobj, innerRadius, outerRadius, slices, loops ); > but I want to avoid using DISK to draw a simple CIRCLE. > > For ... Display 2D circle on "screen" over 3D scene - comp.graphics.api ...For example, I would like to draw a square or a circle inset from the window edges. ... I am trying to use 2D texture and 3D texture for ... of images. this means it needs ... Using 3D Textures - the best way - comp.graphics.api.opengl ...Use texture >> > coordinate generation to ... view direction (1,0,0), you would use M square ... Is there a way to draw some text in a circle path? ... ... 2D texture ... 3D to 2D projection - comp.soft-sys.matlabI am trying to map a hemisphere to a circle, i.e getting ... My overall task is to fill each square or even trapezoid ... in space ... short list is as follows: 2D and 3D texture ... square texture on circle (using gluDisk) - Application Forum at ...I would like to drape a square texture on a 2D circle (using gluDisk), without the textue being distored. Use case: I have picture of watch as a Transform a circle to a square? - Application Forum at ObjectMix.comHow do I transform a circle to a square using a Windows XP install of GIMP, or ... square texture on circle (using gluDisk) 7/22/2012 1:53:37 AM
|
|
|
|
|
|
|
|
|