summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Bosveld <joel@JOEL-UBUNTU.(none)>2007-11-23 20:21:51 +0900
committerJoel Bosveld <joel@JOEL-UBUNTU.(none)>2007-11-23 20:21:51 +0900
commit072f8d8c59f467b24fccead2bc45f338467da8aa (patch)
tree8a60aaf041099e2be57322a194ffeb2b7a2d11e5
parentc013495965ce127a32c712e14dfc71f050d045da (diff)
downloadcubedbus-072f8d8c59f467b24fccead2bc45f338467da8aa.tar.gz
cubedbus-072f8d8c59f467b24fccead2bc45f338467da8aa.tar.bz2
Fixed bug where points on texture being drawn in wrong order. Properly
freed some memory after use.
-rw-r--r--cubedbus.c4
-rw-r--r--cubedbusTexture.c.in8
2 files changed, 8 insertions, 4 deletions
diff --git a/cubedbus.c b/cubedbus.c
index c7fd7bf..15c2c7c 100644
--- a/cubedbus.c
+++ b/cubedbus.c
@@ -129,6 +129,10 @@ cubedbusAddObject (CompDisplay *d,
strcpy(name,cubedbusName->string[i]);
+ for(i=0,i<cubedbusName->n;i++)
+ {
+ free(cubedbusName->string[i]);
+ }
free(cubedbusName->string);
free(cubedbusName);
diff --git a/cubedbusTexture.c.in b/cubedbusTexture.c.in
index b0a5bb8..4e02daa 100644
--- a/cubedbusTexture.c.in
+++ b/cubedbusTexture.c.in
@@ -65,25 +65,25 @@ cubedbusAddTextureObject (CubedbusObject *obj, CompOption *option, int nOption)
glBegin(GL_QUADS);
- glTexCoord2f (COMP_TEX_COORD_X (mat, (textureData->width)),
+ glTexCoord2f (COMP_TEX_COORD_X (mat, 0),
COMP_TEX_COORD_Y (mat, 0));
glVertex3f( getFloatOptionNamed (option, nOption, "x0", 0) ,
getFloatOptionNamed (option, nOption, "y0", 0) ,
getFloatOptionNamed (option, nOption, "z0", 0) ); // Top Left Of The Texture and Quad
- glTexCoord2f (COMP_TEX_COORD_X (mat, 0),
+ glTexCoord2f (COMP_TEX_COORD_X (mat, (textureData->width)),
COMP_TEX_COORD_Y (mat, 0));
glVertex3f( getFloatOptionNamed (option, nOption, "x1", 0) ,
getFloatOptionNamed (option, nOption, "y1", 0) ,
getFloatOptionNamed (option, nOption, "z1", 0) ); // Top Right Of The Texture and Quad
- glTexCoord2f (COMP_TEX_COORD_X (mat, 0),
+ glTexCoord2f (COMP_TEX_COORD_X (mat, (textureData->width)),
COMP_TEX_COORD_Y (mat, (textureData->height)));
glVertex3f( getFloatOptionNamed (option, nOption, "x2", 0) ,
getFloatOptionNamed (option, nOption, "y2", 0) ,
getFloatOptionNamed (option, nOption, "z2", 0) ); // Bot Right Of The Texture and Quad
- glTexCoord2f (COMP_TEX_COORD_X (mat, (textureData->width)),
+ glTexCoord2f (COMP_TEX_COORD_X (mat, 0),
COMP_TEX_COORD_Y (mat, (textureData->height)));
glVertex3f( getFloatOptionNamed (option, nOption, "x3", 0) ,
getFloatOptionNamed (option, nOption, "y3", 0) ,