G3D File – Giavapps 3D

 

G3D File

 

g3d_object_load(FileName, Looping) Loads a new Giavapps 3D (*.G3D) file and returns its G3DObjectIndex or -1 if fails. Remember to release the resource with g3d_object_delete() function when you don’t need it anymore.

FileName: a valid file name of a Giavapps 3D (*.G3D) file.
Looping: interpolates the last frame with the first frame of the Giavapps 3D (*.G3D) file (true) or not (false).

 

g3d_object_delete(G3DObjectIndex) Frees the memory occupied by the resource.

G3DObjectIndex: A valid G3DObjectIndex or g3d_object_index local variable.

 

g3d_buffer_load(FileName, FrameIndex) Loads a specific frame from a Giavapps 3D (*.G3D) file as a GameMaker: Studio Buffer. This function returns -1 if fails or the index of the buffer otherwise. Remember to release memory occupied by the resource with buffer_delete() when you don’t need it anymore.

FileName: a valid file name of a Giavapps 3D (*.G3D) file.
FrameIndex: frame index of the animation.

 

g3d_buffer_list_merge(ListIndex) Merges all Buffers stored in the specified GameMaker: Studio DS List and returns the index of the new created buffer. Remember to release memory occupied by the resource with buffer_delete() when you don’t need it anymore.

ListIndex: index of the DS List.

 

g3d_buffer_list_delete(ListIndex) Deletes all Buffers stored in the specified GameMaker: Studio DS List and the given DS List itself. This function releases memory occupied by the resources.

ListIndex: index of the DS List.

 

g3d_model_load(ModelIndex, FrameIndex, FileName) Loads a specific frame from a Giavapps 3D (*.G3D) file as a GameMaker: Studio D3D Model. This function returns -1 if fails or true otherwise. Remember to release memory occupied by the resource with d3d_model_destroy() when you don’t need it anymore. PLEASE NOTE: this function is available for GameMaker Studio 1.4 only since it uses old deprecated d3d_* functions.

ModelIndex: model index.
FrameIndex: frame index of the animation.
FileName: a valid file name of a Giavapps 3D (*.G3D) file.

 

Code Examples

 

Loading Giavapps 3D (*.G3D) Files

 

animation_standing = g3d_object_load("standing.g3d", 1);//loads the Giavapps 3D (*.G3D) file
if(!animation_standing)//checks if an error occurrs
{
show_message("An error occurred while loading the animation!");//shows an error message
exit;//exits from this code
}

 

Freeing Memory Occupied by Giavapps 3D (*.G3D) Files

 

g3d_object_delete(animation_standing);//frees the memory occupied by the resource

 

I am Luigi Piscopo, also known as DJ GiDeejay / Producer / Remixer in the music world. I am a Producer with a lot of experience in photo editing, video editing, audio editing, graphic design, web design, programming and promotion.

Leave a Reply

Il tuo indirizzo email non sarà pubblicato. I campi obbligatori sono contrassegnati *

*