mirror of
https://github.com/minetest/irrlicht.git
synced 2025-07-01 15:50:27 +02:00
Merging r6256 through r6273 from trunk to ogl-es branch
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@6274 dfc29bdd-3216-0410-991c-e03cc46cb475
This commit is contained in:
@ -185,12 +185,12 @@ namespace video
|
||||
"mov r0.xy, t0 ; color map \n"\
|
||||
" \n"\
|
||||
"; original parallax mapping: \n"\
|
||||
"; emulate ps1x _bx2, so substract 0.5f and multiply by 2 \n"\
|
||||
"; emulate ps1x _bx2, so subtract 0.5f and multiply by 2 \n"\
|
||||
"mad r1.xyz, r1, r11, c0; \n"\
|
||||
" \n"\
|
||||
"mul r3, r1.wwww, c6; ; r3 = (height, height, height) * scale \n"\
|
||||
" \n"\
|
||||
"; emulate ps1x _bx2, so substract 0.5f and multiply by 2 \n"\
|
||||
"; emulate ps1x _bx2, so subtract 0.5f and multiply by 2 \n"\
|
||||
"mad r4.xyz, r4, r11, c0; \n"\
|
||||
" \n"\
|
||||
"mad r2.xy, r3, r4, r0 ; newTexCoord = height * eye + oldTexCoord \n"\
|
||||
@ -205,7 +205,7 @@ namespace video
|
||||
"mov r2.xyz, t2 ; fetch light vector 1 \n"\
|
||||
"mov r3.xyz, t3 ; fetch light vector 2 \n"\
|
||||
" \n"\
|
||||
"; emulate ps1x _bx2, so substract 0.5f and multiply by 2 \n"\
|
||||
"; emulate ps1x _bx2, so subtract 0.5f and multiply by 2 \n"\
|
||||
"mad r1.xyz, r1, r11, c0; \n"\
|
||||
"mad r2.xyz, r2, r11, c0; \n"\
|
||||
"mad r3.xyz, r3, r11, c0; \n"\
|
||||
|
@ -151,6 +151,13 @@ bool CMD2MeshFileLoader::loadFile(io::IReadFile* file, CAnimatedMeshMD2* mesh)
|
||||
return false;
|
||||
}
|
||||
|
||||
const int MAX_FRAME_SIZE = MD2_MAX_VERTS*4+128;
|
||||
if ( header.frameSize > MAX_FRAME_SIZE )
|
||||
{
|
||||
os::Printer::log("MD2 Loader: Invalid large frame size in header", file->getFileName(), ELL_WARNING);
|
||||
return false;
|
||||
}
|
||||
|
||||
//
|
||||
// prepare mesh and allocate memory
|
||||
//
|
||||
@ -232,7 +239,7 @@ bool CMD2MeshFileLoader::loadFile(io::IReadFile* file, CAnimatedMeshMD2* mesh)
|
||||
|
||||
// read Vertices
|
||||
|
||||
u8 buffer[MD2_MAX_VERTS*4+128];
|
||||
u8 buffer[MAX_FRAME_SIZE];
|
||||
SMD2Frame* frame = (SMD2Frame*)buffer;
|
||||
|
||||
file->seek(header.offsetFrames);
|
||||
|
@ -156,7 +156,7 @@ const char OPENGL_PARALLAX_MAP_PSH[] =
|
||||
"MAD normalMapColor, normalMapColor, {2,2,2,2}, {-1,-1,-1,-1}; \n"\
|
||||
"\n"\
|
||||
"\n"\
|
||||
"# extract eye vector (so substract 0.5f and multiply by 2)\n"\
|
||||
"# extract eye vector (so subtract 0.5f and multiply by 2)\n"\
|
||||
"MAD temp, eyeVector, {2,2,2,2}, {-1,-1,-1,-1};\n"\
|
||||
"\n"\
|
||||
"# height = height * scale \n"\
|
||||
|
@ -1116,7 +1116,7 @@ bool CXMeshFileLoader::parseDataObjectSkinWeights(SXMesh &mesh)
|
||||
|
||||
if (!getNextTokenAsString(TransformNodeName))
|
||||
{
|
||||
os::Printer::log("Unknown syntax while reading transfrom node name string in .x file", ELL_WARNING);
|
||||
os::Printer::log("Unknown syntax while reading transform node name string in .x file", ELL_WARNING);
|
||||
os::Printer::log("Line", core::stringc(Line).c_str(), ELL_WARNING);
|
||||
return false;
|
||||
}
|
||||
|
@ -91,7 +91,7 @@ endif
|
||||
ifdef PROFILE
|
||||
CPPFLAGS += -pg
|
||||
endif
|
||||
CFLAGS := -DPNG_THREAD_UNSAFE_OK -DPNG_NO_MMX_CODE -DPNG_NO_MNG_FEATURES -DPNG_ARM_NEON_OPT=0
|
||||
CFLAGS += -DPNG_THREAD_UNSAFE_OK -DPNG_NO_MMX_CODE -DPNG_NO_MNG_FEATURES -DPNG_ARM_NEON_OPT=0
|
||||
ifdef EMSCRIPTEN
|
||||
CXXFLAGS += -std=gnu++11 -U__STRICT_ANSI__
|
||||
ifdef WASM
|
||||
|
Reference in New Issue
Block a user