View previous topic :: View next topic |
Author |
Message |
bubu Indago Uzvarētājs
Joined: 23 Mar 2004 Posts: 3223 Location: Riga
|
Posted: Sat Feb 18, 2006 1:31 pm Post subject: |
|
Tas nozīmē, ka kodā ir kļūda, kura notiek izpildes (runtime) laikā. Neviens te nelasīs piecus kilometrus garu penteri.
Nokompilē programmu ar debug informāciju un tad palaid debugerī. Kad notiks kļūda, tad debugerī paskaties, kurā rindā izpilde apstājusies. Un tad arī domā, kas par vainu tur varētu būt. |
|
Back to top |
|
|
coderpp
Joined: 20 Aug 2005 Posts: 167 Location: Rīga, Koknese, Gajiena
|
Posted: Thu Mar 09, 2006 4:19 pm Post subject: |
|
Vai tam ir kautkada noziime kaadu failu formatu es izmantoju?? Piemeram .3ds vai .MD2. Kuru butu labaak izmantot un kapec? |
|
Back to top |
|
|
eXeM
Joined: 22 Mar 2005 Posts: 155 Location: Ape
|
Posted: Thu Mar 09, 2006 4:32 pm Post subject: |
|
Pa manam noziime vairaak uzspeeleejaas uz preformanci, es gan nezinu bet nu cik es esu dzirdejis tad kaa nu kursh engine ir optimizeets uz kaukaadu failu formaatu. |
|
Back to top |
|
|
coderpp
Joined: 20 Aug 2005 Posts: 167 Location: Rīga, Koknese, Gajiena
|
Posted: Sun Apr 02, 2006 9:00 am Post subject: |
|
Vai kaads nezin labu tutoriali, kuraa stradaa ar 3ds failiem. Es mekleeju bet neko ipashi labu netradu |
|
Back to top |
|
|
fest
Joined: 07 Apr 2003 Posts: 187 Location: Madona
|
Posted: Sun Apr 02, 2006 9:55 pm Post subject: |
|
Nedomāju gan, ka tam būtu kāda nozīme, galu galā visi formāti tiek pārveidoti tādā, kuru var uzzīmēt ar OpenGL/DX, piemēram, vertex list'os.
Tiesa gan, varu kļūdīties. _________________ Signature for rent. Good as new.
4 lines max. 80 letters.
Ls 0,02/post
|
|
Back to top |
|
|
coderpp
Joined: 20 Aug 2005 Posts: 167 Location: Rīga, Koknese, Gajiena
|
Posted: Sun Apr 02, 2006 10:04 pm Post subject: |
|
Man vajag tutoriali, kuraa paraada kaa ielaadeet 3ds failus un darboties ar tiem. |
|
Back to top |
|
|
bubu Indago Uzvarētājs
Joined: 23 Mar 2004 Posts: 3223 Location: Riga
|
Posted: Sun Apr 02, 2006 10:16 pm Post subject: |
|
Ja der C valodā, tad pasklaties lib3ds. Tai nāk examplis līdzi. |
|
Back to top |
|
|
coderpp
Joined: 20 Aug 2005 Posts: 167 Location: Rīga, Koknese, Gajiena
|
Posted: Tue Apr 18, 2006 6:55 am Post subject: |
|
Shjajaa webaa http://www.levp.de/3d/index.html ari ir tutorialis prieksh 3ds failiem. Bet tur nav nekaa par tekstuuraam. Kaa lai es uzlieku textuuras objektiem, tajaa tutoriaalii?? |
|
Back to top |
|
|
bubu Indago Uzvarētājs
Joined: 23 Mar 2004 Posts: 3223 Location: Riga
|
Posted: Tue Apr 18, 2006 8:18 am Post subject: |
|
Kā tas jāsaprot, tur nav tekstūru?
Ja tu domā tajā "Loading 3DS files" atrodamo sourci (l3ds.h/cpp failus), tad tur ir gan tekstūras. Materiāla objektam ir GetTextureMap1() un GetTextureMap2() fjas, kas atgriež informāciju par materiālam izmantoto tekstūru. Atliek tik ielādēt to. |
|
Back to top |
|
|
coderpp
Joined: 20 Aug 2005 Posts: 167 Location: Rīga, Koknese, Gajiena
|
Posted: Tue Apr 18, 2006 9:36 am Post subject: |
|
Kaaa pielietot GetTextureMap1()??????? |
|
Back to top |
|
|
bubu Indago Uzvarētājs
Joined: 23 Mar 2004 Posts: 3223 Location: Riga
|
Posted: Tue Apr 18, 2006 12:34 pm Post subject: |
|
Apskaties struktūru, kuru viņa atgriež (.h failā vai dokumentācijā). |
|
Back to top |
|
|
coderpp
Joined: 20 Aug 2005 Posts: 167 Location: Rīga, Koknese, Gajiena
|
Posted: Thu Apr 20, 2006 6:59 am Post subject: |
|
Bet es taapat nesapratu kaa to pielietot. Vari paraadiit?? |
|
Back to top |
|
|
bubu Indago Uzvarētājs
Joined: 23 Mar 2004 Posts: 3223 Location: Riga
|
Posted: Thu Apr 20, 2006 8:24 am Post subject: |
|
Tur taču viss izskaidrots:
Quote: | struct LMap
{
float strength;
char mapName[255];
float uScale;
float vScale;
float uOffset;
float vOffset;
};
This is a structure that represents a "map". Maps are a part of a material. A material has a diffuse map, a specular map etc.
Here's a description of members:
* strength - the opacity of the map, it is 1 for opaque maps and 0 for completely translucent maps.
* mapName - this is a name of texture file that should be used with the map.
* uScale, vScale - the scaling factors of the texture coordinates.
* uOffset, vOffset - the translation of the texture coordinates.
|
mapName - faila vārds, no kura jāielasa tekstūra.
uScale, vScale - reizinātāji tekstūras u un v koordinātēm
uOffset, vOffset - nobīdes u un v koordinātēm
Neesmu nekad šīs bibliotēkas kodu lietojis un arī netaisos tuvākajā laikā, bet manā izpratnē vajag taču ielasīt to mapName OpenGL tekstūrā un lietot zīmējot to (attiecīgi pareizinot ar tiem u/vScale un pieskaitot u/vOffset pie tekstūras koordinātēm). |
|
Back to top |
|
|
coderpp
Joined: 20 Aug 2005 Posts: 167 Location: Rīga, Koknese, Gajiena
|
Posted: Thu Apr 27, 2006 6:52 am Post subject: |
|
Isteniibaa tekstuuras tur bij viegli uzlikt! Paraugaaa sho rindu: glEnableClientState(GL_COLOR_ARRAY);
jaaizstaaj ar glEnableClientState(GL_TEXTURE_COORD_ARRAY);
Taalaak glBlindTexture(GL_TEXTURE_2D, tekstuura);
Un tad sho rindu glColorPointer(3, GL_FLOAT,0, &mesh.GetBinormal(0));
jaaizstaaj ar glTexCoordPointer(2, GL_FLOAT,0, &mesh.GetUV(0)); |
|
Back to top |
|
|
|