
This file was automatically generated from comments in the C/C++ header file diguy_graphics_ogl.h. Do not edit this file directly; the changes will be lost. Please mail suggestions or corrections to diguy@bdi.com
Includes: diguy_api.h | graphics_init_ogl.h | declspec_diguy.h
Link against: libdiguy_graphics_ogl
Functions
|
function diguy_ogl_initialize |
Prototype:
Description:diguy_ogl_initialize(bdiGraphicsInitOgl* init);
This function initializes the DI-Guy Runtime API for the OpenGL environment.This function should only be called once per program execution.
Do not call this function again, even after calling
diguy_deinitialize().
Use diguy_ogl_get_defaults() to fill out the init structure before changing specific entries.Arguments:
Returns:
init pointer to type bdiGraphicsInitOgl; passing NULL will cause defaults to be used for all values
0 on success, non-zero error code on failure
Refer to diguy_constants.h for error code values.
function diguy_ogl_get_defaults |
Prototype:
Description:diguy_ogl_get_defaults(bdiGraphicsInitOgl* init);
Fills out the init structure with default values. Selected entries can then be changed before calling diguy_ogl_initialize().Arguments:
Returns:
init pointer to type bdiGraphicsInitOgl
0 on success, -1 on failure
Experimental Functions
|
The following functions are experimental and may change or disappear with no warning.
function diguy_ogl_generate_character_texture_list |
Prototype:
Description:int diguy_ogl_generate_character_texture_list(diguyScenario* scenario, int character_index);
This function queries the character for the OpenGL texture objects it is using and stores them in an internal list. This internal list can then be accessed via the following functions:
diguy_ogl_get_character_texture_list_num_textures(); diguy_ogl_get_character_texture_list_texture_object_at_index(); diguy_ogl_get_character_texture_list_texture_filename_at_index();The function diguy_ogl_release_character_texture_list() should be called once query calls are complete to avoid a resource leak.
Note that there is currently only one internal texture list; there are not separate lists per character. Calling this function again, even with a different scenario pointer and/or character index, will clobber the previous texture list.Arguments:
Returns:
scenario pointer to character's scenario character_index index of character to be queried
0 on success, -1 on failureC++ Example:
diguy_ogl_generate_character_texture_list(scenario, character_index); int texture_count = diguy_ogl_get_character_texture_list_num_textures(scenario, character_index); if (texture_count > 0) { int texture_index; for (texture_index = 0; texture_index < texture_count; texture_index++) { GLuint texture_object = diguy_ogl_get_character_texture_list_texture_object_at_index(scenario, character_index, texture_index); const char* texture_filename = diguy_ogl_get_character_texture_list_texture_filename_at_index(scenario, character_index, texture_index); bdi_log_printf(BDI_LOG_WARN, "\ttexture object = %ld, filename = %s\n", texture_object, texture_filename); } GLuint texture_object = diguy_ogl_get_character_texture_list_texture_object_at_index(scenario, character_index, 0); // the first texture in the list // // (Code to override/replace the texture) // diguy_ogl_set_character_texture_objects_modified(scenario, character_index); diguy_ogl_release_character_texture_list(scenario, character_index); }
function diguy_ogl_release_character_texture_list |
Prototype:
Description:int diguy_ogl_release_character_texture_list(diguyScenario* scenario, int character_index);
This function releases a texture list generated by diguy_ogl_generate_character_texture_list().Arguments:
Returns:
scenario pointer to character's scenario character_index index of character to be queried
0 on success, -1 on failure
function diguy_ogl_get_character_texture_list_num_textures |
Prototype:
Description:int diguy_ogl_get_character_texture_list_num_textures(diguyScenario* scenario, int character_index);
This function returns the number of textures used by the specified character.
The function diguy_ogl_generate_character_texture_list() must be called before this function. The scenario and character_index arguments passed to this function must match those passed to the generate function.Arguments:
Returns:
scenario pointer to character's scenario character_index index of character to be queried
number of textures in texture list
function diguy_ogl_get_character_texture_list_texture_object_at_index |
Prototype:
Description:GLuint diguy_ogl_get_character_texture_list_texture_object_at_index(diguyScenario* scenario, int character_index, int texture_list_index);
This function returns the OpenGL texture object at the specified index.
The function diguy_ogl_generate_character_texture_list() must be called before this function. The scenario and character_index arguments passed to this function must match those passed to the generate function.Arguments:
Returns:
scenario pointer to character's scenario character_index index of character to be queried texture_list_index index of texture in texture list
OpenGL texture object
function diguy_ogl_get_character_texture_list_texture_filename_at_index |
Prototype:
Description:const char* diguy_ogl_get_character_texture_list_texture_filename_at_index(diguyScenario* scenario, int character_index, int texture_list_index);
This function returns the filename of the texture at the specified index.
The function diguy_ogl_generate_character_texture_list() must be called before this function. The scenario and character_index arguments passed to this function must match those passed to the generate function.Arguments:
Returns:
scenario pointer to character's scenario character_index index of character to be queried texture_list_index index of texture in texture list
filenam of the texture
function diguy_ogl_set_character_texture_objects_modified |
Prototype:
Description:int diguy_ogl_set_character_texture_objects_modified(diguyScenario* scenario, int character_index);
This function notifies the character that its texture objects have been modified and that it should take any steps necessary to update its internal state to ensure proper display.Arguments:
Returns:
scenario pointer to character's scenario character_index index of character to be queried
0 on success, -1 on failure
Boston Dynamics
ALL RIGHTS RESERVED.
These coded instructions, statements, and computer programs contain unpublished proprietary information of Boston Dynamics and are protected by Copyright Laws of the United States. They may not be used, duplicated, or disclosed in any form, in whole or in part, without the prior written consent from Boston Dynamics.
RESTRICTED RIGHTS LEGEND
Use, duplication, or disclosure by the government is subject to restrictions as set forth in FAR 52.227.19(c)(2) or subparagraph (c)(1)(ii) of the Rights in Technical Data and Computer Sofware clause at DFARS 252.227-7013 and/or in similar or successor clauses in the FAR, or the DOD or NASA FAR Supplement, or to subparagraphs (c)(1) and (c)(2) of the Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19, as applicable. Unpublished-rights reserved under the Copyright Laws of the United States.
Contractor/Manufacturer is:
Boston Dynamics/515 Massachusetts Avenue/Cambridge MA 02139.