[gameprogrammer] Re: triangle strips or fans
- From: Roger D Vargas <luo_hei@xxxxxxxx>
- To: gameprogrammer@xxxxxxxxxxxxx
- Date: Tue, 07 Feb 2006 11:48:07 -0500
Do you think I can generate the map geometry from a list of heights and
use an one dimension array to store the vertices?
Olof Bjarnason escribió:
try using fences if you are in opengl.. that way you could have a
piece of ground like this:
-----
|\|/|
|/|\|
-----
(try viewing my ACSII art in notepad if you are on
not-constant-width-font mail program)
It is a 9 vertice geometric entity. 4 vertices are corners, 4 vertices
are on the midpoint of the edges. The last vertice is in the middle of
the figure. Each corner is connected to each middlepoint. The middle
vertice is connected to all other points.
That way, each of the 9 vertices can have an individual height from
you heightmap, and the total number of glVertice calls / indices if
you are using vertice arrays is 10 IIRC, to render not less than 8
triangles. That is 10/8 ~= 1.25 vertice calls per triangle. (3 vertice
calls per triangle with ordinary calls of course..) It's quite nice..
You have to be cautious on the order you are sending your vertices
though, read up on the fence order of opengl.
/Olof
On 2/7/06, Enrico Zschemisch <enrico.zschemisch@xxxxxx> wrote:
Hi,
Indices? What is that?
Do you mean indices in general?
http://en.wikipedia.org/wiki/Array
--
Telefonieren Sie schon oder sparen Sie noch?
NEU: GMX Phone_Flat http://www.gmx.net/de/go/telefonie
---------------------
To unsubscribe go to http://gameprogrammer.com/mailinglist.html
---------------------
To unsubscribe go to http://gameprogrammer.com/mailinglist.html
--
Roger D. Vargas
http://dsgp.blogspot.com | Linux, programación, juegos
______________________________________________
LLama Gratis a cualquier PC del Mundo.
Llamadas a fijos y móviles desde 1 céntimo por minuto.
http://es.voice.yahoo.com
---------------------
To unsubscribe go to http://gameprogrammer.com/mailinglist.html
- Follow-Ups:
- [gameprogrammer] Re: triangle strips or fans
- From: Olof Bjarnason
- References:
- [gameprogrammer] Re: triangle strips or fans
- From: Roger D Vargas
- [gameprogrammer] Re: triangle strips or fans
- From: Enrico Zschemisch
- [gameprogrammer] Re: triangle strips or fans
- From: Olof Bjarnason
Other related posts:
- » [gameprogrammer] triangle strips or fans
- » [gameprogrammer] Re: triangle strips or fans
- » [gameprogrammer] Re: triangle strips or fans
- » [gameprogrammer] Re: triangle strips or fans
- » [gameprogrammer] Re: triangle strips or fans
- » [gameprogrammer] Re: triangle strips or fans
- » [gameprogrammer] Re: triangle strips or fans
try using fences if you are in opengl.. that way you could have a piece of ground like this:
----- |\|/| |/|\| -----
(try viewing my ACSII art in notepad if you are on not-constant-width-font mail program)
It is a 9 vertice geometric entity. 4 vertices are corners, 4 vertices are on the midpoint of the edges. The last vertice is in the middle of the figure. Each corner is connected to each middlepoint. The middle vertice is connected to all other points.
That way, each of the 9 vertices can have an individual height from you heightmap, and the total number of glVertice calls / indices if you are using vertice arrays is 10 IIRC, to render not less than 8 triangles. That is 10/8 ~= 1.25 vertice calls per triangle. (3 vertice calls per triangle with ordinary calls of course..) It's quite nice..
You have to be cautious on the order you are sending your vertices though, read up on the fence order of opengl.
/Olof
On 2/7/06, Enrico Zschemisch <enrico.zschemisch@xxxxxx> wrote:
Hi,
Indices? What is that?Do you mean indices in general?
http://en.wikipedia.org/wiki/Array
-- Telefonieren Sie schon oder sparen Sie noch? NEU: GMX Phone_Flat http://www.gmx.net/de/go/telefonie
--------------------- To unsubscribe go to http://gameprogrammer.com/mailinglist.html
--------------------- To unsubscribe go to http://gameprogrammer.com/mailinglist.html
-- Roger D. Vargas http://dsgp.blogspot.com | Linux, programación, juegos
--------------------- To unsubscribe go to http://gameprogrammer.com/mailinglist.html
- [gameprogrammer] Re: triangle strips or fans
- From: Olof Bjarnason
- [gameprogrammer] Re: triangle strips or fans
- From: Roger D Vargas
- [gameprogrammer] Re: triangle strips or fans
- From: Enrico Zschemisch
- [gameprogrammer] Re: triangle strips or fans
- From: Olof Bjarnason