Felhasználói eszközök

Eszközök a webhelyen


oktatas:programozas:opengl:opengl_lib3d

Különbségek

A kiválasztott változat és az aktuális verzió közötti különbségek a következők.

Összehasonlító nézet linkje

Előző változat mindkét oldalonElőző változat
Következő változat
Előző változat
oktatas:programozas:opengl:opengl_lib3d [2020/08/18 07:04] – [Linux] adminoktatas:programozas:opengl:opengl_lib3d [2020/08/18 07:06] (aktuális) – [OpenGl Lib3d] admin
Sor 4: Sor 4:
  
   * **Szerző:** Sallai András   * **Szerző:** Sallai András
-  * Copyright (c) Sallai András, 2011+  * Copyright (c) Sallai András, 2011, 2020
   * Licenc: GNU Free Documentation License 1.3   * Licenc: GNU Free Documentation License 1.3
   * Web: http://szit.hu   * Web: http://szit.hu
Sor 55: Sor 55:
 Használatra találunk példát a lib3ds könyvtár weboldalán: http://www.lib3ds.org Használatra találunk példát a lib3ds könyvtár weboldalán: http://www.lib3ds.org
  
-  Lib3dsFile* myfile = lib3ds_file_load("MySuperModel.3ds"); +<code cpp> 
-  Lib3dsMesh* miObjeto = lib3ds_file_mesh_by_name(myfile, "airplane");+Lib3dsFile* myfile = lib3ds_file_load("MySuperModel.3ds"); 
 +Lib3dsMesh* miObjeto = lib3ds_file_mesh_by_name(myfile, "airplane"); 
 + 
 +//Mesh objects have this members: 
 + 
 +uint points; 
 +uint faces; 
 +uint texels//points = texels; 
 +Lib3dsPoint* pointL;//vertex 
 +Lib3dsFace* faceL;//indices
      
-  //Mesh objects have this members: +/* 
-   +Copy this fields to your own arrays(I don't know why 
-  uint points; +it doesn't work when i send them directly to VBOs); 
-  uint faces; +If you are using VBOs: 
-  uint texels//points = texels; +*/ 
-  Lib3dsPoint* pointL;//vertex + 
-  Lib3dsFace* faceL;//indices +//For the veretx, for the texels just change the pointer 
-   +glBufferData(GL_ARRAY_BUFFER, 3*sizeof(float)*points, myvertexarray, GL_STATIC_DRAW); 
-  /* +glBufferData(GL_ELEMENT_ARRAY_BUFFER,3*sizeof(uint)*faces, myfacesarray,GL_STATIC_DRAW); 
-  Copy this fields to your own arrays(I don't know why it doesn't work when i send them directly to VBOs); + 
-  If you are using VBOs: + 
-  */ +//Then just call glDrawElements with indices to 0. 
-  glBufferData(GL_ARRAY_BUFFER, 3*sizeof(float)*points, myvertexarray, GL_STATIC_DRAW);//For the veretx, for the texels just change the pointer +</code>
-  glBufferData(GL_ELEMENT_ARRAY_BUFFER,3*sizeof(uint)*faces, myfacesarray,GL_STATIC_DRAW); +
-   +
-   +
-  //Then just call glDrawElements with indices to 0.+
  
  
oktatas/programozas/opengl/opengl_lib3d.1597727051.txt.gz · Utolsó módosítás: 2020/08/18 07:04 szerkesztette: admin