drawing a line in 3-d?
Hey im doing some of the opengl tutorols but im just wondring how can i draw a line in 3d? like drawline(0.0f,0.0f,0.0f); or somthing like that. ty in advanced.
glBegin(GL_LINES);
glVertex3f(fromX, fromY, fromZ);
glVertex3f(toX, toY, toZ);
glEnd();
also start reading the red book. it''s got all this stuff in it.
http://fly.cc.fer.hr/~unreal/theredbook/
-me
glVertex3f(fromX, fromY, fromZ);
glVertex3f(toX, toY, toZ);
glEnd();
also start reading the red book. it''s got all this stuff in it.
http://fly.cc.fer.hr/~unreal/theredbook/
-me
im serious, glLinewitdh is still in pixels, quads is the only way to get lines that has width in units.
---------------------------------
For an overdose of l33tness, flashbang.nu
---------------------------------
For an overdose of l33tness, flashbang.nu
You can specify a float for the width. You can also anti-alias it so it will look nice. Use a quad when you need to have a texture running down the line.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement