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.
Előző változat mindkét oldalonElőző változatKövetkező változat | Előző változat | ||
oktatas:programozas:opengl:opengl_lib3d [2020/08/18 07:04] – [Linux] admin | oktatas:programozas:opengl:opengl_lib3d [2020/08/18 07:06] (aktuális) – [OpenGl Lib3d] admin | ||
---|---|---|---|
Sor 4: | Sor 4: | ||
* **Szerző: | * **Szerző: | ||
- | * 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:// | * Web: http:// | ||
Sor 55: | Sor 55: | ||
Használatra találunk példát a lib3ds könyvtár weboldalán: | Használatra találunk példát a lib3ds könyvtár weboldalán: | ||
- | | + | <code cpp> |
- | Lib3dsMesh* miObjeto = lib3ds_file_mesh_by_name(myfile, | + | Lib3dsFile* myfile = lib3ds_file_load(" |
+ | Lib3dsMesh* miObjeto = lib3ds_file_mesh_by_name(myfile, | ||
+ | |||
+ | //Mesh objects have this members: | ||
+ | |||
+ | uint points; | ||
+ | uint faces; | ||
+ | uint texels// | ||
+ | Lib3dsPoint* pointL;// | ||
+ | Lib3dsFace* faceL;// | ||
| | ||
- | //Mesh objects have this members: | + | /* |
- | + | Copy this fields to your own arrays(I don't know why | |
- | uint points; | + | it doesn' |
- | uint faces; | + | If you are using VBOs: |
- | uint texels// | + | */ |
- | Lib3dsPoint* pointL;// | + | |
- | Lib3dsFace* faceL;// | + | //For the veretx, for the texels just change the pointer |
- | + | glBufferData(GL_ARRAY_BUFFER, | |
- | | + | glBufferData(GL_ELEMENT_ARRAY_BUFFER, |
- | Copy this fields to your own arrays(I don't know why it doesn' | + | |
- | If you are using VBOs: | + | |
- | */ | + | //Then just call glDrawElements with indices to 0. |
- | glBufferData(GL_ARRAY_BUFFER, | + | </ |
- | glBufferData(GL_ELEMENT_ARRAY_BUFFER, | + | |
- | + | ||
- | + | ||
- | //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