From bfa731e39b9f5202d2923e5e4d61ef8dfe39d605 Mon Sep 17 00:00:00 2001 From: kervala Date: Sat, 12 May 2012 20:56:37 +0200 Subject: [PATCH] Changed: #1275 Create an OpenGL ES driver --- code/nel/src/3d/driver/opengl/driver_opengl.cpp | 2 +- code/nel/src/3d/driver/opengl/driver_opengl.h | 2 +- code/nel/src/3d/driver/opengl/driver_opengl_extension.h | 4 ---- code/nel/src/3d/driver/opengl/driver_opengl_texture.cpp | 2 +- 4 files changed, 3 insertions(+), 7 deletions(-) diff --git a/code/nel/src/3d/driver/opengl/driver_opengl.cpp b/code/nel/src/3d/driver/opengl/driver_opengl.cpp index 724888c23..f8af1a217 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl.cpp @@ -1313,7 +1313,7 @@ void CDriverGL::copyFrameBufferToTexture(ITexture *tex, // setup texture mode, after activeTextureARB() CDriverGLStates::TTextureMode textureMode= CDriverGLStates::Texture2D; -#ifdef GL_TEXTURE_RECTANGLE_NV +#ifndef USE_OPENGLES if(gltext->TextureMode == GL_TEXTURE_RECTANGLE_NV) textureMode = CDriverGLStates::TextureRect; #endif diff --git a/code/nel/src/3d/driver/opengl/driver_opengl.h b/code/nel/src/3d/driver/opengl/driver_opengl.h index cebcf5c8d..bbbb4dbad 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl.h +++ b/code/nel/src/3d/driver/opengl/driver_opengl.h @@ -765,6 +765,7 @@ private: // Off-screen rendering in Dib section HPBUFFERARB _PBuffer; #elif defined(NL_OS_MAC) + NSOpenGLContext* _ctx; #elif defined(NL_OS_UNIX) GLXContext _ctx; #endif @@ -787,7 +788,6 @@ private: friend NSApplicationTerminateReply applicationShouldTerminate(CDriverGL*); NLMISC::CCocoaEventEmitter _EventEmitter; - NSOpenGLContext* _ctx; CocoaOpenGLView* _glView; NSAutoreleasePool* _autoreleasePool; uint16 _backBufferHeight; diff --git a/code/nel/src/3d/driver/opengl/driver_opengl_extension.h b/code/nel/src/3d/driver/opengl/driver_opengl_extension.h index aa0f2c76f..c6adc6b96 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_extension.h +++ b/code/nel/src/3d/driver/opengl/driver_opengl_extension.h @@ -152,11 +152,7 @@ public: EXTTextureFilterAnisotropic = false; EXTTextureFilterAnisotropicMaximum = 1.f; ARBTextureRectangle = false; -#ifdef USE_OPENGLES - ARBTextureNonPowerOfTwo = true; -#else ARBTextureNonPowerOfTwo = false; -#endif ARBMultisample = false; NVOcclusionQuery = false; FrameBufferObject = false; diff --git a/code/nel/src/3d/driver/opengl/driver_opengl_texture.cpp b/code/nel/src/3d/driver/opengl/driver_opengl_texture.cpp index 966b7fd6a..d3ec9c00e 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_texture.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl_texture.cpp @@ -1335,7 +1335,7 @@ bool CDriverGL::uploadTexture (ITexture& tex, CRect& rect, uint8 nNumMipMap) _DriverGLStates.activeTextureARB (0); CDriverGLStates::TTextureMode textureMode= CDriverGLStates::Texture2D; -#ifdef GL_TEXTURE_RECTANGLE_NV +#ifndef USE_OPENGLES if(gltext->TextureMode == GL_TEXTURE_RECTANGLE_NV) textureMode = CDriverGLStates::TextureRect; #endif