dev.gamez.lv Forum Index dev.gamez.lv
Latvian Game Developers Community
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups 

Nolasīt un parādīt obj failu bez ģeometrijas kļūdām
Goto page Previous  1, 2, 3, 4
 
dev.gamez.lv Forum Index -> OpenGL
View previous topic :: View next topic  
Author Message
Vecis



Joined: 01 Jan 2007
Posts: 144

PostPosted: Wed Jan 06, 2010 5:10 pm    Post subject:

vbuf = []
ibuf = []
kas būtu vbuf un ibuf? Nu ienāca jau prātā ka vertices buferis un index buferis, tikai kam indeksi, vertices vai texcoords?

Pārējo itkā sapratu

snake5: Nu nepatīk man ņemt svešu kodu un nepatīk ka nesaprotu to.
Back to top
View user's profile Send e-mail
elvman
Indago Uzvarētājs
Indago Uzvarētājs


Joined: 09 Apr 2003
Posts: 1278
Location: Kuldiga

PostPosted: Wed Jan 06, 2010 7:23 pm    Post subject:

vbuf droshi vien ir Vertex Buffer. Tas ir masiivs ar vertexiem.
ibuf - Index Buffer. Tas satur seciibu, kaadaa jaaziimee objekts.
Piemeram, ja tev ir 3 vertexi - (0,0,0), (0, 10, 0), (10, 0, 0) un Index Bufferis - (0, 1, 2), tad tiks ziimeets viens 3ssturis, ar attiecigi pirmo otro un tresho (0, 1, 2) vertexiem no vertexu masiva. Es nez, vai es skaidri izteicos, bet cerams saprati.
_________________
long time; /* know C */
Back to top
View user's profile Visit poster's website
snake5
Indago dalībnieks
Indago dalībnieks


Joined: 27 Jun 2007
Posts: 2590

PostPosted: Wed Jan 06, 2010 7:36 pm    Post subject:

Quote:
tikai kam indeksi, vertices vai texcoords

Kā - kam? Šeit es nesaprotu, ko tu nesaproti. Kam (pieder) - 3d modelim. Kam (lietoti) - renderēšanā. Ir vēl kāds "kam"?
Quote:
Nu nepatīk man ņemt svešu kodu un nepatīk ka nesaprotu to.

Kādas problēmas ir to saprast? Ja godīgi, tad man nav skaidrs, ko tu nesaproti. Vienā post'ā lasām gudri komentētus OBJ failus, citā nezināšanu par to, kas ir "texcoords".
_________________
"There are two choices here: "looks good" and "realism"." -- Paul Nettle
Back to top
View user's profile Visit poster's website
bubu
Indago Uzvarētājs
Indago Uzvarētājs


Joined: 23 Mar 2004
Posts: 3223
Location: Riga

PostPosted: Wed Jan 06, 2010 9:48 pm    Post subject:

Vecis wrote:
Nu ienāca jau prātā ka vertices buferis un index buferis, tikai kam indeksi, vertices vai texcoords?

Palasi internetā vai citos materiālos informāciju par to, kas ir vertex un index buferis.
Piemēram šeit: http://alt.pluralsight.com/wiki/default.aspx/Craig.DirectX.IndexBufferTutorial
http://www.glprogramming.com/red/chapter02.html#name6 (Vertex Arrays sadaļa)
utt..
Back to top
View user's profile Send e-mail
Vecis



Joined: 01 Jan 2007
Posts: 144

PostPosted: Thu Jan 07, 2010 6:06 pm    Post subject:

ai nu nedaudz pārpratāt mani Smile
Bet nu dabūju visu strādāt pats ar savu kodu
Back to top
View user's profile Send e-mail
Display posts from previous:   
dev.gamez.lv Forum Index -> OpenGL All times are GMT + 2 Hours
Goto page Previous  1, 2, 3, 4
Page 4 of 4

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group