Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


lines and light giving objects

This topic is 6196 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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(); }

Share this post

Link to post
Share on other sites
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

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);

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

always read your help file first

Share this post

Link to post
Share on other sites
i forgot about the lights

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

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!