OpenSceneGraph/include/osgDB/ConvertUTF
Robert Osfield b24353b12c From Rafa Gaitan and Jorge Izquierdo, build support for Android NDK.
"- In order to build against GLES1 we execute:
$ mkdir build_android_gles1
$ cd build_android_gles1
$ cmake .. -DOSG_BUILD_PLATFORM_ANDROID=ON -DDYNAMIC_OPENTHREADS=OFF
-DDYNAMIC_OPENSCENEGRAPH=OFF -DANDROID_NDK=<path_to_android_ndk>/
-DOSG_GLES1_AVAILABLE=ON -DOSG_GL1_AVAILABLE=OFF
-DOSG_GL2_AVAILABLE=OFF -DOSG_GL_DISPLAYLISTS_AVAILABLE=OFF -DJ=2
-DOSG_CPP_EXCEPTIONS_AVAILABLE=OFF
$ make
 If all is correct you will have and static OSG inside:
build_android_gles1/bin/ndk/local/armeabi.

- GLES2 is not tested/proved, but I think it could be possible build
it with the correct cmake flags.
- The flag -DJ=2 is used to pass to the ndk-build the number of
processors to speed up the building.
- make install is not yet supported."
2011-03-08 16:35:37 +00:00

53 lines
1.9 KiB
C++

/* -*-c++-*- OpenSceneGraph - Copyright (C) 2008 Robert Osfield
*
* This library is open source and may be redistributed and/or modified under
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
* (at your option) any later version. The full license is in LICENSE file
* included with this distribution, and on the openscenegraph.org website.
*
* 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
* OpenSceneGraph Public License for more details.
*/
#ifndef OSGDB_CONVERTUTF
#define OSGDB_CONVERTUTF 1
#include <osg/Config>
#include <osgDB/Export>
#include <string>
#if defined(__CYGWIN__) || defined(ANDROID)
namespace std
{
typedef basic_string<wchar_t> wstring;
}
#endif
namespace osgDB
{
extern OSGDB_EXPORT std::string convertUTF16toUTF8(const wchar_t* source, unsigned sourceLength);
extern OSGDB_EXPORT std::wstring convertUTF8toUTF16(const char* source, unsigned sourceLength);
extern OSGDB_EXPORT std::string convertUTF16toUTF8(const std::wstring& s);
extern OSGDB_EXPORT std::string convertUTF16toUTF8(const wchar_t* s);
extern OSGDB_EXPORT std::wstring convertUTF8toUTF16(const std::string& s);
extern OSGDB_EXPORT std::wstring convertUTF8toUTF16(const char* s);
extern OSGDB_EXPORT std::string convertStringFromCurrentCodePageToUTF8(const char* source, unsigned sourceLength);
extern OSGDB_EXPORT std::string convertStringFromUTF8toCurrentCodePage(const char* source, unsigned sourceLength);
extern OSGDB_EXPORT std::string convertStringFromCurrentCodePageToUTF8(const std::string& s);
extern OSGDB_EXPORT std::string convertStringFromCurrentCodePageToUTF8(const char* s);
extern OSGDB_EXPORT std::string convertStringFromUTF8toCurrentCodePage(const std::string& s);
extern OSGDB_EXPORT std::string convertStringFromUTF8toCurrentCodePage(const char* s);
}
#endif