[GRASS-SVN] r64023 - in grass/branches/releasebranch_7_0: include/defs lib/ogsf
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Jan 8 17:01:59 PST 2015
Author: annakrat
Date: 2015-01-08 17:01:59 -0800 (Thu, 08 Jan 2015)
New Revision: 64023
Modified:
grass/branches/releasebranch_7_0/include/defs/ogsf.h
grass/branches/releasebranch_7_0/lib/ogsf/gs2.c
grass/branches/releasebranch_7_0/lib/ogsf/gsd_prim.c
Log:
libogsf: Avoid double calling the same function with the same argument. Change the prototypes of gsd_*buffer(), merge from trunk, r61052
Modified: grass/branches/releasebranch_7_0/include/defs/ogsf.h
===================================================================
--- grass/branches/releasebranch_7_0/include/defs/ogsf.h 2015-01-08 22:55:54 UTC (rev 64022)
+++ grass/branches/releasebranch_7_0/include/defs/ogsf.h 2015-01-09 01:01:59 UTC (rev 64023)
@@ -510,9 +510,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/branches/releasebranch_7_0/lib/ogsf/gs2.c
===================================================================
--- grass/branches/releasebranch_7_0/lib/ogsf/gs2.c 2015-01-08 22:55:54 UTC (rev 64022)
+++ grass/branches/releasebranch_7_0/lib/ogsf/gs2.c 2015-01-09 01:01:59 UTC (rev 64023)
@@ -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/branches/releasebranch_7_0/lib/ogsf/gsd_prim.c
===================================================================
--- grass/branches/releasebranch_7_0/lib/ogsf/gsd_prim.c 2015-01-08 22:55:54 UTC (rev 64022)
+++ grass/branches/releasebranch_7_0/lib/ogsf/gsd_prim.c 2015-01-09 01:01:59 UTC (rev 64023)
@@ -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