View more

View more

View more

### Image of the Day Submit

IOTD | Top Screenshots

### The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.

# lines and light giving objects

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

2 replies to this topic

### #1ironfroggy  Members

Posted 02 August 2001 - 09:48 PM

How do I render a line in 3D? And, can I have that light be illuminated and give off light to the surroundings? How do I make other objects, like triangles, give off light? // God.c void main() { WORLD Earth; LIFE People = Earth.CreateLife(HUMAN); GiveHope(&People); delete Earth; EvilCackle(); }

### #2core114  Members

Posted 03 August 2001 - 07:42 AM

rendering a line in 3d is the same as drawing a regular line
after doing transformation && clipping you draw a line from point a to point b

if you are using opengl or d3d LOOK AT THE HELP FILE
they get paid to make it useable

in help you will find you should do somethind similar to this in
opengl:

glBegin(GL_LINE_STRIP);
glColor3f(1.0f,0.0f,0.0f); // this is for color (red)
glVertex3f(1.0f, 0.0f, 0.0f); // where the ends are
glVertex3f(0.0f, 1.0f, 0.0f);
glEnd();

d3d :
pd3dDevice->DrawIndexedPrimitive( type, D3DFVF_VERTEX,
//pd3dDevice->DrawIndexedPrimitive( D3DPT_LINESTRIP, D3DFVF_VERTEX,
(VOID*)Vert, 3,
Indice, 3, 0 );

----

### #3core114  Members

Posted 03 August 2001 - 07:47 AM

you can''t have the WHOLE line or triangle give off light in 3d very easily

the standard is point lights
go look at help for that
if you do software lighting you can do whatever you want

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.