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

3 Texturas - Mutitexturing

 
dev.gamez.lv Forum Index -> OpenGL
View previous topic :: View next topic  
Author Message
elvman
Indago Uzvarētājs
Indago Uzvarētājs


Joined: 09 Apr 2003
Posts: 1278
Location: Kuldiga

PostPosted: Mon Aug 16, 2004 11:35 am    Post subject: 3 Texturas - Mutitexturing

Beidzot ari saja foruma ir sadalja OpenGL!!!
Nu tad taa.
Man ir taads jautaajums - es meegjinaaju uz terrain uzlikt 3 textuuras (Ground textuura, detail textuura, un lightmap), bet man neizdevaas uzlikt tresho textuuru. Kaads vareetu bish kako pastaastiit kaa jaaliek triis textuuras.

P.S. mana Video Karte atbalsta 8 multi textuuras.
_________________
long time; /* know C */
Back to top
View user's profile Visit poster's website
GiGa
Indago Uzvarētājs
Indago Uzvarētājs


Joined: 25 Sep 2003
Posts: 887

PostPosted: Mon Aug 16, 2004 11:48 am    Post subject:

Nu kaa tad tu to dari?

Code:


(pienjemot ka pashlaik aktiivs GL_TEXTURE0_ARB un tajaa ir iesleegts GL_TEXTURE_2D)

glBindTexture(GL_TEXTURE_2D,Ground);
glActiveTextureARB(GL_TEXTURE1_ARB);
glEnable(GL_TEXTURE_2D);
glBindTexture(GL_TEXTURE_2D,Detail);
glActiveTextureARB(GL_TEXTURE2_ARB);
glEnable(GL_TEXTURE_2D);
glBindTexture(GL_TEXTURE_2D,Light);


un visam buutu jaaiet. Varbuut aizmirsi treshajai textuurai glEnable(GL_TEXTURE_2D); ?

Edit: Hmm, kas taa par karti, kas atbalsta 8 textuuras, un kaa vinja to dara? Parasti sastopamais variants ir 4 textuuras fixed pipeline un 16 shaderiem. (Laigan ja sheideriem izmanto virs 4 par labu fps var aizmirst...)
_________________
Back to top
View user's profile Send e-mail
GiGa
Indago Uzvarētājs
Indago Uzvarētājs


Joined: 25 Sep 2003
Posts: 887

PostPosted: Mon Aug 16, 2004 5:14 pm    Post subject:

Un veel, ja pareizi saprotu kas ir domaats ar ground un lightmap textuuraam, nebuutu labaak apvienot taas vienaa un mazuliet uzlabot fps?
_________________
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
Page 1 of 1

 
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