Changed: #1275 Create an OpenGL ES driver

This commit is contained in:
kervala 2012-05-12 20:56:37 +02:00
parent 07dd298ed2
commit 26dd470afc
4 changed files with 3 additions and 7 deletions

View file

@ -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

View file

@ -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;

View file

@ -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;

View file

@ -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