Update of /cvsroot/plib/plib/src/util
In directory usw-pr-cvs1:/tmp/cvs-serv22832/src/util
Modified Files:
Makefile.am ul.h
Added Files:
ulContext.cxx
Log Message:
Moved "glIsValidContext" over to UL
--- NEW FILE: ulContext.cxx ---
/*
PLIB - A Suite of Portable Game Libraries
Copyright (C) 2001 Steve Baker
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
For further information visit http://plib.sourceforge.net
$Id: ulContext.cxx,v 1.1 2002/04/19 21:02:17 ude Exp $
*/
#include "ul.h"
#ifndef WIN32
# ifndef macintosh
# include <GL/glx.h>
# else
# include <agl.h>
# endif
#endif
bool ulIsValidContext ( void )
{
#if defined(CONSOLE)
return true ;
#elif defined(WIN32)
return ( wglGetCurrentContext () != NULL ) ;
#elif defined(macintosh)
return ( aglGetCurrentContext () != NULL ) ;
#else
return ( glXGetCurrentContext () != NULL ) ;
#endif
}
Index: Makefile.am
===================================================================
RCS file: /cvsroot/plib/plib/src/util/Makefile.am,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- Makefile.am 24 Mar 2002 21:14:36 -0000 1.8
+++ Makefile.am 19 Apr 2002 21:02:17 -0000 1.9
@@ -2,8 +2,8 @@
include_HEADERS = ul.h
-libplibul_a_SOURCES = ul.cxx ulClock.cxx ulError.cxx ulLinkedList.cxx \
- ulList.cxx ulLocal.h
+libplibul_a_SOURCES = ul.cxx ulClock.cxx ulContext.cxx ulError.cxx \
+ ulLinkedList.cxx ulList.cxx ulLocal.h
EXTRA_DIST = ul.dsp
Index: ul.h
===================================================================
RCS file: /cvsroot/plib/plib/src/util/ul.h,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -d -r1.40 -r1.41
--- ul.h 24 Mar 2002 20:49:55 -0000 1.40
+++ ul.h 19 Apr 2002 21:02:17 -0000 1.41
@@ -31,6 +31,7 @@
// - high performance clocks
// - ulList
// - ulLinkedList
+// - ulIsValidContext
// - more to come (endian support, version ID)
//
@@ -732,6 +733,9 @@
extern int ulStrNEqual ( const char *s1, const char *s2, int len );
extern int ulStrEqual ( const char *s1, const char *s2 );
+
+
+bool ulIsValidContext ( void ) ;
//lint -restore
|