diff --git a/irr/include/IRenderTarget.h b/irr/include/IRenderTarget.h index 85b9738dc..d4e5960a2 100644 --- a/irr/include/IRenderTarget.h +++ b/irr/include/IRenderTarget.h @@ -109,11 +109,6 @@ protected: //! Driver type of render target. E_DRIVER_TYPE DriverType; - -private: - // no copying (IReferenceCounted still allows that for reasons which take some time to work around) - IRenderTarget(const IRenderTarget &); - IRenderTarget &operator=(const IRenderTarget &); }; } diff --git a/irr/include/ISceneManager.h b/irr/include/ISceneManager.h index 18521dbe9..7fbc0670c 100644 --- a/irr/include/ISceneManager.h +++ b/irr/include/ISceneManager.h @@ -55,9 +55,6 @@ enum E_SCENE_NODE_RENDER_PASS //! Camera pass. The active view is set up here. The very first pass. ESNRP_CAMERA = 1, - //! In this pass, lights are transformed into camera space and added to the driver - ESNRP_LIGHT = 2, - //! This is used for sky boxes. ESNRP_SKY_BOX = 4, @@ -85,9 +82,6 @@ enum E_SCENE_NODE_RENDER_PASS //! Transparent effect scene nodes, drawn after Transparent nodes. They are sorted from back to front and drawn in that order. ESNRP_TRANSPARENT_EFFECT = 32, - //! Drawn after the solid nodes, before the transparent nodes, the time for drawing shadow volumes - ESNRP_SHADOW = 64, - //! Drawn after transparent effect nodes. For custom gui's. Unsorted (in order nodes registered themselves). ESNRP_GUI = 128 @@ -602,12 +596,6 @@ public: for details. */ virtual ISkinnedMesh *createSkinnedMesh() = 0; - //! Sets ambient color of the scene - virtual void setAmbientLight(const video::SColorf &ambientColor) = 0; - - //! Get ambient color of the scene - virtual const video::SColorf &getAmbientLight() const = 0; - //! Get current render pass. virtual E_SCENE_NODE_RENDER_PASS getCurrentRenderPass() const = 0; diff --git a/irr/include/IVideoDriver.h b/irr/include/IVideoDriver.h index 3d4deace5..ebb39dfd9 100644 --- a/irr/include/IVideoDriver.h +++ b/irr/include/IVideoDriver.h @@ -131,7 +131,6 @@ public: /** The following names can be queried for the given types: MaxTextures (int) The maximum number of simultaneous textures supported by the driver. This can be less than the supported number of textures of the driver. Use _IRR_MATERIAL_MAX_TEXTURES_ to adapt the number. MaxSupportedTextures (int) The maximum number of simultaneous textures supported by the fixed function pipeline of the (hw) driver. The actual supported number of textures supported by the engine can be lower. - MaxLights (int) Number of hardware lights supported in the fixed function pipeline of the driver, typically 6-8. Use light manager or deferred shading for more. MaxAnisotropy (int) Number of anisotropy levels supported for filtering. At least 1, max is typically at 16 or 32. MaxAuxBuffers (int) Special render buffers, which are currently not really usable inside Irrlicht. Only supported by OpenGL MaxMultipleRenderTargets (int) Number of render targets which can be bound simultaneously. Rendering to MRTs is done via shaders. @@ -1110,15 +1109,6 @@ public: //! Get the graphics card vendor name. virtual core::stringc getVendorInfo() = 0; - //! Only used by the engine internally. - /** The ambient color is set in the scene manager, see - scene::ISceneManager::setAmbientLight(). - \param color New color of the ambient light. */ - virtual void setAmbientLight(const SColorf &color) = 0; - - //! Get the global ambient light currently used by the driver - virtual const SColorf &getAmbientLight() const = 0; - //! Only used by the engine internally. /** Passes the global material flag AllowZWriteOnTransparent. Use the SceneManager attribute to set this value from your app. @@ -1128,19 +1118,6 @@ public: //! Get the maximum texture size supported. virtual core::dimension2du getMaxTextureSize() const = 0; - //! Color conversion convenience function - /** Convert an image (as array of pixels) from source to destination - array, thereby converting the color format. The pixel size is - determined by the color formats. - \param sP Pointer to source - \param sF Color format of source - \param sN Number of pixels to convert, both array must be large enough - \param dP Pointer to destination - \param dF Color format of destination - */ - virtual void convertColor(const void *sP, ECOLOR_FORMAT sF, s32 sN, - void *dP, ECOLOR_FORMAT dF) const = 0; - //! Check if the driver supports creating textures with the given color format /** \return True if the format is available, false if not. */ virtual bool queryTextureFormat(ECOLOR_FORMAT format) const = 0; diff --git a/irr/src/CNullDriver.cpp b/irr/src/CNullDriver.cpp index b5da7ef29..efbad7598 100644 --- a/irr/src/CNullDriver.cpp +++ b/irr/src/CNullDriver.cpp @@ -743,19 +743,6 @@ SFrameStats CNullDriver::getFrameStats() const return FrameStats; } -//! Sets the dynamic ambient light color. The default color is -//! (0,0,0,0) which means it is dark. -//! \param color: New color of the ambient light. -void CNullDriver::setAmbientLight(const SColorf &color) -{ - AmbientLight = color; -} - -const SColorf &CNullDriver::getAmbientLight() const -{ - return AmbientLight; -} - //! \return Returns the name of the video driver. Example: In case of the DIRECT3D8 //! driver, it would return "Direct3D8". @@ -1774,21 +1761,5 @@ bool CNullDriver::needsTransparentRenderPass(const irr::video::SMaterial &materi return false; } -//! Color conversion convenience function -/** Convert an image (as array of pixels) from source to destination -array, thereby converting the color format. The pixel size is -determined by the color formats. -\param sP Pointer to source -\param sF Color format of source -\param sN Number of pixels to convert, both array must be large enough -\param dP Pointer to destination -\param dF Color format of destination -*/ -void CNullDriver::convertColor(const void *sP, ECOLOR_FORMAT sF, s32 sN, - void *dP, ECOLOR_FORMAT dF) const -{ - video::CColorConverter::convert_viaFormat(sP, sF, sN, dP, dF); -} - } // end namespace } // end namespace diff --git a/irr/src/CNullDriver.h b/irr/src/CNullDriver.h index 5752b53cd..e772dd8e8 100644 --- a/irr/src/CNullDriver.h +++ b/irr/src/CNullDriver.h @@ -201,14 +201,6 @@ public: //! driver, it would return "Direct3D8.1". const char *getName() const override; - //! Sets the dynamic ambient light color. The default color is - //! (0,0,0,0) which means it is dark. - //! \param color: New color of the ambient light. - void setAmbientLight(const SColorf &color) override; - - //! Get the global ambient light currently used by the driver - const SColorf &getAmbientLight() const override; - //! Adds an external image loader to the engine. void addExternalImageLoader(IImageLoader *loader) override; @@ -559,19 +551,6 @@ public: //! Used by some SceneNodes to check if a material should be rendered in the transparent render pass bool needsTransparentRenderPass(const irr::video::SMaterial &material) const override; - //! Color conversion convenience function - /** Convert an image (as array of pixels) from source to destination - array, thereby converting the color format. The pixel size is - determined by the color formats. - \param sP Pointer to source - \param sF Color format of source - \param sN Number of pixels to convert, both array must be large enough - \param dP Pointer to destination - \param dF Color format of destination - */ - virtual void convertColor(const void *sP, ECOLOR_FORMAT sF, s32 sN, - void *dP, ECOLOR_FORMAT dF) const override; - protected: //! deletes all textures void deleteAllTextures(); @@ -759,8 +738,6 @@ protected: bool AllowZWriteOnTransparent; bool FeatureEnabled[video::EVDF_COUNT]; - - SColorf AmbientLight; }; } // end namespace video diff --git a/irr/src/COpenGLCoreTexture.h b/irr/src/COpenGLCoreTexture.h index a37562543..d8a813d5d 100644 --- a/irr/src/COpenGLCoreTexture.h +++ b/irr/src/COpenGLCoreTexture.h @@ -170,6 +170,17 @@ public: return; } +#ifndef IRR_COMPILE_GL_COMMON + // On GLES 3.0 we must use sized internal formats for textures in certain + // cases (e.g. with ETT_2D_MS). However ECF_A8R8G8B8 is mapped to GL_BGRA + // (an unsized format). + // Since we don't upload to RTT we can safely pick a different combo that works. + if (InternalFormat == GL_BGRA && Driver->Version.Major >= 3) { + InternalFormat = GL_RGBA8; + PixelFormat = GL_RGBA; + } +#endif + #ifdef _DEBUG char lbuf[100]; snprintf_irr(lbuf, sizeof(lbuf), diff --git a/irr/src/COpenGLDriver.cpp b/irr/src/COpenGLDriver.cpp index 07d7f7bb1..f7c0be7dd 100644 --- a/irr/src/COpenGLDriver.cpp +++ b/irr/src/COpenGLDriver.cpp @@ -122,7 +122,6 @@ bool COpenGLDriver::genericDriverInit() os::Printer::log("GLSL not available.", ELL_INFORMATION); DriverAttributes->setAttribute("MaxTextures", (s32)Feature.MaxTextureUnits); DriverAttributes->setAttribute("MaxSupportedTextures", (s32)Feature.MaxTextureUnits); - DriverAttributes->setAttribute("MaxLights", MaxLights); DriverAttributes->setAttribute("MaxAnisotropy", MaxAnisotropy); DriverAttributes->setAttribute("MaxAuxBuffers", MaxAuxBuffers); DriverAttributes->setAttribute("MaxMultipleRenderTargets", (s32)Feature.MultipleRenderTarget); @@ -139,13 +138,6 @@ bool COpenGLDriver::genericDriverInit() for (i = 0; i < ETS_COUNT; ++i) setTransform(static_cast(i), core::IdentityMatrix); - setAmbientLight(SColorf(0.0f, 0.0f, 0.0f, 0.0f)); -#ifdef GL_EXT_separate_specular_color - if (FeatureAvailable[IRR_EXT_separate_specular_color]) - glLightModeli(GL_LIGHT_MODEL_COLOR_CONTROL, GL_SEPARATE_SPECULAR_COLOR); -#endif - glLightModeli(GL_LIGHT_MODEL_LOCAL_VIEWER, 1); - // This is a fast replacement for NORMALIZE_NORMALS // if ((Version>101) || FeatureAvailable[IRR_EXT_rescale_normal]) // glEnable(GL_RESCALE_NORMAL_EXT); @@ -2420,16 +2412,6 @@ const char *COpenGLDriver::getName() const return Name.c_str(); } -//! Sets the dynamic ambient light color. The default color is -//! (0,0,0,0) which means it is dark. -//! \param color: New color of the ambient light. -void COpenGLDriver::setAmbientLight(const SColorf &color) -{ - CNullDriver::setAmbientLight(color); - GLfloat data[4] = {color.r, color.g, color.b, color.a}; - glLightModelfv(GL_LIGHT_MODEL_AMBIENT, data); -} - // this code was sent in by Oliver Klems, thank you! (I modified the glViewport // method just a bit. void COpenGLDriver::setViewPort(const core::rect &area) diff --git a/irr/src/COpenGLDriver.h b/irr/src/COpenGLDriver.h index 126f7aadc..aa457b8ee 100644 --- a/irr/src/COpenGLDriver.h +++ b/irr/src/COpenGLDriver.h @@ -182,11 +182,6 @@ public: //! driver, it would return "Direct3D8.1". const char *getName() const override; - //! Sets the dynamic ambient light color. The default color is - //! (0,0,0,0) which means it is dark. - //! \param color: New color of the ambient light. - void setAmbientLight(const SColorf &color) override; - //! sets a viewport void setViewPort(const core::rect &area) override; diff --git a/irr/src/COpenGLExtensionHandler.cpp b/irr/src/COpenGLExtensionHandler.cpp index 4c7fe69b7..7eb4252a6 100644 --- a/irr/src/COpenGLExtensionHandler.cpp +++ b/irr/src/COpenGLExtensionHandler.cpp @@ -19,7 +19,7 @@ namespace video bool COpenGLExtensionHandler::needsDSAFramebufferHack = true; COpenGLExtensionHandler::COpenGLExtensionHandler() : - StencilBuffer(false), TextureCompressionExtension(false), MaxLights(1), + StencilBuffer(false), TextureCompressionExtension(false), MaxAnisotropy(1), MaxAuxBuffers(0), MaxIndices(65535), MaxTextureSize(1), MaxGeometryVerticesOut(0), MaxTextureLODBias(0.f), Version(0), ShaderLanguageVersion(0), @@ -399,8 +399,6 @@ void COpenGLExtensionHandler::initExtensions(video::IContextManager *cmgr, bool Feature.MaxTextureUnits = core::max_(Feature.MaxTextureUnits, static_cast(num)); } #endif - glGetIntegerv(GL_MAX_LIGHTS, &num); - MaxLights = static_cast(num); #ifdef GL_EXT_texture_filter_anisotropic if (FeatureAvailable[IRR_EXT_texture_filter_anisotropic]) { glGetIntegerv(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, &num); diff --git a/irr/src/COpenGLExtensionHandler.h b/irr/src/COpenGLExtensionHandler.h index cdff911b9..a1754a328 100644 --- a/irr/src/COpenGLExtensionHandler.h +++ b/irr/src/COpenGLExtensionHandler.h @@ -1015,8 +1015,6 @@ public: bool TextureCompressionExtension; // Some non-boolean properties - //! Maximum hardware lights supported - u8 MaxLights; //! Maximal Anisotropy u8 MaxAnisotropy; //! Number of auxiliary buffers diff --git a/irr/src/CSceneManager.cpp b/irr/src/CSceneManager.cpp index d75abc284..04b3ec313 100644 --- a/irr/src/CSceneManager.cpp +++ b/irr/src/CSceneManager.cpp @@ -41,7 +41,7 @@ CSceneManager::CSceneManager(video::IVideoDriver *driver, ISceneNode(0, 0), Driver(driver), CursorControl(cursorControl), - ActiveCamera(0), ShadowColor(150, 0, 0, 0), AmbientLight(0, 0, 0, 0), Parameters(0), + ActiveCamera(0), Parameters(0), MeshCache(cache), CurrentRenderPass(ESNRP_NONE) { #ifdef _DEBUG @@ -445,9 +445,6 @@ u32 CSceneManager::registerNodeForRendering(ISceneNode *node, E_SCENE_NODE_RENDE taken = 1; } - // as of yet unused - case ESNRP_LIGHT: - case ESNRP_SHADOW: case ESNRP_NONE: // ignore this one break; } @@ -775,18 +772,6 @@ ISceneManager *CSceneManager::createNewSceneManager(bool cloneContent) return manager; } -//! Sets ambient color of the scene -void CSceneManager::setAmbientLight(const video::SColorf &ambientColor) -{ - AmbientLight = ambientColor; -} - -//! Returns ambient color of the scene -const video::SColorf &CSceneManager::getAmbientLight() const -{ - return AmbientLight; -} - //! Get a skinned mesh, which is not available as header-only code ISkinnedMesh *CSceneManager::createSkinnedMesh() { diff --git a/irr/src/CSceneManager.h b/irr/src/CSceneManager.h index 4ef6d64b0..0f1b2c716 100644 --- a/irr/src/CSceneManager.h +++ b/irr/src/CSceneManager.h @@ -170,12 +170,6 @@ public: //! Get a skinned mesh, which is not available as header-only code ISkinnedMesh *createSkinnedMesh() override; - //! Sets ambient color of the scene - void setAmbientLight(const video::SColorf &ambientColor) override; - - //! Returns ambient color of the scene - const video::SColorf &getAmbientLight() const override; - //! Get current render time. E_SCENE_NODE_RENDER_PASS getCurrentRenderPass() const override { return CurrentRenderPass; } @@ -291,9 +285,6 @@ private: ICameraSceneNode *ActiveCamera; core::vector3df camWorldPos; // Position of camera for transparent nodes. - video::SColor ShadowColor; - video::SColorf AmbientLight; - //! String parameters // NOTE: Attributes are slow and should only be used for debug-info and not in release io::CAttributes *Parameters; diff --git a/irr/src/OpenGL/Common.h b/irr/src/OpenGL/Common.h index 84b2ec3e4..75c213bb0 100644 --- a/irr/src/OpenGL/Common.h +++ b/irr/src/OpenGL/Common.h @@ -40,7 +40,7 @@ typedef COpenGLCoreTexture COpenGL3Texture; typedef COpenGLCoreRenderTarget COpenGL3RenderTarget; typedef COpenGLCoreCacheHandler COpenGL3CacheHandler; -enum class OpenGLSpec : u8 +enum OpenGLSpec : u8 { Core, Compat, diff --git a/irr/src/OpenGL/Driver.cpp b/irr/src/OpenGL/Driver.cpp index ee272ceee..da19b0bae 100644 --- a/irr/src/OpenGL/Driver.cpp +++ b/irr/src/OpenGL/Driver.cpp @@ -27,37 +27,32 @@ namespace irr { namespace video { + struct VertexAttribute { - enum class Mode + enum Mode : u8 { Regular, Normalized, - Integral, + Integer, }; - int Index; - int ComponentCount; + u8 Index; + u8 ComponentCount; GLenum ComponentType; Mode mode; - int Offset; + u32 Offset; }; struct VertexType { - int VertexSize; + u32 VertexSize; std::vector Attributes; + + // allow ranged for loops + inline auto begin() const { return Attributes.begin(); } + inline auto end() const { return Attributes.end(); } }; -static const VertexAttribute *begin(const VertexType &type) -{ - return type.Attributes.data(); -} - -static const VertexAttribute *end(const VertexType &type) -{ - return type.Attributes.data() + type.Attributes.size(); -} - static const VertexType vtStandard = { sizeof(S3DVertex), { @@ -68,6 +63,9 @@ static const VertexType vtStandard = { }, }; +// FIXME: this is actually UB because these vertex classes are not "standard-layout" +// they violate the following requirement: +// - only one class in the hierarchy has non-static data members #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Winvalid-offsetof" @@ -170,11 +168,15 @@ COpenGL3DriverBase::COpenGL3DriverBase(const SIrrlichtCreationParameters ¶ms ExposedData = ContextManager->getContext(); ContextManager->activateContext(ExposedData, false); GL.LoadAllProcedures(ContextManager); - if (EnableErrorTest) { + if (EnableErrorTest && GL.IsExtensionPresent("GL_KHR_debug")) { GL.Enable(GL_DEBUG_OUTPUT); GL.DebugMessageCallback(debugCb, this); + } else if (EnableErrorTest) { + os::Printer::log("GL debug extension not available"); } initQuadsIndices(); + + TEST_GL_ERROR(this); } COpenGL3DriverBase::~COpenGL3DriverBase() @@ -267,7 +269,6 @@ bool COpenGL3DriverBase::genericDriverInit(const core::dimension2d &screenS for (s32 i = 0; i < ETS_COUNT; ++i) setTransform(static_cast(i), core::IdentityMatrix); - setAmbientLight(SColorf(0.0f, 0.0f, 0.0f, 0.0f)); GL.ClearDepthf(1.0f); GL.Hint(GL_GENERATE_MIPMAP_HINT, GL_NICEST); @@ -760,6 +761,13 @@ void COpenGL3DriverBase::drawVertexPrimitiveList(const void *vertices, u32 verte endDraw(vTypeDesc); } +void COpenGL3DriverBase::draw2DVertexPrimitiveList(const void *vertices, u32 vertexCount, + const void *indexList, u32 primitiveCount, + E_VERTEX_TYPE vType, scene::E_PRIMITIVE_TYPE pType, E_INDEX_TYPE iType) +{ + os::Printer::log("draw2DVertexPrimitiveList unimplemented", ELL_ERROR); +} + void COpenGL3DriverBase::draw2DImage(const video::ITexture *texture, const core::position2d &destPos, const core::rect &sourceRect, const core::rect *clipRect, SColor color, bool useAlphaChannelOfTexture) @@ -1066,7 +1074,7 @@ void COpenGL3DriverBase::drawElements(GLenum primitiveType, const VertexType &ve void COpenGL3DriverBase::beginDraw(const VertexType &vertexType, uintptr_t verticesBase) { - for (auto attr : vertexType) { + for (auto &attr : vertexType) { GL.EnableVertexAttribArray(attr.Index); switch (attr.mode) { case VertexAttribute::Mode::Regular: @@ -1075,7 +1083,7 @@ void COpenGL3DriverBase::beginDraw(const VertexType &vertexType, uintptr_t verti case VertexAttribute::Mode::Normalized: GL.VertexAttribPointer(attr.Index, attr.ComponentCount, attr.ComponentType, GL_TRUE, vertexType.VertexSize, reinterpret_cast(verticesBase + attr.Offset)); break; - case VertexAttribute::Mode::Integral: + case VertexAttribute::Mode::Integer: GL.VertexAttribIPointer(attr.Index, attr.ComponentCount, attr.ComponentType, vertexType.VertexSize, reinterpret_cast(verticesBase + attr.Offset)); break; } @@ -1084,7 +1092,7 @@ void COpenGL3DriverBase::beginDraw(const VertexType &vertexType, uintptr_t verti void COpenGL3DriverBase::endDraw(const VertexType &vertexType) { - for (auto attr : vertexType) + for (auto &attr : vertexType) GL.DisableVertexAttribArray(attr.Index); } diff --git a/irr/src/OpenGL/Driver.h b/irr/src/OpenGL/Driver.h index f00ffa8af..e0787e560 100644 --- a/irr/src/OpenGL/Driver.h +++ b/irr/src/OpenGL/Driver.h @@ -81,6 +81,11 @@ public: const void *indexList, u32 primitiveCount, E_VERTEX_TYPE vType, scene::E_PRIMITIVE_TYPE pType, E_INDEX_TYPE iType) override; + //! draws a vertex primitive list in 2d + virtual void draw2DVertexPrimitiveList(const void *vertices, u32 vertexCount, + const void *indexList, u32 primitiveCount, + E_VERTEX_TYPE vType, scene::E_PRIMITIVE_TYPE pType, E_INDEX_TYPE iType) override; + //! queries the features of the driver, returns true if feature is available bool queryFeature(E_VIDEO_DRIVER_FEATURE feature) const override { diff --git a/irr/src/OpenGLES2/Driver.cpp b/irr/src/OpenGLES2/Driver.cpp index 32bf0aee0..7b84675aa 100644 --- a/irr/src/OpenGLES2/Driver.cpp +++ b/irr/src/OpenGLES2/Driver.cpp @@ -43,8 +43,6 @@ void COpenGLES2Driver::initFeatures() } initExtensions(); - static const GLenum BGRA8_EXT = 0x93A1; - if (Version.Major >= 3) { // NOTE floating-point formats may not be suitable for render targets. TextureFormats[ECF_A1R5G5B5] = {GL_RGB5_A1, GL_RGBA, GL_UNSIGNED_SHORT_5_5_5_1, CColorConverter::convert_A1R5G5B5toR5G5B5A1}; @@ -64,10 +62,11 @@ void COpenGLES2Driver::initFeatures() TextureFormats[ECF_D24] = {GL_DEPTH_COMPONENT24, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT}; TextureFormats[ECF_D24S8] = {GL_DEPTH24_STENCIL8, GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8}; - if (FeatureAvailable[IRR_GL_EXT_texture_format_BGRA8888]) + // NOTE a recent (2024) revision of EXT_texture_format_BGRA8888 also + // adds a sized format GL_BGRA8_EXT. We have a workaround in place to + // fix up the InternalFormat in case of render targets. + if (FeatureAvailable[IRR_GL_EXT_texture_format_BGRA8888] || FeatureAvailable[IRR_GL_APPLE_texture_format_BGRA8888]) TextureFormats[ECF_A8R8G8B8] = {GL_BGRA, GL_BGRA, GL_UNSIGNED_BYTE}; - else if (FeatureAvailable[IRR_GL_APPLE_texture_format_BGRA8888]) - TextureFormats[ECF_A8R8G8B8] = {BGRA8_EXT, GL_BGRA, GL_UNSIGNED_BYTE}; // OpenGL ES 3 doesn't include a GL_DEPTH_COMPONENT32, so still use // OES_depth_texture for 32-bit depth texture support. @@ -87,10 +86,8 @@ void COpenGLES2Driver::initFeatures() TextureFormats[ECF_R8G8B8] = {GL_RGB, GL_RGB, GL_UNSIGNED_BYTE}; TextureFormats[ECF_A8R8G8B8] = {GL_RGBA, GL_RGBA, GL_UNSIGNED_BYTE, CColorConverter::convert_A8R8G8B8toA8B8G8R8}; - if (FeatureAvailable[IRR_GL_EXT_texture_format_BGRA8888]) + if (FeatureAvailable[IRR_GL_EXT_texture_format_BGRA8888] || FeatureAvailable[IRR_GL_APPLE_texture_format_BGRA8888]) TextureFormats[ECF_A8R8G8B8] = {GL_BGRA, GL_BGRA, GL_UNSIGNED_BYTE}; - else if (FeatureAvailable[IRR_GL_APPLE_texture_format_BGRA8888]) - TextureFormats[ECF_A8R8G8B8] = {BGRA8_EXT, GL_BGRA, GL_UNSIGNED_BYTE}; if (FeatureAvailable[IRR_GL_OES_texture_half_float]) { TextureFormats[ECF_A16B16G16R16F] = {GL_RGBA, GL_RGBA, HALF_FLOAT_OES}; diff --git a/src/client/render/anaglyph.cpp b/src/client/render/anaglyph.cpp index fe3a5f0f8..7baf40322 100644 --- a/src/client/render/anaglyph.cpp +++ b/src/client/render/anaglyph.cpp @@ -21,8 +21,7 @@ void SetColorMaskStep::run(PipelineContext &context) mat.Material.ColorMask = color_mask; mat.EnableProps = video::EMP_COLOR_MASK; mat.EnablePasses = scene::ESNRP_SKY_BOX | scene::ESNRP_SOLID | - scene::ESNRP_TRANSPARENT | scene::ESNRP_TRANSPARENT_EFFECT | - scene::ESNRP_SHADOW; + scene::ESNRP_TRANSPARENT | scene::ESNRP_TRANSPARENT_EFFECT; } /// ClearDepthBufferTarget