summaryrefslogtreecommitdiff
path: root/include/SDL_render.h
diff options
context:
space:
mode:
authorGabriel Jacobo <gabomdq@gmail.com>2012-09-03 11:16:12 -0300
committerGabriel Jacobo <gabomdq@gmail.com>2012-09-03 11:16:12 -0300
commit88e14e0c396c708281c65e9d3d1520136fb2c58f (patch)
tree50f4c7102324452eae93883a65db5565fd27a935 /include/SDL_render.h
parentcf60e5d34bc8ab5d63e20d1a25d8c3ea721f9359 (diff)
downloadsdl-88e14e0c396c708281c65e9d3d1520136fb2c58f.tar.gz
Implements SDL_GL_BindTexture and SDL_GL_UnbindTexture (#1576)
Diffstat (limited to 'include/SDL_render.h')
-rw-r--r--include/SDL_render.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/include/SDL_render.h b/include/SDL_render.h
index 1832281ae..e28119a65 100644
--- a/include/SDL_render.h
+++ b/include/SDL_render.h
@@ -672,6 +672,28 @@ extern DECLSPEC void SDLCALL SDL_DestroyTexture(SDL_Texture * texture);
extern DECLSPEC void SDLCALL SDL_DestroyRenderer(SDL_Renderer * renderer);
+/**
+ * \brief Bind the texture to the current OpenGL/ES/ES2 context for use with
+ * OpenGL instructions.
+ *
+ * \param texture The SDL texture to bind
+ * \param texw A pointer to a float that will be filled with the texture width
+ * \param texh A pointer to a float that will be filled with the texture height
+ *
+ * \return 0 on success, or -1 if the operation is not supported
+ */
+extern DECLSPEC int SDLCALL SDL_GL_BindTexture(SDL_Texture *texture, float *texw, float *texh);
+
+/**
+ * \brief Unbind a texture from the current OpenGL/ES/ES2 context.
+ *
+ * \param texture The SDL texture to unbind
+ *
+ * \return 0 on success, or -1 if the operation is not supported
+ */
+extern DECLSPEC int SDLCALL SDL_GL_UnbindTexture(SDL_Texture *texture);
+
+
/* Ends C function definitions when using C++ */
#ifdef __cplusplus
/* *INDENT-OFF* */