]> Pileus Git - grits/commitdiff
Add code to draw tile borders
authorAndy Spencer <andy753421@gmail.com>
Tue, 9 Feb 2010 15:17:43 +0000 (15:17 +0000)
committerAndy Spencer <andy753421@gmail.com>
Tue, 9 Feb 2010 15:17:43 +0000 (15:17 +0000)
src/plugins/sat.c

index abe0b24fbb69640c9c560aaf557debd85076ae00..edbe652834ae855349e3873bf4bcd6cd0cfb3c77 100644 (file)
@@ -24,6 +24,7 @@
  */
 
 #include <time.h>
  */
 
 #include <time.h>
+#include <string.h>
 #include <glib/gstdio.h>
 #include <GL/gl.h>
 
 #include <glib/gstdio.h>
 #include <GL/gl.h>
 
@@ -55,6 +56,18 @@ static gboolean _load_tile_cb(gpointer _data)
        gint      width  = gdk_pixbuf_get_width(pixbuf);
        gint      height = gdk_pixbuf_get_height(pixbuf);
 
        gint      width  = gdk_pixbuf_get_width(pixbuf);
        gint      height = gdk_pixbuf_get_height(pixbuf);
 
+       /* Draw a border */
+       //gint border = 10;
+       //gint stride = gdk_pixbuf_get_rowstride(pixbuf);
+       //for (int i = 0; i < border; i++) {
+       //      memset(&pixels[(       i)*stride], 0xff, stride);
+       //      memset(&pixels[(height-i)*stride], 0xff, stride);
+       //}
+       //for (int i = 0; i < height; i++) {
+       //      memset(&pixels[(i*stride)], 0xff, border*4);
+       //      memset(&pixels[(i*stride)+((width-border)*4)], 0xff, border*4);
+       //}
+
        guint *tex = g_new0(guint, 1);
        glGenTextures(1, tex);
        glBindTexture(GL_TEXTURE_2D, *tex);
        guint *tex = g_new0(guint, 1);
        glGenTextures(1, tex);
        glBindTexture(GL_TEXTURE_2D, *tex);