Ported osgUtil, osgDB, osgGA, NodeKits and plugins to compile against OpenGL ES 1.1 and OpenGL ES 2.0.
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
*/
|
||||
|
||||
//
|
||||
// OpenFlight<EFBFBD> loader for OpenSceneGraph
|
||||
// OpenFlight (R) loader for OpenSceneGraph
|
||||
//
|
||||
// Copyright (C) 2005-2007 Brede Johansen
|
||||
//
|
||||
@@ -30,6 +30,17 @@
|
||||
#include "AttrData.h"
|
||||
#include "RecordInputStream.h"
|
||||
|
||||
#if defined(OSG_GLES1_AVAILABLE) || defined(OSG_GLES2_AVAILABLE)
|
||||
#define GL_RGB5 0x8050
|
||||
#define GL_RGBA4 0x8056
|
||||
#define GL_RGBA8 0x8058
|
||||
#define GL_RGBA12 0x805A
|
||||
#define GL_RGB12 0x8053
|
||||
#define GL_LUMINANCE12_ALPHA4 0x8046
|
||||
#define GL_LUMINANCE12_ALPHA12 0x8047
|
||||
#define GL_INTENSITY16 0x804D
|
||||
#endif
|
||||
|
||||
namespace flt {
|
||||
|
||||
class VertexPalette : public Record
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
#include <osg/TexEnv>
|
||||
#include <osg/CullFace>
|
||||
|
||||
@@ -21,6 +20,9 @@
|
||||
#include "Q3BSPReader.h"
|
||||
#include "Q3BSPLoad.h"
|
||||
|
||||
#ifndef GL_RGBA8
|
||||
#define GL_RGBA8 0x8058
|
||||
#endif
|
||||
|
||||
using namespace bsp;
|
||||
|
||||
|
||||
@@ -35,6 +35,10 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#if defined(OSG_GLES1_AVAILABLE) || defined(OSG_GLES2_AVAILABLE)
|
||||
#define GL_RED 0x1903
|
||||
#define GL_LUMINANCE4_ALPHA4 0x8043
|
||||
#endif
|
||||
|
||||
// NOTICE ON WIN32:
|
||||
// typedef DWORD unsigned long;
|
||||
|
||||
@@ -45,6 +45,15 @@
|
||||
#include "hdrloader.h"
|
||||
#include "hdrwriter.h"
|
||||
|
||||
#ifndef GL_RGBA8
|
||||
#define GL_RGBA8 0x8058
|
||||
#endif
|
||||
|
||||
#ifndef GL_RGB8
|
||||
#define GL_RGB8 0x8051
|
||||
#endif
|
||||
|
||||
|
||||
class ReaderWriterHDR : public osgDB::ReaderWriter
|
||||
{
|
||||
public:
|
||||
|
||||
@@ -95,6 +95,8 @@ class Logos: public osg::Drawable
|
||||
|
||||
virtual void drawImplementation(osg::RenderInfo& renderInfo) const
|
||||
{
|
||||
#if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE)
|
||||
|
||||
if( renderInfo.getContextID() != _contextID )
|
||||
return;
|
||||
|
||||
@@ -164,7 +166,10 @@ class Logos: public osg::Drawable
|
||||
glPopMatrix();
|
||||
glMatrixMode( GL_PROJECTION );
|
||||
glPopMatrix();
|
||||
glMatrixMode( GL_MODELVIEW );
|
||||
glMatrixMode( GL_MODELVIEW );
|
||||
#else
|
||||
osg::notify(osg::NOTICE)<<"Warning: Logos::drawImplementation(..) not supported."<<std::endl;
|
||||
#endif
|
||||
}
|
||||
|
||||
void addLogo( RelativePosition pos, std::string name )
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
#include <osg/StateSet>
|
||||
#include <osg/Texture1D>
|
||||
#include <osg/Texture2D>
|
||||
#include <osg/TextureCubeMap>
|
||||
#include <osg/TextureRectangle>
|
||||
#include <osg/TexGen>
|
||||
#include <osg/PolygonOffset>
|
||||
#include <osg/LineStipple>
|
||||
|
||||
#include <osgDB/Registry>
|
||||
#include <osgDB/Input>
|
||||
|
||||
@@ -22,6 +22,14 @@
|
||||
# define SEEK_SET 0
|
||||
#endif
|
||||
|
||||
#if defined(OSG_GLES1_AVAILABLE) || defined(OSG_GLES2_AVAILABLE)
|
||||
#define GL_BITMAP 0x1A00
|
||||
#define GL_RED 0x1903
|
||||
#define GL_GREEN 0x1904
|
||||
#define GL_BLUE 0x1905
|
||||
#define GL_COLOR_INDEX 0x1900
|
||||
#endif
|
||||
|
||||
using namespace osg;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user