Browse Source

libnviz: texture support added annakrat

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@48613 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 13 years ago
parent
commit
53f00e623b
1 changed files with 10 additions and 5 deletions
  1. 10 5
      lib/nviz/draw.c

+ 10 - 5
lib/nviz/draw.c

@@ -6,11 +6,12 @@
    Based on visualization/nviz/src/draw.c and
    visualization/nviz/src/togl_flythrough.c
    
-   (C) 2008, 2010 by the GRASS Development Team
+   (C) 2008, 2010-2011 by the GRASS Development Team
    This program is free software under the GNU General Public License
    (>=v2). Read the file COPYING that comes with GRASS for details.
 
    \author Updated/modified by Martin Landa <landa.martin gmail.com> (Google SoC 2008/2010)
+   \author Textures by Anna Kratochvilova 
  */
 
 #include <grass/nviz.h>
@@ -379,10 +380,14 @@ void Nviz_draw_image(int x, int y, int width, int height, int texture_id)
 
     glBegin(GL_QUADS);
 
-    glTexCoord2d(0.0,1.0);glVertex2d(x, y);
-    glTexCoord2d(0.0,0.0);glVertex2d(x, y + height);
-    glTexCoord2d(1.0,0.0);glVertex2d(x + width, y + height);
-    glTexCoord2d(1.0,1.0);glVertex2d(x + width, y);
+    glTexCoord2d(0.0,1.0);
+    glVertex2d(x, y);
+    glTexCoord2d(0.0,0.0);
+    glVertex2d(x, y + height);
+    glTexCoord2d(1.0,0.0);
+    glVertex2d(x + width, y + height);
+    glTexCoord2d(1.0,1.0);
+    glVertex2d(x + width, y);
 
     glEnd();