void WireDraw(bool GotoEnd)
{
AXIS axy;
int a = 0;
if(GotoEnd)
{
glBegin(GL_LINE_LOOP);
}else{
glBegin(GL_LINE_STRIP);
}
while(Print(ngc, a, &axy))
{
glVertex3f(axy.x, axy.y, axy.z);
a++;
}
glEnd();
}
Wrap Image around Wire shape
Is it possible to wrap an image(bmp) around a wire shape? If so how would I go about doing this?
Here is the code I use to draw the wire shape.
--------------------------Nukemmsn: nukem996@hotmail.comaim: nukem996open source open mind
For every vertex you would have to assign the proper texture coordinate. Much easier said than done...
------------
aud.vze.com - The Audacious Engine <-- It''s not much, yet. But it''s mine... my own... my preciousssss...
MSN: nmaster42@hotmail.com, AIM: LockePick42, ICQ: 74128155
------------
aud.vze.com - The Audacious Engine <-- It''s not much, yet. But it''s mine... my own... my preciousssss...
MSN: nmaster42@hotmail.com, AIM: LockePick42, ICQ: 74128155
_______________________________________Pixelante Game Studios - Fowl Language
heh how would I do this? I only know how to put a texture on a shape with
glEnable(GL_TEXTURE_2D);glBindTexture(GL_TEXTURE_2D, texture[0]);
--------------------------Nukemmsn: nukem996@hotmail.comaim: nukem996open source open mind
I''d recommend using automatic texture generation thanks to plane equations.
Take a look at the glTexGen command.
Anyway you will just apply the texture on your lines.
It will not "fill" the interior of your shape.
To fill the interior, you would have to use either triangles or quads...
Take a look at the glTexGen command.
Anyway you will just apply the texture on your lines.
It will not "fill" the interior of your shape.
To fill the interior, you would have to use either triangles or quads...
So glTexGen would just fill the lines? I want it to fill the hole thing acoss the lines. I tryed glTexGen and I looked it up on opengl but it didnt do anything.
--------------------------Nukemmsn: nukem996@hotmail.comaim: nukem996open source open mind
If you want to "fill the hole thing" you need to use GL_TRIANGLES/GL_TRIANGLE_STRIP/GL_TRIANGLE_FAN not lines. And glTexGen & plane mapping would be a good idea here.
You should never let your fears become the boundaries of your dreams.
You should never let your fears become the boundaries of your dreams.
You should never let your fears become the boundaries of your dreams.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement