[GRASS-SVN] r61052 - in grass/trunk: include/defs lib/ogsf
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun Jun 29 03:23:06 PDT 2014
Author: hcho
Date: 2014-06-29 03:23:06 -0700 (Sun, 29 Jun 2014)
New Revision: 61052
Modified:
grass/trunk/include/defs/ogsf.h
grass/trunk/lib/ogsf/GS2.c
grass/trunk/lib/ogsf/gsd_prim.c
Log:
libogsf: Avoid double calling the same function with the same argument. Change the prototypes of gsd_*buffer()
Modified: grass/trunk/include/defs/ogsf.h
===================================================================
--- grass/trunk/include/defs/ogsf.h 2014-06-29 10:22:23 UTC (rev 61051)
+++ grass/trunk/include/defs/ogsf.h 2014-06-29 10:23:06 UTC (rev 61052)
@@ -513,9 +513,9 @@
void gsd_endline(void);
void gsd_shademodel(int);
int gsd_getshademodel(void);
-void gsd_bothbuffer(void);
-void gsd_frontbuffer(int);
-void gsd_backbuffer(int);
+void gsd_bothbuffers(void);
+void gsd_frontbuffer(void);
+void gsd_backbuffer(void);
void gsd_swapbuffers(void);
void gsd_popmatrix(void);
void gsd_pushmatrix(void);
Modified: grass/trunk/lib/ogsf/GS2.c
===================================================================
--- grass/trunk/lib/ogsf/GS2.c 2014-06-29 10:22:23 UTC (rev 61051)
+++ grass/trunk/lib/ogsf/GS2.c 2014-06-29 10:23:06 UTC (rev 61052)
@@ -2466,19 +2466,16 @@
switch (where) {
case GSD_BOTH:
- gsd_frontbuffer(1);
- gsd_backbuffer(1);
+ gsd_bothbuffers();
break;
case GSD_FRONT:
- gsd_frontbuffer(1);
- gsd_backbuffer(0);
+ gsd_frontbuffer();
break;
case GSD_BACK:
default:
- gsd_frontbuffer(0);
- gsd_backbuffer(1);
+ gsd_backbuffer();
break;
}
Modified: grass/trunk/lib/ogsf/gsd_prim.c
===================================================================
--- grass/trunk/lib/ogsf/gsd_prim.c 2014-06-29 10:22:23 UTC (rev 61051)
+++ grass/trunk/lib/ogsf/gsd_prim.c 2014-06-29 10:23:06 UTC (rev 61052)
@@ -433,7 +433,7 @@
/*!
\brief ADD
*/
-void gsd_bothbuffer(void)
+void gsd_bothbuffers(void)
{
/* OGLXXX frontbuffer: other possibilities include GL_FRONT_AND_BACK */
glDrawBuffer(GL_FRONT_AND_BACK);
@@ -447,10 +447,10 @@
\param bool non-zero for enable otherwise disable front buffer
*/
-void gsd_frontbuffer(int bool)
+void gsd_frontbuffer(void)
{
/* OGLXXX frontbuffer: other possibilities include GL_FRONT_AND_BACK */
- glDrawBuffer((bool) ? GL_FRONT : GL_BACK);
+ glDrawBuffer(GL_FRONT);
return;
}
@@ -461,10 +461,10 @@
\param bool non-zero for enable otherwise disable back buffer
*/
-void gsd_backbuffer(int bool)
+void gsd_backbuffer(void)
{
/* OGLXXX backbuffer: other possibilities include GL_FRONT_AND_BACK */
- glDrawBuffer((bool) ? GL_BACK : GL_FRONT);
+ glDrawBuffer(GL_BACK);
return;
}
More information about the grass-commit
mailing list