removing gaps in lines
Hi, I''m a newbie in OpenGL.
I''m facing a problem when drawing lines next to each other.
There is always a gap between the lines no matter how near i put them to gather.
Is there a way to stick them togather ??
PS : I''m using OpenGL in VB.Net
To Live Is To Die.
To Live Is To Die.
If all you want is wider lines, use glLineWidth()
As for sticking them next to each other, it depends on the width, you''d need to get that (glGeti() I think) and use it to figure out how close they need to be
As for sticking them next to each other, it depends on the width, you''d need to get that (glGeti() I think) and use it to figure out how close they need to be
You could allways draw Quads, then they will stick together.
IF you draw lines, it doesn''t matter how many or how close they are, or how thick they are, there will allways be gaps.
What i wonder is, why draw lot''s of lines?
IF you draw lines, it doesn''t matter how many or how close they are, or how thick they are, there will allways be gaps.
What i wonder is, why draw lot''s of lines?
www.flashbang.se | www.thegeekstate.com | nehe.gamedev.net | glAux fix for lesson 6 | [twitter]thegeekstate[/twitter]
Thanks lc_overlord and m_e_my_self. glLineWidth won''t work like what lc_overlord have mention. Well lines uses less processing power. i need to render around 40000 bars(like a bar chart). If i''m using quads the rendering speed will be very slow. So there is no way i''m gonna remove thoes gaps ??
To Live Is To Die.

To Live Is To Die.
To Live Is To Die.
ok done changing them to quads. Also reducing resolutions(number of bars rendered). Working fine but now i''m facing some other problems.
there are some lines at the base of my bars(like flikering couze of slow refresh rate). any idea bout this ?
To Live Is To Die.
there are some lines at the base of my bars(like flikering couze of slow refresh rate). any idea bout this ?
To Live Is To Die.
To Live Is To Die.
Hi there. Sorry it was my mistake(calculation mistake) for the flickering problem. Solve that already. is there a limitation list of how many polygons that i can render using different 3D Cards ?? i''m using a GeForce4 MX440. will it be able to render 100,000 polygons smoothly ??
To Live Is To Die.
To Live Is To Die.
To Live Is To Die.
Hmm, if your rendering 40,000 bars that should be 40,000 quads.
Replace the quads with triangle strips (2 trinagles make a square) and you will notice a preformace increase.
EDIT: I would assume these bars wont be on screen all the time, you may want to group them, and have a check if the camera is pointing at the group, if no, dont draw that group of bars.
[edited by - skow on November 4, 2003 11:57:58 PM]
Replace the quads with triangle strips (2 trinagles make a square) and you will notice a preformace increase.
EDIT: I would assume these bars wont be on screen all the time, you may want to group them, and have a check if the camera is pointing at the group, if no, dont draw that group of bars.
[edited by - skow on November 4, 2003 11:57:58 PM]
hmmm skow i don''t really understand. let me get it stright.
Here is what i want to render :
50 * 50 * 10 cubes
so equal to
50 * 50 * 10 * 6 quads = 150,000
if i would to render them in tris it would be double rite couze 1 quad = 2 tris
so will be 300,000 polygons
won''t that make it slower ??
And another thing is bout the camera thing. how do i know which surface to render and which not to render ? are there any glfunctions for that ?
Thanks alot Skow.
To Live Is To Die.
Here is what i want to render :
50 * 50 * 10 cubes
so equal to
50 * 50 * 10 * 6 quads = 150,000
if i would to render them in tris it would be double rite couze 1 quad = 2 tris
so will be 300,000 polygons
won''t that make it slower ??
And another thing is bout the camera thing. how do i know which surface to render and which not to render ? are there any glfunctions for that ?
Thanks alot Skow.
To Live Is To Die.
To Live Is To Die.
Yes, rendering 2 triangle strips is faster than rending one quad.
If you have closed box''s you will want to make sure you have back face culling on (It wont draw the backs of quads that you wouldnt be able to see.
As for a check to see what geomitry is being viewed, that is a little more complicated, but not to hard to do. What your looking to do is frustum culling. There is a great tutorial on gametutorials.com.
http://www.gametutorials.com/Tutorials/opengl/OpenGL_Pg5.htm
If you know where each bar will be and you can easily group them you will find it faster to do a check for say, 16 boxes at a time than each individual box.
Good luck
If you have closed box''s you will want to make sure you have back face culling on (It wont draw the backs of quads that you wouldnt be able to see.
As for a check to see what geomitry is being viewed, that is a little more complicated, but not to hard to do. What your looking to do is frustum culling. There is a great tutorial on gametutorials.com.
http://www.gametutorials.com/Tutorials/opengl/OpenGL_Pg5.htm
If you know where each bar will be and you can easily group them you will find it faster to do a check for say, 16 boxes at a time than each individual box.
Good luck
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement