#include "main/drawtex.h"
#include "main/state.h"
#include "main/imports.h"
-
-#include "main/dispatch.h"
-
-
-#if FEATURE_OES_draw_texture
+#include "main/mtypes.h"
static void
-draw_texture(GLcontext *ctx, GLfloat x, GLfloat y, GLfloat z,
+draw_texture(struct gl_context *ctx, GLfloat x, GLfloat y, GLfloat z,
GLfloat width, GLfloat height)
{
if (!ctx->Extensions.OES_draw_texture) {
return;
}
+ _mesa_set_vp_override(ctx, GL_TRUE);
+
if (ctx->NewState)
_mesa_update_state(ctx);
- ASSERT(ctx->Driver.DrawTex);
+ assert(ctx->Driver.DrawTex);
ctx->Driver.DrawTex(ctx, x, y, z, width, height);
+
+ _mesa_set_vp_override(ctx, GL_FALSE);
}
void GLAPIENTRY
-_mesa_DrawTexf(GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height)
+_mesa_DrawTexfOES(GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height)
{
GET_CURRENT_CONTEXT(ctx);
draw_texture(ctx, x, y, z, width, height);
void GLAPIENTRY
-_mesa_DrawTexfv(const GLfloat *coords)
+_mesa_DrawTexfvOES(const GLfloat *coords)
{
GET_CURRENT_CONTEXT(ctx);
draw_texture(ctx, coords[0], coords[1], coords[2], coords[3], coords[4]);
void GLAPIENTRY
-_mesa_DrawTexi(GLint x, GLint y, GLint z, GLint width, GLint height)
+_mesa_DrawTexiOES(GLint x, GLint y, GLint z, GLint width, GLint height)
{
GET_CURRENT_CONTEXT(ctx);
draw_texture(ctx, (GLfloat) x, (GLfloat) y, (GLfloat) z,
void GLAPIENTRY
-_mesa_DrawTexiv(const GLint *coords)
+_mesa_DrawTexivOES(const GLint *coords)
{
GET_CURRENT_CONTEXT(ctx);
draw_texture(ctx, (GLfloat) coords[0], (GLfloat) coords[1],
void GLAPIENTRY
-_mesa_DrawTexs(GLshort x, GLshort y, GLshort z, GLshort width, GLshort height)
+_mesa_DrawTexsOES(GLshort x, GLshort y, GLshort z, GLshort width, GLshort height)
{
GET_CURRENT_CONTEXT(ctx);
draw_texture(ctx, (GLfloat) x, (GLfloat) y, (GLfloat) z,
void GLAPIENTRY
-_mesa_DrawTexsv(const GLshort *coords)
+_mesa_DrawTexsvOES(const GLshort *coords)
{
GET_CURRENT_CONTEXT(ctx);
draw_texture(ctx, (GLfloat) coords[0], (GLfloat) coords[1],
(GLfloat) coords[3] / 65536.0f,
(GLfloat) coords[4] / 65536.0f);
}
-
-
-void
-_mesa_init_drawtex_dispatch(struct _glapi_table *disp)
-{
- SET_DrawTexfOES(disp, _mesa_DrawTexf);
- SET_DrawTexfvOES(disp, _mesa_DrawTexfv);
- SET_DrawTexiOES(disp, _mesa_DrawTexi);
- SET_DrawTexivOES(disp, _mesa_DrawTexiv);
- SET_DrawTexsOES(disp, _mesa_DrawTexs);
- SET_DrawTexsvOES(disp, _mesa_DrawTexsv);
- SET_DrawTexxOES(disp, _mesa_DrawTexx);
- SET_DrawTexxvOES(disp, _mesa_DrawTexxv);
-}
-
-
-#endif /* FEATURE_OES_draw_texture */