make it easy to exclude boost
This commit is contained in:
parent
69dc6007d7
commit
cc77f8b96c
16 changed files with 97 additions and 29 deletions
|
|
@ -79,6 +79,10 @@
|
|||
433EC180187891D2007304B6 /* misc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 433EC17D187891D2007304B6 /* misc.cpp */; };
|
||||
433EC181187891D2007304B6 /* othersyms.c in Sources */ = {isa = PBXBuildFile; fileRef = 433EC17E187891D2007304B6 /* othersyms.c */; };
|
||||
433EC182187891D2007304B6 /* othersyms.c in Sources */ = {isa = PBXBuildFile; fileRef = 433EC17E187891D2007304B6 /* othersyms.c */; };
|
||||
433EC1CF187C51F0007304B6 /* RegalPrint.h in Headers */ = {isa = PBXBuildFile; fileRef = 433EC1CE187C51F0007304B6 /* RegalPrint.h */; };
|
||||
433EC1D0187C51F0007304B6 /* RegalPrint.h in Headers */ = {isa = PBXBuildFile; fileRef = 433EC1CE187C51F0007304B6 /* RegalPrint.h */; };
|
||||
433EC1D1187C51F0007304B6 /* RegalPrint.h in Headers */ = {isa = PBXBuildFile; fileRef = 433EC1CE187C51F0007304B6 /* RegalPrint.h */; };
|
||||
433EC1D2187C51F0007304B6 /* RegalPrint.h in Headers */ = {isa = PBXBuildFile; fileRef = 433EC1CE187C51F0007304B6 /* RegalPrint.h */; };
|
||||
4359147D18293B32002CB92C /* libapitrace.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4359144B18293A5C002CB92C /* libapitrace.a */; };
|
||||
4359147E18293B32002CB92C /* libjsonsl.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4359145118293A68002CB92C /* libjsonsl.a */; };
|
||||
4359147F18293B32002CB92C /* libmd5.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4359145718293A74002CB92C /* libmd5.a */; };
|
||||
|
|
@ -943,6 +947,7 @@
|
|||
433EC14D18788EC9007304B6 /* tessmono.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = tessmono.h; path = ../../../src/glu/libtess/tessmono.h; sourceTree = "<group>"; };
|
||||
433EC17D187891D2007304B6 /* misc.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = misc.cpp; sourceTree = "<group>"; };
|
||||
433EC17E187891D2007304B6 /* othersyms.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = othersyms.c; sourceTree = "<group>"; };
|
||||
433EC1CE187C51F0007304B6 /* RegalPrint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegalPrint.h; path = ../../../src/regal/RegalPrint.h; sourceTree = "<group>"; };
|
||||
4359144618293A5B002CB92C /* apitrace.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = apitrace.xcodeproj; path = ../apitrace/apitrace.xcodeproj; sourceTree = "<group>"; };
|
||||
4359144C18293A68002CB92C /* jsonsl.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = jsonsl.xcodeproj; path = ../jsonsl/jsonsl.xcodeproj; sourceTree = "<group>"; };
|
||||
4359145218293A73002CB92C /* md5.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = md5.xcodeproj; path = ../md5/md5.xcodeproj; sourceTree = "<group>"; };
|
||||
|
|
@ -1426,6 +1431,7 @@
|
|||
43A6C1F515C48D200063667E /* RegalPpa.h */,
|
||||
438D2C2516DE668A005E03F6 /* RegalPpca.h */,
|
||||
43A6C1F715C48D200063667E /* RegalPrecompile.h */,
|
||||
433EC1CE187C51F0007304B6 /* RegalPrint.h */,
|
||||
43A6C1F815C48D200063667E /* RegalPrivate.h */,
|
||||
BCBEC6FF167AD72700B38E16 /* RegalPush.h */,
|
||||
BC4DBEC11804FB0600F6D226 /* RegalQuads.cpp */,
|
||||
|
|
@ -1497,6 +1503,7 @@
|
|||
433EC12D18788E72007304B6 /* gluint.h in Headers */,
|
||||
433EC16A18788EC9007304B6 /* priorityq.h in Headers */,
|
||||
433EC16618788EC9007304B6 /* priorityq-sort.h in Headers */,
|
||||
433EC1D0187C51F0007304B6 /* RegalPrint.h in Headers */,
|
||||
433EC15A18788EC9007304B6 /* memalloc.h in Headers */,
|
||||
433EC14E18788EC9007304B6 /* dict-list.h in Headers */,
|
||||
433EC15E18788EC9007304B6 /* mesh.h in Headers */,
|
||||
|
|
@ -1588,6 +1595,7 @@
|
|||
435916D018367DEE002CB92C /* RegalNamespace.h in Headers */,
|
||||
435916D118367DEE002CB92C /* RegalTexSto.h in Headers */,
|
||||
435916D218367DEE002CB92C /* RegalEmuInfo.h in Headers */,
|
||||
433EC1D1187C51F0007304B6 /* RegalPrint.h in Headers */,
|
||||
435916D318367DEE002CB92C /* RegalQuads.h in Headers */,
|
||||
437B7CC3187A8BF700C863BB /* RegalOrigIff.h in Headers */,
|
||||
435916D418367DEE002CB92C /* RegalLayerInfo.h in Headers */,
|
||||
|
|
@ -1629,6 +1637,7 @@
|
|||
433EC12E18788E72007304B6 /* gluint.h in Headers */,
|
||||
433EC16B18788EC9007304B6 /* priorityq.h in Headers */,
|
||||
433EC16718788EC9007304B6 /* priorityq-sort.h in Headers */,
|
||||
433EC1D2187C51F0007304B6 /* RegalPrint.h in Headers */,
|
||||
433EC15B18788EC9007304B6 /* memalloc.h in Headers */,
|
||||
433EC14F18788EC9007304B6 /* dict-list.h in Headers */,
|
||||
433EC15F18788EC9007304B6 /* mesh.h in Headers */,
|
||||
|
|
@ -1668,6 +1677,7 @@
|
|||
43A6C22215C48D200063667E /* RegalPpa.h in Headers */,
|
||||
437B7CB9187A8BF700C863BB /* RegalOrigFilter.h in Headers */,
|
||||
43A6C22415C48D200063667E /* RegalPrecompile.h in Headers */,
|
||||
433EC1CF187C51F0007304B6 /* RegalPrint.h in Headers */,
|
||||
43A6C22515C48D200063667E /* RegalPrivate.h in Headers */,
|
||||
437B7CE5187A8BF700C863BB /* RegalOrigVao.h in Headers */,
|
||||
43A6C22615C48D200063667E /* RegalState.h in Headers */,
|
||||
|
|
|
|||
|
|
@ -41,10 +41,10 @@ REGAL_GLOBAL_BEGIN
|
|||
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <boost/print/print_string.hpp>
|
||||
#include "RegalPrint.h"
|
||||
|
||||
using namespace ::std;
|
||||
using ::boost::print::print_string;
|
||||
|
||||
|
||||
REGAL_GLOBAL_END
|
||||
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ REGAL_GLOBAL_BEGIN
|
|||
#include <lookup3.h> // 32-bit memory hashing function
|
||||
|
||||
#include <string>
|
||||
#include <boost/print/print_string.hpp>
|
||||
#include "RegalPrint.h"
|
||||
|
||||
#if !REGAL_NO_PNG
|
||||
#include <zlib.h>
|
||||
|
|
@ -57,7 +57,7 @@ REGAL_GLOBAL_BEGIN
|
|||
#endif
|
||||
|
||||
using namespace ::std;
|
||||
using ::boost::print::print_string;
|
||||
|
||||
|
||||
REGAL_GLOBAL_END
|
||||
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ REGAL_GLOBAL_BEGIN
|
|||
#include <string>
|
||||
#include <algorithm> // For std::swap
|
||||
|
||||
#include <boost/print/print_string.hpp>
|
||||
#include "RegalPrint.h"
|
||||
#include <boost/print/string_list.hpp>
|
||||
|
||||
#include "RegalEmu.h"
|
||||
|
|
@ -88,7 +88,7 @@ namespace ClientState
|
|||
{
|
||||
|
||||
using ::boost::print::hex;
|
||||
using ::boost::print::print_string;
|
||||
|
||||
typedef ::boost::print::string_list<std::string> string_list;
|
||||
|
||||
inline static void enable(Dispatch::GL &dt, const GLenum cap, const GLboolean enable)
|
||||
|
|
|
|||
|
|
@ -40,9 +40,9 @@ REGAL_GLOBAL_BEGIN
|
|||
#include <zlib.h>
|
||||
#include <png.h>
|
||||
#include <string>
|
||||
#include <boost/print/print_string.hpp>
|
||||
#include "RegalPrint.h"
|
||||
using namespace ::std;
|
||||
using ::boost::print::print_string;
|
||||
|
||||
#endif
|
||||
|
||||
#include "RegalFrame.h"
|
||||
|
|
|
|||
|
|
@ -87,8 +87,8 @@ REGAL_GLOBAL_BEGIN
|
|||
#include <cstdarg>
|
||||
using namespace std;
|
||||
|
||||
#include <boost/print/print_string.hpp>
|
||||
using boost::print::print_string;
|
||||
#include "RegalPrint.h"
|
||||
|
||||
|
||||
#include "mongoose.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -46,6 +46,8 @@ using std::string;
|
|||
#include <boost/print/string_list.hpp>
|
||||
typedef boost::print::string_list<string> string_list;
|
||||
|
||||
#include "RegalPrint.h"
|
||||
|
||||
#include "RegalIff.h"
|
||||
#include "RegalLog.h"
|
||||
#include "RegalToken.h"
|
||||
|
|
@ -1958,7 +1960,7 @@ void Program::Samplers( RegalContext * ctx, Dispatch::GL & tbl )
|
|||
|
||||
for ( GLint ii = 0; ii < REGAL_EMU_MAX_TEXTURE_UNITS; ii++ )
|
||||
{
|
||||
std::string samplerName = boost::print::print_string("rglSampler",ii);
|
||||
std::string samplerName = print_string("rglSampler",ii);
|
||||
GLint slot = tbl.glGetUniformLocation( pg, samplerName.c_str() );
|
||||
if ( slot >= 0 )
|
||||
tbl.glUniform1i( slot, ii );
|
||||
|
|
|
|||
|
|
@ -35,8 +35,8 @@
|
|||
REGAL_GLOBAL_BEGIN
|
||||
|
||||
#include <boost/print/json.hpp>
|
||||
#include <boost/print/print_string.hpp>
|
||||
using boost::print::print_string;
|
||||
#include "RegalPrint.h"
|
||||
|
||||
|
||||
#include <map>
|
||||
using namespace std;
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ REGAL_NAMESPACE_BEGIN
|
|||
using ::std::string;
|
||||
using ::std::list;
|
||||
using ::boost::print::trim;
|
||||
using ::boost::print::print_string;
|
||||
|
||||
|
||||
using namespace ::boost::print;
|
||||
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ REGAL_GLOBAL_BEGIN
|
|||
#include <list>
|
||||
#include <set>
|
||||
|
||||
#include <boost/print/print_string.hpp>
|
||||
#include "RegalPrint.h"
|
||||
|
||||
REGAL_GLOBAL_END
|
||||
|
||||
|
|
@ -231,7 +231,7 @@ namespace Logging
|
|||
#if REGAL_LOG_ERROR
|
||||
#define Error(...) { \
|
||||
if (::REGAL_NAMESPACE_INTERNAL::Logging::enableError) \
|
||||
::REGAL_NAMESPACE_INTERNAL::Logging::Output( ::REGAL_NAMESPACE_INTERNAL::Logging::LOG_ERROR, __FILE__, __LINE__, "error ", " | ", NULL, ::boost::print::print_string( __VA_ARGS__) ); }
|
||||
::REGAL_NAMESPACE_INTERNAL::Logging::Output( ::REGAL_NAMESPACE_INTERNAL::Logging::LOG_ERROR, __FILE__, __LINE__, "error ", " | ", NULL, print_string( __VA_ARGS__) ); }
|
||||
#else
|
||||
#define Error(...) {}
|
||||
#endif
|
||||
|
|
@ -239,7 +239,7 @@ namespace Logging
|
|||
#if REGAL_LOG_WARNING
|
||||
#define Warning(...) { \
|
||||
if (::REGAL_NAMESPACE_INTERNAL::Logging::enableWarning) \
|
||||
::REGAL_NAMESPACE_INTERNAL::Logging::Output( ::REGAL_NAMESPACE_INTERNAL::Logging::LOG_WARNING, __FILE__, __LINE__, "warning ", " | ", NULL, ::boost::print::print_string( __VA_ARGS__) ); }
|
||||
::REGAL_NAMESPACE_INTERNAL::Logging::Output( ::REGAL_NAMESPACE_INTERNAL::Logging::LOG_WARNING, __FILE__, __LINE__, "warning ", " | ", NULL, print_string( __VA_ARGS__) ); }
|
||||
#else
|
||||
#define Warning(...) {}
|
||||
#endif
|
||||
|
|
@ -247,7 +247,7 @@ namespace Logging
|
|||
#if REGAL_LOG_INFO
|
||||
#define Info(...) { \
|
||||
if (::REGAL_NAMESPACE_INTERNAL::Logging::enableInfo) \
|
||||
::REGAL_NAMESPACE_INTERNAL::Logging::Output( ::REGAL_NAMESPACE_INTERNAL::Logging::LOG_INFO, __FILE__, __LINE__, "info ", " | ", NULL, ::boost::print::print_string( __VA_ARGS__) ); }
|
||||
::REGAL_NAMESPACE_INTERNAL::Logging::Output( ::REGAL_NAMESPACE_INTERNAL::Logging::LOG_INFO, __FILE__, __LINE__, "info ", " | ", NULL, print_string( __VA_ARGS__) ); }
|
||||
#else
|
||||
#define Info(...) {}
|
||||
#endif
|
||||
|
|
@ -255,7 +255,7 @@ namespace Logging
|
|||
#if REGAL_LOG_APP
|
||||
#define App(name,...) { \
|
||||
if (::REGAL_NAMESPACE_INTERNAL::Logging::enableApp) \
|
||||
::REGAL_NAMESPACE_INTERNAL::Logging::Output( ::REGAL_NAMESPACE_INTERNAL::Logging::LOG_APP, __FILE__, __LINE__, "app ", " | ", name, ::boost::print::print_string( __VA_ARGS__) ); }
|
||||
::REGAL_NAMESPACE_INTERNAL::Logging::Output( ::REGAL_NAMESPACE_INTERNAL::Logging::LOG_APP, __FILE__, __LINE__, "app ", " | ", name, print_string( __VA_ARGS__) ); }
|
||||
#else
|
||||
#define App(...) {}
|
||||
#endif
|
||||
|
|
@ -263,7 +263,7 @@ namespace Logging
|
|||
#if REGAL_LOG_DRIVER
|
||||
#define Driver(name,...) { \
|
||||
if (::REGAL_NAMESPACE_INTERNAL::Logging::enableDriver) \
|
||||
::REGAL_NAMESPACE_INTERNAL::Logging::Output( ::REGAL_NAMESPACE_INTERNAL::Logging::LOG_DRIVER, __FILE__, __LINE__, "driver ", " | ", name, ::boost::print::print_string( __VA_ARGS__) ); }
|
||||
::REGAL_NAMESPACE_INTERNAL::Logging::Output( ::REGAL_NAMESPACE_INTERNAL::Logging::LOG_DRIVER, __FILE__, __LINE__, "driver ", " | ", name, print_string( __VA_ARGS__) ); }
|
||||
#else
|
||||
#define Driver(...) {}
|
||||
#endif
|
||||
|
|
@ -271,7 +271,7 @@ namespace Logging
|
|||
#if REGAL_LOG_INTERNAL
|
||||
#define Internal(name,...) { \
|
||||
if (::REGAL_NAMESPACE_INTERNAL::Logging::enableInternal) \
|
||||
::REGAL_NAMESPACE_INTERNAL::Logging::Output( ::REGAL_NAMESPACE_INTERNAL::Logging::LOG_INTERNAL, __FILE__, __LINE__, "internal", " | ", name, ::boost::print::print_string( __VA_ARGS__) ); }
|
||||
::REGAL_NAMESPACE_INTERNAL::Logging::Output( ::REGAL_NAMESPACE_INTERNAL::Logging::LOG_INTERNAL, __FILE__, __LINE__, "internal", " | ", name, print_string( __VA_ARGS__) ); }
|
||||
#else
|
||||
#define Internal(...) {}
|
||||
#endif
|
||||
|
|
@ -279,7 +279,7 @@ namespace Logging
|
|||
#if REGAL_LOG_HTTP
|
||||
#define HTrace(...) { \
|
||||
if (::REGAL_NAMESPACE_INTERNAL::Logging::enableHttp) \
|
||||
::REGAL_NAMESPACE_INTERNAL::Logging::Output( ::REGAL_NAMESPACE_INTERNAL::Logging::LOG_HTTP, __FILE__, __LINE__, "http ", " | ", NULL, ::boost::print::print_string( __VA_ARGS__) ); }
|
||||
::REGAL_NAMESPACE_INTERNAL::Logging::Output( ::REGAL_NAMESPACE_INTERNAL::Logging::LOG_HTTP, __FILE__, __LINE__, "http ", " | ", NULL, print_string( __VA_ARGS__) ); }
|
||||
#else
|
||||
#define HTrace(...) {}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ REGAL_GLOBAL_BEGIN
|
|||
#include <vector>
|
||||
|
||||
#include <boost/print.hpp>
|
||||
#include <boost/print/print_string.hpp>
|
||||
#include "RegalPrint.h"
|
||||
|
||||
#include "linear.h"
|
||||
#include "RegalLog.h"
|
||||
|
|
|
|||
56
src/regal/RegalPrint.h
Normal file
56
src/regal/RegalPrint.h
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
/*
|
||||
Copyright (c) 2013 NVIDIA Corporation
|
||||
Copyright (c) 2013 Cass Everitt
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
||||
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||
OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef __REGAL_PRINT_H__
|
||||
#define __REGAL_PRINT_H__
|
||||
|
||||
#include "RegalUtil.h"
|
||||
|
||||
REGAL_GLOBAL_BEGIN
|
||||
|
||||
#include <string>
|
||||
|
||||
#define REGAL_USE_BOOST 1
|
||||
|
||||
#if REGAL_USE_BOOST
|
||||
#include <boost/print/print_string.hpp>
|
||||
|
||||
using boost::print::print_string;
|
||||
|
||||
#else
|
||||
|
||||
#define print_string( ... ) std::string("x")
|
||||
|
||||
#endif
|
||||
|
||||
REGAL_GLOBAL_END
|
||||
|
||||
REGAL_NAMESPACE_BEGIN
|
||||
|
||||
|
||||
REGAL_NAMESPACE_END
|
||||
|
||||
#endif // __REGAL_PRINT_H__
|
||||
|
|
@ -42,7 +42,7 @@ REGAL_GLOBAL_BEGIN
|
|||
#include <string>
|
||||
#include <algorithm> // For std::swap
|
||||
|
||||
#include <boost/print/print_string.hpp>
|
||||
#include "RegalPrint.h"
|
||||
#include <boost/print/string_list.hpp>
|
||||
|
||||
#include "RegalEmu.h"
|
||||
|
|
@ -91,7 +91,7 @@ namespace State
|
|||
{
|
||||
|
||||
using ::boost::print::hex;
|
||||
using ::boost::print::print_string;
|
||||
|
||||
typedef ::boost::print::string_list<std::string> string_list;
|
||||
|
||||
inline static void setEnable(Dispatch::GL &dt, const GLenum cap, const GLboolean enable)
|
||||
|
|
|
|||
|
|
@ -374,7 +374,7 @@ TexC::GetTexture_( GLuint texture )
|
|||
if ( tfti == mapTextureToTextureState.end() ) {
|
||||
GenTexture_( texture );
|
||||
tfti = mapTextureToTextureState.find( texture );
|
||||
assert( tfti != mapTextureToTextureState.end() );
|
||||
RegalAssert( tfti != mapTextureToTextureState.end() );
|
||||
}
|
||||
|
||||
return &tfti->second;
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ REGAL_GLOBAL_BEGIN
|
|||
#include "RegalToken.h"
|
||||
|
||||
#include <boost/print/string_list.hpp>
|
||||
#include <boost/print/print_string.hpp>
|
||||
#include "RegalPrint.h"
|
||||
|
||||
using namespace ::boost::print;
|
||||
|
||||
|
|
|
|||
|
|
@ -41,10 +41,10 @@ REGAL_GLOBAL_BEGIN
|
|||
#include <string>
|
||||
using namespace std;
|
||||
|
||||
#include <boost/print/print_string.hpp>
|
||||
#include "RegalPrint.h"
|
||||
#include <boost/print/string_list.hpp>
|
||||
|
||||
using boost::print::print_string;
|
||||
|
||||
using boost::print::string_list;
|
||||
|
||||
#include "RegalConfig.h"
|
||||
|
|
|
|||
Loading…
Reference in a new issue