[gameprogrammer] Re: textured shapes and 3d objects.
- From: Jason Zaphyr <storm3@xxxxxxxxxxx>
- To: gameprogrammer@xxxxxxxxxxxxx
- Date: Fri, 23 Mar 2007 16:05:20 -0500
Yes you can fill a circle with a texture using Direct3D and either
Visual C++ or C#, but the trick is to make the circle out of a triangle
fan, similar to the endcap on a cylinder object.
The simple answer, use something like MS3D or Fragmotion to create a
small, thin 1 layer cylinder, then UV Map it using planar mapping, and
apply your texture, then simply load it into your application which uses
Direct3D or OpenGL, and doing it this way, you can resize the object as
needed, and even change the applied texture.
Just a thought.
StOrM3
Roger D Vargas wrote:
Yasser Gonzalez escribió:
I mean to draw a circle and fill it with an image instead a color.
With VC++ it could be easier if you made the image as part of a
resource file (.res). I want to load the image from file and fill the
circle (or polygon) with it. How I do it??
Again, Nehe texture tutorial. It is very basic. Also, you cant fill a
circle, GL (and also Direct 3D) works with non-convex polygons.
I guess a trick could be to have a circular image with a transparent
out of circle area and apply it to a polygon.
Use openGL or SDL is only the way??? I don't think so.
You should use both. SDL is used to initialize screen and manage
events. GL is used for drawing primitives. All Nehe tutorials have an
SDL version that runs in both Linux and Windows.
Give me a couple of days and I will make some basic example for you.
Also Im sending you by mail a simple demo in SDL that loads a bmp and
moves it, commented in spanish.
---------------------
To unsubscribe go to http://gameprogrammer.com/mailinglist.html
- References:
- [gameprogrammer] Free textures
- From: Breton Julien
- [gameprogrammer] Re: drwing shapes
- From: Yasser Gonzalez
- [gameprogrammer] Re: drwing shapes
- From: Scott Harper
- [gameprogrammer] Re: textured shapes and 3d objects.
- From: Yasser Gonzalez
- [gameprogrammer] Re: textured shapes and 3d objects.
- From: Roger D Vargas
Other related posts:
- » [gameprogrammer] Re: textured shapes and 3d objects.
- » [gameprogrammer] Re: textured shapes and 3d objects.
- » [gameprogrammer] Re: textured shapes and 3d objects.
- » [gameprogrammer] Re: textured shapes and 3d objects.
- » [gameprogrammer] Re: textured shapes and 3d objects.
- » [gameprogrammer] Re: textured shapes and 3d objects.
- » [gameprogrammer] Re: textured shapes and 3d objects.
- » [gameprogrammer] Re: textured shapes and 3d objects.
- » [gameprogrammer] Re: textured shapes and 3d objects.
Yasser Gonzalez escribió:
Again, Nehe texture tutorial. It is very basic. Also, you cant fill a circle, GL (and also Direct 3D) works with non-convex polygons. I guess a trick could be to have a circular image with a transparent out of circle area and apply it to a polygon.I mean to draw a circle and fill it with an image instead a color.With VC++ it could be easier if you made the image as part of a resource file (.res). I want to load the image from file and fill the circle (or polygon) with it. How I do it??
You should use both. SDL is used to initialize screen and manage events. GL is used for drawing primitives. All Nehe tutorials have an SDL version that runs in both Linux and Windows. Give me a couple of days and I will make some basic example for you. Also Im sending you by mail a simple demo in SDL that loads a bmp and moves it, commented in spanish.Use openGL or SDL is only the way??? I don't think so.
- [gameprogrammer] Free textures
- From: Breton Julien
- [gameprogrammer] Re: drwing shapes
- From: Yasser Gonzalez
- [gameprogrammer] Re: drwing shapes
- From: Scott Harper
- [gameprogrammer] Re: textured shapes and 3d objects.
- From: Yasser Gonzalez
- [gameprogrammer] Re: textured shapes and 3d objects.
- From: Roger D Vargas