mirror of
https://github.com/minetest/irrlicht.git
synced 2024-11-09 17:23:50 +01:00
Merging r6122 through r6127 from trunk to ogl-es branch
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@6128 dfc29bdd-3216-0410-991c-e03cc46cb475
This commit is contained in:
parent
eaefca2cd1
commit
048aa500b9
@ -91,7 +91,7 @@ namespace irr
|
||||
|
||||
//! Get the position of this window on screen
|
||||
virtual core::position2di getWindowPosition() _IRR_OVERRIDE_;
|
||||
|
||||
|
||||
//! Activate any joysticks, and generate events for them.
|
||||
virtual bool activateJoysticks(core::array<SJoystickInfo> & joystickInfo) _IRR_OVERRIDE_;
|
||||
|
||||
@ -176,13 +176,13 @@ namespace irr
|
||||
}
|
||||
|
||||
//! Returns the current position of the mouse cursor.
|
||||
virtual const core::position2d<s32>& getPosition()
|
||||
virtual const core::position2d<s32>& getPosition(bool updateCursor) _IRR_OVERRIDE_
|
||||
{
|
||||
return CursorPos;
|
||||
}
|
||||
|
||||
//! Returns the current position of the mouse cursor.
|
||||
virtual core::position2d<f32> getRelativePosition()
|
||||
virtual core::position2d<f32> getRelativePosition(bool updateCursor) _IRR_OVERRIDE_
|
||||
{
|
||||
if (!UseReferenceRect)
|
||||
{
|
||||
|
@ -1224,7 +1224,7 @@ void CIrrDeviceMacOSX::storeMouseLocation()
|
||||
x = (int)point.x;
|
||||
y = (int)point.y;
|
||||
|
||||
const core::position2di& curr = ((CCursorControl *)CursorControl)->getPosition();
|
||||
const core::position2di& curr = ((CCursorControl *)CursorControl)->getPosition(true);
|
||||
if (curr.X != x || curr.Y != y)
|
||||
{
|
||||
// In fullscreen mode, events are not sent regularly so rely on polling
|
||||
|
@ -52,7 +52,7 @@ namespace video
|
||||
const SExposedVideoData& getContext() const;
|
||||
|
||||
//! Change render context, disable old and activate new defined by videoData
|
||||
bool activateContext(const SExposedVideoData& videoData);
|
||||
bool activateContext(const SExposedVideoData& videoData, bool restorePrimaryOnZero) _IRR_OVERRIDE_;
|
||||
|
||||
// Swap buffers.
|
||||
bool swapBuffers();
|
||||
@ -61,7 +61,7 @@ namespace video
|
||||
SIrrlichtCreationParameters Params;
|
||||
SExposedVideoData PrimaryContext;
|
||||
SExposedVideoData CurrentContext;
|
||||
|
||||
|
||||
NSOpenGLPixelFormat* PixelFormat;
|
||||
};
|
||||
}
|
||||
|
@ -188,8 +188,9 @@ const SExposedVideoData& CNSOGLManager::getContext() const
|
||||
return CurrentContext;
|
||||
}
|
||||
|
||||
bool CNSOGLManager::activateContext(const SExposedVideoData& videoData)
|
||||
bool CNSOGLManager::activateContext(const SExposedVideoData& videoData, bool restorePrimaryOnZero)
|
||||
{
|
||||
//TODO: handle restorePrimaryOnZero
|
||||
if (videoData.OpenGLOSX.Context)
|
||||
{
|
||||
if ((NSOpenGLContext*)videoData.OpenGLOSX.Context != [NSOpenGLContext currentContext])
|
||||
|
@ -1915,7 +1915,7 @@ inline void COpenGLExtensionHandler::extGlUniform1uiv(GLint loc, GLsizei count,
|
||||
#ifdef _IRR_OPENGL_USE_EXTPOINTER_
|
||||
if (pGlUniform1uiv)
|
||||
pGlUniform1uiv(loc, count, v);
|
||||
#else
|
||||
#elif defined(GL_VERSION_3_0)
|
||||
glUniform1uiv(loc, count, v);
|
||||
#endif
|
||||
}
|
||||
@ -1925,7 +1925,7 @@ inline void COpenGLExtensionHandler::extGlUniform2uiv(GLint loc, GLsizei count,
|
||||
#ifdef _IRR_OPENGL_USE_EXTPOINTER_
|
||||
if (pGlUniform2uiv)
|
||||
pGlUniform2uiv(loc, count, v);
|
||||
#else
|
||||
#elif defined(GL_VERSION_3_0)
|
||||
glUniform2uiv(loc, count, v);
|
||||
#endif
|
||||
}
|
||||
@ -1935,7 +1935,7 @@ inline void COpenGLExtensionHandler::extGlUniform3uiv(GLint loc, GLsizei count,
|
||||
#ifdef _IRR_OPENGL_USE_EXTPOINTER_
|
||||
if (pGlUniform3uiv)
|
||||
pGlUniform3uiv(loc, count, v);
|
||||
#else
|
||||
#elif defined(GL_VERSION_3_0)
|
||||
glUniform3uiv(loc, count, v);
|
||||
#endif
|
||||
}
|
||||
@ -1945,7 +1945,7 @@ inline void COpenGLExtensionHandler::extGlUniform4uiv(GLint loc, GLsizei count,
|
||||
#ifdef _IRR_OPENGL_USE_EXTPOINTER_
|
||||
if (pGlUniform4uiv)
|
||||
pGlUniform4uiv(loc, count, v);
|
||||
#else
|
||||
#elif defined(GL_VERSION_3_0)
|
||||
glUniform4uiv(loc, count, v);
|
||||
#endif
|
||||
}
|
||||
@ -2867,7 +2867,7 @@ inline void COpenGLExtensionHandler::extGlTextureSubImage2D(GLuint texture, GLen
|
||||
#ifdef _IRR_OPENGL_USE_EXTPOINTER_
|
||||
if (pGlTextureSubImage2D)
|
||||
pGlTextureSubImage2D(texture, level, xoffset, yoffset,width, height,format, type, pixels);
|
||||
#else
|
||||
#elif defined(GL_VERSION_4_5)
|
||||
glTextureSubImage2D(texture, level, xoffset, yoffset,width, height,format, type, pixels);
|
||||
#endif // _IRR_OPENGL_USE_EXTPOINTER_
|
||||
}
|
||||
@ -2876,7 +2876,7 @@ inline void COpenGLExtensionHandler::extGlTextureSubImage2D(GLuint texture, GLen
|
||||
#ifdef _IRR_OPENGL_USE_EXTPOINTER_
|
||||
if (pGlTextureSubImage2DEXT)
|
||||
pGlTextureSubImage2DEXT(texture, target, level, xoffset, yoffset,width, height,format, type, pixels);
|
||||
#else
|
||||
#elif defined(GL_EXT_direct_state_access)
|
||||
glTextureSubImage2DEXT(texture, target, level, xoffset, yoffset,width, height,format, type, pixels);
|
||||
#endif // _IRR_OPENGL_USE_EXTPOINTER_
|
||||
}
|
||||
@ -2885,15 +2885,23 @@ inline void COpenGLExtensionHandler::extGlTextureSubImage2D(GLuint texture, GLen
|
||||
GLint bound;
|
||||
switch (target)
|
||||
{
|
||||
#ifdef GL_VERSION_3_0
|
||||
case GL_TEXTURE_1D_ARRAY:
|
||||
glGetIntegerv(GL_TEXTURE_BINDING_1D_ARRAY, &bound);
|
||||
break;
|
||||
#elif GL_EXT_texture_array
|
||||
case GL_TEXTURE_1D_ARRAY_EXT:
|
||||
glGetIntegerv(GL_TEXTURE_BINDING_1D_ARRAY_EXT, &bound);
|
||||
break;
|
||||
#endif
|
||||
case GL_TEXTURE_2D:
|
||||
glGetIntegerv(GL_TEXTURE_BINDING_2D, &bound);
|
||||
break;
|
||||
#ifdef GL_VERSION_3_2
|
||||
case GL_TEXTURE_2D_MULTISAMPLE:
|
||||
glGetIntegerv(GL_TEXTURE_BINDING_2D_MULTISAMPLE, &bound);
|
||||
break;
|
||||
#endif
|
||||
case GL_TEXTURE_CUBE_MAP_NEGATIVE_X:
|
||||
case GL_TEXTURE_CUBE_MAP_NEGATIVE_Y:
|
||||
case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z:
|
||||
@ -2921,7 +2929,7 @@ inline void COpenGLExtensionHandler::extGlTextureStorage2D(GLuint texture, GLenu
|
||||
#ifdef _IRR_OPENGL_USE_EXTPOINTER_
|
||||
if (pGlTextureStorage2D)
|
||||
pGlTextureStorage2D(texture,levels,internalformat,width,height);
|
||||
#else
|
||||
#elif defined(GL_VERSION_4_5)
|
||||
glTextureStorage2D(texture,levels,internalformat,width,height);
|
||||
#endif // _IRR_OPENGL_USE_EXTPOINTER_
|
||||
}
|
||||
@ -2930,22 +2938,29 @@ inline void COpenGLExtensionHandler::extGlTextureStorage2D(GLuint texture, GLenu
|
||||
#ifdef _IRR_OPENGL_USE_EXTPOINTER_
|
||||
if (pGlTextureStorage2DEXT)
|
||||
pGlTextureStorage2DEXT(texture,target,levels,internalformat,width,height);
|
||||
#else
|
||||
#elif defined(GL_EXT_direct_state_access)
|
||||
glTextureStorage2DEXT(texture,target,levels,internalformat,width,height);
|
||||
#endif // _IRR_OPENGL_USE_EXTPOINTER_
|
||||
}
|
||||
#ifdef _IRR_OPENGL_USE_EXTPOINTER_
|
||||
else if (pGlTexStorage2D)
|
||||
#else
|
||||
|
||||
#if defined(GL_VERSION_4_2) || defined(_IRR_OPENGL_USE_EXTPOINTER_)
|
||||
else
|
||||
#ifdef _IRR_OPENGL_USE_EXTPOINTER_
|
||||
if (pGlTexStorage2D)
|
||||
#endif // _IRR_OPENGL_USE_EXTPOINTER_
|
||||
{
|
||||
GLint bound;
|
||||
switch (target)
|
||||
{
|
||||
#ifdef GL_VERSION_3_0
|
||||
case GL_TEXTURE_1D_ARRAY:
|
||||
glGetIntegerv(GL_TEXTURE_BINDING_1D_ARRAY, &bound);
|
||||
break;
|
||||
#elif GL_EXT_texture_array
|
||||
case GL_TEXTURE_1D_ARRAY_EXT:
|
||||
glGetIntegerv(GL_TEXTURE_BINDING_1D_ARRAY_EXT, &bound);
|
||||
break;
|
||||
#endif
|
||||
case GL_TEXTURE_2D:
|
||||
glGetIntegerv(GL_TEXTURE_BINDING_2D, &bound);
|
||||
break;
|
||||
@ -2966,6 +2981,7 @@ inline void COpenGLExtensionHandler::extGlTextureStorage2D(GLuint texture, GLenu
|
||||
#endif // _IRR_OPENGL_USE_EXTPOINTER_
|
||||
glBindTexture(target, bound);
|
||||
}
|
||||
#endif // GL_VERSION_4_2 || _IRR_OPENGL_USE_EXTPOINTER_
|
||||
}
|
||||
|
||||
inline void COpenGLExtensionHandler::extGlTextureStorage3D(GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth)
|
||||
@ -2975,7 +2991,7 @@ inline void COpenGLExtensionHandler::extGlTextureStorage3D(GLuint texture, GLenu
|
||||
#ifdef _IRR_OPENGL_USE_EXTPOINTER_
|
||||
if (pGlTextureStorage3D)
|
||||
pGlTextureStorage3D(texture,levels,internalformat,width,height,depth);
|
||||
#else
|
||||
#elif defined(GL_VERSION_4_5)
|
||||
glTextureStorage3D(texture,levels,internalformat,width,height,depth);
|
||||
#endif // _IRR_OPENGL_USE_EXTPOINTER_
|
||||
}
|
||||
@ -2984,28 +3000,40 @@ inline void COpenGLExtensionHandler::extGlTextureStorage3D(GLuint texture, GLenu
|
||||
#ifdef _IRR_OPENGL_USE_EXTPOINTER_
|
||||
if (pGlTextureStorage3DEXT)
|
||||
pGlTextureStorage3DEXT(texture,target,levels,internalformat,width,height,depth);
|
||||
#else
|
||||
#elif defined(GL_EXT_direct_state_access)
|
||||
glTextureStorage3DEXT(texture,target,levels,internalformat,width,height,depth);
|
||||
#endif // _IRR_OPENGL_USE_EXTPOINTER_
|
||||
}
|
||||
#ifdef _IRR_OPENGL_USE_EXTPOINTER_
|
||||
else if (pGlTexStorage3D)
|
||||
#else
|
||||
#if defined(GL_VERSION_4_2) || defined(_IRR_OPENGL_USE_EXTPOINTER_)
|
||||
else
|
||||
#endif // _IRR_OPENGL_USE_EXTPOINTER_
|
||||
#ifdef _IRR_OPENGL_USE_EXTPOINTER_
|
||||
if (pGlTexStorage3D)
|
||||
#endif // _IRR_OPENGL_USE_EX TPOINTER_
|
||||
{
|
||||
GLint bound;
|
||||
switch (target)
|
||||
{
|
||||
#ifdef GL_VERSION_3_0
|
||||
case GL_TEXTURE_2D_ARRAY:
|
||||
glGetIntegerv(GL_TEXTURE_BINDING_2D_ARRAY, &bound);
|
||||
break;
|
||||
#elif GL_EXT_texture_array
|
||||
case GL_TEXTURE_2D_ARRAY_EXT:
|
||||
glGetIntegerv(GL_TEXTURE_BINDING_2D_ARRAY_EXT, &bound);
|
||||
break;
|
||||
#endif
|
||||
case GL_TEXTURE_3D:
|
||||
glGetIntegerv(GL_TEXTURE_BINDING_3D, &bound);
|
||||
break;
|
||||
#ifdef GL_VERSION_4_0
|
||||
case GL_TEXTURE_CUBE_MAP_ARRAY:
|
||||
glGetIntegerv(GL_TEXTURE_BINDING_CUBE_MAP_ARRAY, &bound);
|
||||
break;
|
||||
#elif defined(GL_ARB_texture_cube_map_array)
|
||||
case GL_TEXTURE_CUBE_MAP_ARRAY_ARB:
|
||||
glGetIntegerv(GL_TEXTURE_BINDING_CUBE_MAP_ARRAY_ARB, &bound);
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
return;
|
||||
}
|
||||
@ -3017,6 +3045,7 @@ inline void COpenGLExtensionHandler::extGlTextureStorage3D(GLuint texture, GLenu
|
||||
#endif // _IRR_OPENGL_USE_EXTPOINTER_
|
||||
glBindTexture(target, bound);
|
||||
}
|
||||
#endif // GL_VERSION_4_2 || _IRR_OPENGL_USE_EXTPOINTER_
|
||||
}
|
||||
|
||||
inline void COpenGLExtensionHandler::extGlGetTextureImage(GLuint texture, GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, void* pixels)
|
||||
@ -3026,7 +3055,7 @@ inline void COpenGLExtensionHandler::extGlGetTextureImage(GLuint texture, GLenum
|
||||
#ifdef _IRR_OPENGL_USE_EXTPOINTER_
|
||||
if (pGlGetTextureImage)
|
||||
pGlGetTextureImage(texture,level,format,type,bufSize,pixels);
|
||||
#else
|
||||
#elif defined(GL_VERSION_4_5)
|
||||
glGetTextureImage(texture,level,format,type,bufSize,pixels);
|
||||
#endif // _IRR_OPENGL_USE_EXTPOINTER_
|
||||
}
|
||||
@ -3035,7 +3064,7 @@ inline void COpenGLExtensionHandler::extGlGetTextureImage(GLuint texture, GLenum
|
||||
#ifdef _IRR_OPENGL_USE_EXTPOINTER_
|
||||
if (pGlGetTextureImageEXT)
|
||||
pGlGetTextureImageEXT(texture,target,level,format,type,pixels);
|
||||
#else
|
||||
#elif defined(GL_EXT_direct_state_access)
|
||||
glGetTextureImageEXT(texture,target,level,format,type,pixels);
|
||||
#endif // _IRR_OPENGL_USE_EXTPOINTER_
|
||||
}
|
||||
@ -3044,15 +3073,27 @@ inline void COpenGLExtensionHandler::extGlGetTextureImage(GLuint texture, GLenum
|
||||
GLint bound;
|
||||
switch (target)
|
||||
{
|
||||
#ifdef GL_VERSION_3_0
|
||||
case GL_TEXTURE_2D_ARRAY:
|
||||
glGetIntegerv(GL_TEXTURE_BINDING_2D_ARRAY, &bound);
|
||||
break;
|
||||
#elif GL_EXT_texture_array
|
||||
case GL_TEXTURE_2D_ARRAY_EXT:
|
||||
glGetIntegerv(GL_TEXTURE_BINDING_2D_ARRAY_EXT, &bound);
|
||||
break;
|
||||
#endif
|
||||
case GL_TEXTURE_3D:
|
||||
glGetIntegerv(GL_TEXTURE_BINDING_3D, &bound);
|
||||
break;
|
||||
#ifdef GL_VERSION_4_0
|
||||
case GL_TEXTURE_CUBE_MAP_ARRAY:
|
||||
glGetIntegerv(GL_TEXTURE_BINDING_CUBE_MAP_ARRAY, &bound);
|
||||
break;
|
||||
#elif defined(GL_ARB_texture_cube_map_array)
|
||||
case GL_TEXTURE_CUBE_MAP_ARRAY_ARB:
|
||||
glGetIntegerv(GL_TEXTURE_BINDING_CUBE_MAP_ARRAY_ARB, &bound);
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
return;
|
||||
}
|
||||
@ -3064,6 +3105,7 @@ inline void COpenGLExtensionHandler::extGlGetTextureImage(GLuint texture, GLenum
|
||||
|
||||
inline void COpenGLExtensionHandler::extGlNamedFramebufferTexture(GLuint framebuffer, GLenum attachment, GLuint texture, GLint level)
|
||||
{
|
||||
#ifdef _IRR_OPENGL_USE_EXTPOINTER_
|
||||
if (!needsDSAFramebufferHack)
|
||||
{
|
||||
if (Version>=405 || FeatureAvailable[IRR_ARB_direct_state_access])
|
||||
@ -3086,6 +3128,7 @@ inline void COpenGLExtensionHandler::extGlNamedFramebufferTexture(GLuint framebu
|
||||
pGlFramebufferTexture(GL_FRAMEBUFFER,attachment,texture,level);
|
||||
if (bound!=framebuffer)
|
||||
pGlBindFramebuffer(GL_FRAMEBUFFER,bound);
|
||||
#endif
|
||||
}
|
||||
|
||||
inline void COpenGLExtensionHandler::extGlTextureParameteri(GLuint texture, GLenum pname, GLint param)
|
||||
@ -3129,7 +3172,7 @@ inline void COpenGLExtensionHandler::extGlCreateTextures(GLenum target, GLsizei
|
||||
pGlCreateTextures(target,n,textures);
|
||||
else if (textures)
|
||||
memset(textures,0,n*sizeof(GLuint));
|
||||
#else
|
||||
#elif defined(GL_VERSION_4_5)
|
||||
glCreateTextures(target,n,textures);
|
||||
#endif // _IRR_OPENGL_USE_EXTPOINTER_
|
||||
}
|
||||
@ -3141,6 +3184,7 @@ inline void COpenGLExtensionHandler::extGlCreateTextures(GLenum target, GLsizei
|
||||
|
||||
inline void COpenGLExtensionHandler::extGlCreateFramebuffers(GLsizei n, GLuint* framebuffers)
|
||||
{
|
||||
#ifdef _IRR_OPENGL_USE_EXTPOINTER_
|
||||
if (!needsDSAFramebufferHack)
|
||||
{
|
||||
if (Version>=405)
|
||||
@ -3151,21 +3195,49 @@ inline void COpenGLExtensionHandler::extGlCreateFramebuffers(GLsizei n, GLuint*
|
||||
}
|
||||
|
||||
pGlGenFramebuffers(n, framebuffers);
|
||||
#endif
|
||||
}
|
||||
|
||||
inline void COpenGLExtensionHandler::extGlBindTextures(GLuint first, GLsizei count, const GLuint *textures, const GLenum* targets)
|
||||
{
|
||||
const GLenum supportedTargets[] = { GL_TEXTURE_1D,GL_TEXTURE_2D, // GL 1.x
|
||||
GL_TEXTURE_3D,GL_TEXTURE_RECTANGLE,GL_TEXTURE_CUBE_MAP, // GL 2.x
|
||||
GL_TEXTURE_1D_ARRAY,GL_TEXTURE_2D_ARRAY,GL_TEXTURE_BUFFER, // GL 3.x
|
||||
GL_TEXTURE_CUBE_MAP_ARRAY,GL_TEXTURE_2D_MULTISAMPLE,GL_TEXTURE_2D_MULTISAMPLE_ARRAY}; // GL 4.x
|
||||
const GLenum supportedTargets[] = { GL_TEXTURE_1D, GL_TEXTURE_2D // GL 1.x
|
||||
,GL_TEXTURE_3D // GL 2.x
|
||||
#ifdef GL_VERSION_3_1
|
||||
,GL_TEXTURE_RECTANGLE
|
||||
#elif defined(GL_ARB_texture_rectangle)
|
||||
,GL_TEXTURE_RECTANGLE_ARB
|
||||
#elif defined(GL_NV_texture_rectangle)
|
||||
,GL_TEXTURE_RECTANGLE_NV
|
||||
#endif
|
||||
,GL_TEXTURE_CUBE_MAP
|
||||
#ifdef GL_VERSION_3_0
|
||||
,GL_TEXTURE_1D_ARRAY,GL_TEXTURE_2D_ARRAY // GL 3.x
|
||||
#elif GL_EXT_texture_array
|
||||
,GL_TEXTURE_1D_ARRAY_EXT,GL_TEXTURE_2D_ARRAY_EXT
|
||||
#endif
|
||||
#ifdef GL_VERSION_3_1
|
||||
,GL_TEXTURE_BUFFER
|
||||
#elif defined(GL_ARB_texture_buffer_object)
|
||||
,GL_TEXTURE_BUFFER_ARB
|
||||
#elif defined(GL_EXT_texture_buffer_object)
|
||||
,GL_TEXTURE_BUFFER_EXT
|
||||
#endif
|
||||
#ifdef GL_VERSION_4_0
|
||||
,GL_TEXTURE_CUBE_MAP_ARRAY // GL 4.x
|
||||
#elif defined(GL_ARB_texture_cube_map_array)
|
||||
,GL_TEXTURE_CUBE_MAP_ARRAY_ARB
|
||||
#endif
|
||||
#ifdef GL_VERSION_3_2
|
||||
,GL_TEXTURE_2D_MULTISAMPLE,GL_TEXTURE_2D_MULTISAMPLE_ARRAY
|
||||
#endif
|
||||
};
|
||||
|
||||
if (Version>=404||FeatureAvailable[IRR_ARB_multi_bind])
|
||||
{
|
||||
#ifdef _IRR_OPENGL_USE_EXTPOINTER_
|
||||
if (pGlBindTextures)
|
||||
pGlBindTextures(first,count,textures);
|
||||
#else
|
||||
#elif defined(GL_VERSION_4_4)
|
||||
glBindTextures(first,count,textures);
|
||||
#endif // _IRR_OPENGL_USE_EXTPOINTER_
|
||||
}
|
||||
@ -3201,7 +3273,7 @@ inline void COpenGLExtensionHandler::extGlGenerateTextureMipmap(GLuint texture,
|
||||
#ifdef _IRR_OPENGL_USE_EXTPOINTER_
|
||||
if (pGlGenerateTextureMipmap)
|
||||
pGlGenerateTextureMipmap(texture);
|
||||
#else
|
||||
#elif defined(GL_VERSION_4_5)
|
||||
glGenerateTextureMipmap(texture);
|
||||
#endif // _IRR_OPENGL_USE_EXTPOINTER_
|
||||
}
|
||||
@ -3210,7 +3282,7 @@ inline void COpenGLExtensionHandler::extGlGenerateTextureMipmap(GLuint texture,
|
||||
#ifdef _IRR_OPENGL_USE_EXTPOINTER_
|
||||
if (pGlGenerateTextureMipmapEXT)
|
||||
pGlGenerateTextureMipmapEXT(texture,target);
|
||||
#else
|
||||
#elif defined(GL_EXT_direct_state_access)
|
||||
glGenerateTextureMipmapEXT(texture,target);
|
||||
#endif // _IRR_OPENGL_USE_EXTPOINTER_
|
||||
}
|
||||
@ -3226,33 +3298,63 @@ inline void COpenGLExtensionHandler::extGlGenerateTextureMipmap(GLuint texture,
|
||||
case GL_TEXTURE_1D:
|
||||
glGetIntegerv(GL_TEXTURE_BINDING_1D, &bound);
|
||||
break;
|
||||
#ifdef GL_VERSION_3_0
|
||||
case GL_TEXTURE_1D_ARRAY:
|
||||
glGetIntegerv(GL_TEXTURE_BINDING_1D_ARRAY, &bound);
|
||||
break;
|
||||
#elif GL_EXT_texture_array
|
||||
case GL_TEXTURE_1D_ARRAY_EXT:
|
||||
glGetIntegerv(GL_TEXTURE_BINDING_1D_ARRAY_EXT, &bound);
|
||||
break;
|
||||
#endif
|
||||
case GL_TEXTURE_2D:
|
||||
glGetIntegerv(GL_TEXTURE_BINDING_2D, &bound);
|
||||
break;
|
||||
#ifdef GL_VERSION_3_0
|
||||
case GL_TEXTURE_2D_ARRAY:
|
||||
glGetIntegerv(GL_TEXTURE_BINDING_2D_ARRAY, &bound);
|
||||
break;
|
||||
#elif GL_EXT_texture_array
|
||||
case GL_TEXTURE_2D_ARRAY_EXT:
|
||||
glGetIntegerv(GL_TEXTURE_BINDING_2D_ARRAY_EXT, &bound);
|
||||
break;
|
||||
#endif
|
||||
#ifdef GL_VERSION_3_2
|
||||
case GL_TEXTURE_2D_MULTISAMPLE:
|
||||
glGetIntegerv(GL_TEXTURE_BINDING_2D_MULTISAMPLE, &bound);
|
||||
break;
|
||||
case GL_TEXTURE_2D_MULTISAMPLE_ARRAY:
|
||||
glGetIntegerv(GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY, &bound);
|
||||
break;
|
||||
#endif
|
||||
case GL_TEXTURE_3D:
|
||||
glGetIntegerv(GL_TEXTURE_BINDING_3D, &bound);
|
||||
break;
|
||||
#ifdef GL_VERSION_3_1
|
||||
case GL_TEXTURE_BUFFER:
|
||||
glGetIntegerv(GL_TEXTURE_BINDING_BUFFER, &bound);
|
||||
break;
|
||||
#elif defined(GL_ARB_texture_buffer_object)
|
||||
case GL_TEXTURE_BUFFER_ARB:
|
||||
glGetIntegerv(GL_TEXTURE_BINDING_BUFFER_ARB, &bound);
|
||||
break;
|
||||
#elif defined(GL_EXT_texture_buffer_object)
|
||||
case GL_TEXTURE_BUFFER_EXT:
|
||||
glGetIntegerv(GL_TEXTURE_BINDING_BUFFER_EXT, &bound);
|
||||
break;
|
||||
#endif
|
||||
case GL_TEXTURE_CUBE_MAP:
|
||||
glGetIntegerv(GL_TEXTURE_BINDING_CUBE_MAP, &bound);
|
||||
break;
|
||||
#ifdef GL_VERSION_4_0
|
||||
case GL_TEXTURE_CUBE_MAP_ARRAY:
|
||||
glGetIntegerv(GL_TEXTURE_BINDING_CUBE_MAP_ARRAY, &bound);
|
||||
break;
|
||||
#elif defined(GL_ARB_texture_cube_map_array)
|
||||
case GL_TEXTURE_CUBE_MAP_ARRAY_ARB:
|
||||
glGetIntegerv(GL_TEXTURE_BINDING_CUBE_MAP_ARRAY_ARB, &bound);
|
||||
break;
|
||||
#endif
|
||||
case GL_TEXTURE_RECTANGLE:
|
||||
glGetIntegerv(GL_TEXTURE_BINDING_RECTANGLE, &bound);
|
||||
break;
|
||||
|
@ -736,6 +736,7 @@ bool COpenGLSLMaterialRenderer::setPixelShaderConstant(s32 index, const u32* int
|
||||
case GL_UNSIGNED_INT:
|
||||
Driver->extGlUniform1uiv(UniformInfo[index].location, count, reinterpret_cast<const GLuint*>(ints));
|
||||
break;
|
||||
#if defined(GL_VERSION_3_0)
|
||||
case GL_UNSIGNED_INT_VEC2:
|
||||
Driver->extGlUniform2uiv(UniformInfo[index].location, count/2, reinterpret_cast<const GLuint*>(ints));
|
||||
break;
|
||||
@ -745,6 +746,7 @@ bool COpenGLSLMaterialRenderer::setPixelShaderConstant(s32 index, const u32* int
|
||||
case GL_UNSIGNED_INT_VEC4:
|
||||
Driver->extGlUniform4uiv(UniformInfo[index].location, count/4, reinterpret_cast<const GLuint*>(ints));
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
status = false;
|
||||
break;
|
||||
|
@ -613,6 +613,8 @@
|
||||
5E79089B1C10FEF900DFE7FE /* CB3DMeshWriter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5E7908981C10FE4A00DFE7FE /* CB3DMeshWriter.cpp */; };
|
||||
5E8570BC1B7F9AC400B267D2 /* CIrrDeviceConsole.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5E8570BA1B7F9AC400B267D2 /* CIrrDeviceConsole.cpp */; };
|
||||
5E9573D71C18E9E600C27989 /* CEAGLManager.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5E9573D61C18E9E600C27989 /* CEAGLManager.mm */; };
|
||||
8493BC02249DEBB30092813E /* IOctreeSceneNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 8493BC01249DEBB20092813E /* IOctreeSceneNode.h */; };
|
||||
8493BC04249DED3F0092813E /* IMemoryReadFile.h in Headers */ = {isa = PBXBuildFile; fileRef = 8493BC03249DED3F0092813E /* IMemoryReadFile.h */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
@ -1366,6 +1368,8 @@
|
||||
5E9573D31C18E9B300C27989 /* CEAGLManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CEAGLManager.h; sourceTree = "<group>"; };
|
||||
5E9573D61C18E9E600C27989 /* CEAGLManager.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = CEAGLManager.mm; sourceTree = "<group>"; };
|
||||
5EC24F5E1B8B861200DCA615 /* exampleHelper.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = exampleHelper.h; path = ../../include/exampleHelper.h; sourceTree = "<group>"; };
|
||||
8493BC01249DEBB20092813E /* IOctreeSceneNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IOctreeSceneNode.h; path = ../../include/IOctreeSceneNode.h; sourceTree = "<group>"; };
|
||||
8493BC03249DED3F0092813E /* IMemoryReadFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IMemoryReadFile.h; path = ../../include/IMemoryReadFile.h; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
@ -1508,6 +1512,7 @@
|
||||
5E34C7401B7F4AFC00F212E8 /* IMeshTextureLoader.h */,
|
||||
5E34C7411B7F4AFC00F212E8 /* IMeshWriter.h */,
|
||||
5E34C7421B7F4AFC00F212E8 /* IMetaTriangleSelector.h */,
|
||||
8493BC01249DEBB20092813E /* IOctreeSceneNode.h */,
|
||||
5E34C7441B7F4AFC00F212E8 /* IParticleAffector.h */,
|
||||
5E34C7451B7F4AFC00F212E8 /* IParticleAnimatedMeshSceneNodeEmitter.h */,
|
||||
5E34C7461B7F4AFC00F212E8 /* IParticleAttractionAffector.h */,
|
||||
@ -1565,6 +1570,7 @@
|
||||
5E34C7101B7F4AFC00F212E8 /* IFileArchive.h */,
|
||||
5E34C7111B7F4AFC00F212E8 /* IFileList.h */,
|
||||
5E34C7121B7F4AFC00F212E8 /* IFileSystem.h */,
|
||||
8493BC03249DED3F0092813E /* IMemoryReadFile.h */,
|
||||
5E34C7551B7F4AFC00F212E8 /* IReadFile.h */,
|
||||
5E34C7631B7F4AFC00F212E8 /* irrXML.h */,
|
||||
5E34C77B1B7F4AFC00F212E8 /* IWriteFile.h */,
|
||||
@ -2445,6 +2451,11 @@
|
||||
isa = PBXHeadersBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
5E8570BD1B7F9AC400B267D2 /* CIrrDeviceConsole.h in Headers */,
|
||||
5E7908961C10EEC000DFE7FE /* COpenGLCommon.h in Headers */,
|
||||
8493BC04249DED3F0092813E /* IMemoryReadFile.h in Headers */,
|
||||
5E7908951C10EEC000DFE7FE /* COpenGLCacheHandler.h in Headers */,
|
||||
8493BC02249DEBB30092813E /* IOctreeSceneNode.h in Headers */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user