X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=src%2Fgacela_GL.c;h=541e4abea16e17d4e1ce7f1ec72e55a78abd46ad;hb=556fd6c80969ab9a474f2c66ae1aceec3866f16a;hp=7e232bb99e832f548dfe046d80d4ff602ebc2c71;hpb=141a622804c650ab7e2b61ecc3af87c4be6495c5;p=gacela.git diff --git a/src/gacela_GL.c b/src/gacela_GL.c index 7e232bb..541e4ab 100644 --- a/src/gacela_GL.c +++ b/src/gacela_GL.c @@ -76,6 +76,18 @@ get_glTexture_height (SCM glTexture_smob) return scm_from_int (glTexture->height); } +SCM +set_glTexture_size (SCM glTexture_smob, SCM width, SCM height) +{ + struct glTexture *glTexture; + + scm_assert_smob_type (glTexture_tag, glTexture_smob); + glTexture = (struct glTexture *) SCM_SMOB_DATA (glTexture_smob); + glTexture->width = scm_to_int (width); + glTexture->height = scm_to_int (height); + return SCM_UNSPECIFIED; +} + size_t free_glTexture (SCM glTexture_smob) { @@ -369,6 +381,7 @@ GL_register_functions (void* data) scm_set_smob_free (glTexture_tag, free_glTexture); scm_c_define_gsubr ("texture-w", 1, 0, 0, get_glTexture_width); scm_c_define_gsubr ("texture-h", 1, 0, 0, get_glTexture_height); + scm_c_define_gsubr ("set-texture-size!", 3, 0, 0, set_glTexture_size); // Data types scm_c_define ("GL_UNSIGNED_BYTE", scm_from_int (GL_UNSIGNED_BYTE)); @@ -404,6 +417,7 @@ GL_register_functions (void* data) // Blending scm_c_define ("GL_BLEND", scm_from_int (GL_BLEND)); scm_c_define ("GL_ONE", scm_from_int (GL_ONE)); + scm_c_define ("GL_ONE_MINUS_SRC_ALPHA", scm_from_int (GL_ONE_MINUS_SRC_ALPHA)); scm_c_define ("GL_SRC_ALPHA", scm_from_int (GL_SRC_ALPHA)); // Fog