summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDennis Kasprzyk <onestone@opencompositing.org>2008-04-01 17:05:03 +0200
committerDennis kasprzyk <onestone@opencompositing.org>2008-04-01 17:05:03 +0200
commitea8b22d44ec6a59ad3995dc469f4bd4d7624efdb (patch)
tree34c90dc49b0c6a31c063d5775f7b7b19c3dd58b3
parent22f571bb0735c974503c8d27558a8ae954638b5c (diff)
downloadmag-ea8b22d44ec6a59ad3995dc469f4bd4d7624efdb.tar.gz
mag-ea8b22d44ec6a59ad3995dc469f4bd4d7624efdb.tar.bz2
glMultiytexCoord2f is now in core.
-rw-r--r--mag.c42
1 files changed, 17 insertions, 25 deletions
diff --git a/mag.c b/mag.c
index 6bc6568..ffa59e5 100644
--- a/mag.c
+++ b/mag.c
@@ -40,9 +40,6 @@
#define MAG_SCREEN(s) \
MagScreen *ms = GET_MAG_SCREEN (s, GET_MAG_DISPLAY (s->display))
-
-typedef void (*GLMultiTexCoord2fProc) (GLenum, GLfloat, GLfloat);
-
static int displayPrivateIndex = 0;
typedef struct _MagDisplay
@@ -87,8 +84,6 @@ typedef struct _MagScreen
GLuint program;
- GLMultiTexCoord2fProc multiTexCoord2f;
-
PositionPollingHandle pollHandle;
PreparePaintScreenProc preparePaintScreen;
@@ -200,7 +195,7 @@ loadImages (CompScreen *s)
{
MAG_SCREEN (s);
- if (!ms->multiTexCoord2f)
+ if (!s->multiTexCoord2f)
return FALSE;
ms->overlay.loaded = readImageToTexture (s, &ms->overlay.tex,
@@ -732,25 +727,25 @@ magPaintImage (CompScreen *s)
glTexEnvi (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
glBegin (GL_QUADS);
- (*ms->multiTexCoord2f) (GL_TEXTURE0_ARB, tc[0], tc[2]);
- (*ms->multiTexCoord2f) (GL_TEXTURE1_ARB,
- COMP_TEX_COORD_X (&ms->mask.tex.matrix, 0),
- COMP_TEX_COORD_Y (&ms->mask.tex.matrix, 0));
+ (*s->multiTexCoord2f) (GL_TEXTURE0_ARB, tc[0], tc[2]);
+ (*s->multiTexCoord2f) (GL_TEXTURE1_ARB,
+ COMP_TEX_COORD_X (&ms->mask.tex.matrix, 0),
+ COMP_TEX_COORD_Y (&ms->mask.tex.matrix, 0));
glVertex2f (vc[0], vc[2]);
- (*ms->multiTexCoord2f) (GL_TEXTURE0_ARB, tc[0], tc[3]);
- (*ms->multiTexCoord2f) (GL_TEXTURE1_ARB,
- COMP_TEX_COORD_X (&ms->mask.tex.matrix, 0),
- COMP_TEX_COORD_Y (&ms->mask.tex.matrix, h));
+ (*s->multiTexCoord2f) (GL_TEXTURE0_ARB, tc[0], tc[3]);
+ (*s->multiTexCoord2f) (GL_TEXTURE1_ARB,
+ COMP_TEX_COORD_X (&ms->mask.tex.matrix, 0),
+ COMP_TEX_COORD_Y (&ms->mask.tex.matrix, h));
glVertex2f (vc[0], vc[3]);
- (*ms->multiTexCoord2f) (GL_TEXTURE0_ARB, tc[1], tc[3]);
- (*ms->multiTexCoord2f) (GL_TEXTURE1_ARB,
- COMP_TEX_COORD_X (&ms->mask.tex.matrix, w),
- COMP_TEX_COORD_Y (&ms->mask.tex.matrix, h));
+ (*s->multiTexCoord2f) (GL_TEXTURE0_ARB, tc[1], tc[3]);
+ (*s->multiTexCoord2f) (GL_TEXTURE1_ARB,
+ COMP_TEX_COORD_X (&ms->mask.tex.matrix, w),
+ COMP_TEX_COORD_Y (&ms->mask.tex.matrix, h));
glVertex2f (vc[1], vc[3]);
- (*ms->multiTexCoord2f) (GL_TEXTURE0_ARB, tc[1], tc[2]);
- (*ms->multiTexCoord2f) (GL_TEXTURE1_ARB,
- COMP_TEX_COORD_X (&ms->mask.tex.matrix, w),
- COMP_TEX_COORD_Y (&ms->mask.tex.matrix, 0));
+ (*s->multiTexCoord2f) (GL_TEXTURE0_ARB, tc[1], tc[2]);
+ (*s->multiTexCoord2f) (GL_TEXTURE1_ARB,
+ COMP_TEX_COORD_X (&ms->mask.tex.matrix, w),
+ COMP_TEX_COORD_Y (&ms->mask.tex.matrix, 0));
glVertex2f (vc[1], vc[2]);
glEnd ();
@@ -1142,9 +1137,6 @@ magInitScreen (CompPlugin *p,
magSetMaskNotify (s, magOptionsChanged);
magSetModeNotify (s, magOptionsChanged);
- ms->multiTexCoord2f = (GLMultiTexCoord2fProc)
- (*s->getProcAddress) ((GLubyte *)"glMultiTexCoord2f");
-
switch (magGetMode (s))
{
case ModeImageOverlay: