Fix few GLES issues

master
Maksim 2022-03-06 11:58:25 +01:00
parent d08c6f4af7
commit 6950a3b9a1
4 changed files with 6 additions and 9 deletions

View File

@ -631,7 +631,7 @@ void Minimap::drawMinimap(core::rect<s32> rect) {
material.setFlag(video::EMF_TRILINEAR_FILTER, true);
material.Lighting = false;
material.TextureLayer[0].Texture = minimap_texture;
material.TextureLayer[1].Texture = data->heightmap_texture;
material.TextureLayer[1].Texture = data->mode.type == MINIMAP_TYPE_RADAR ? 0 : data->heightmap_texture;
if (m_enable_shaders && data->mode.type == MINIMAP_TYPE_SURFACE) {
u16 sid = m_shdrsrc->getShader("minimap_shader", TILE_MATERIAL_ALPHA);

View File

@ -40,7 +40,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "client/tile.h"
#include "config.h"
#if ENABLE_GLES
#if ENABLE_GLES && !defined(__APPLE__)
#ifdef _IRR_COMPILE_WITH_OGLES1_
#include <GLES/gl.h>
#else
@ -49,7 +49,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#else
#ifndef __APPLE__
#include <GL/gl.h>
#else
#elif !defined(__IOS__)
#define GL_SILENCE_DEPRECATION
#include <OpenGL/gl.h>
#endif
@ -604,7 +604,7 @@ ShaderInfo ShaderSource::generateShader(const std::string &name,
}
bool use_discard = use_gles;
#ifdef __unix__
#if defined(__unix__) && !defined(__APPLE__)
// For renderers that should use discard instead of GL_ALPHA_TEST
const char* gl_renderer = (const char*)glGetString(GL_RENDERER);
if (strstr(gl_renderer, "GC7000"))

View File

@ -39,10 +39,7 @@ static video::SMaterial baseMaterial()
{
video::SMaterial mat;
mat.Lighting = false;
#if ENABLE_GLES
mat.ZBuffer = video::ECFN_DISABLED;
#elif defined(__MACH__) && defined(__APPLE__) && IRRLICHT_VERSION_MAJOR == 1 && IRRLICHT_VERSION_MINOR > 8
// ugly but for making cpp_lint happy...
#if IRRLICHT_VERSION_MAJOR == 1 && IRRLICHT_VERSION_MINOR > 8
mat.ZBuffer = video::ECFN_DISABLED;
#else
mat.ZBuffer = video::ECFN_NEVER;

View File

@ -35,7 +35,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "renderingengine.h"
#if ENABLE_GLES
#if ENABLE_GLES && !defined(__APPLE__)
#ifdef _IRR_COMPILE_WITH_OGLES1_
#include <GLES/gl.h>
#else