Merge remote-tracking branch 'sandstranger/fixes-for-android'

celladd
Marc Zinnschlag 10 years ago
commit 44d1f43b2b

@ -120,14 +120,12 @@ RenderingManager::RenderingManager(OEngine::Render::OgreRenderer& _rend, const b
// Set default texture filtering options
TextureFilterOptions tfo;
std::string filter = Settings::Manager::getString("texture filtering", "General");
#ifndef ANDROID
if (filter == "anisotropic") tfo = TFO_ANISOTROPIC;
else if (filter == "trilinear") tfo = TFO_TRILINEAR;
else if (filter == "bilinear") tfo = TFO_BILINEAR;
else /*if (filter == "none")*/ tfo = TFO_NONE;
#else
tfo = TFO_NONE;
#endif
MaterialManager::getSingleton().setDefaultTextureFiltering(tfo);
MaterialManager::getSingleton().setDefaultAnisotropy( (filter == "anisotropic") ? Settings::Manager::getInt("anisotropy", "General") : 1 );

@ -33,11 +33,11 @@ namespace MWWorld
MWScript::Locals mLocals; // if we find the overhead of heaving a locals
// object in the refdata of refs without a script,
// we can make this a pointer later.
bool mDeleted; // separate delete flag used for deletion by a content file
bool mHasLocals;
bool mEnabled;
int mCount; // 0: deleted
bool mDeleted; // separate delete flag used for deletion by a content file
ESM::Position mPosition;

@ -27,7 +27,7 @@ char const * Buffer::getData()
}
JNIEXPORT void JNICALL Java_org_libsdl_app_SDLActivity_getPathToJni(JNIEnv *env, jobject obj, jstring prompt)
JNIEXPORT void JNICALL Java_ui_activity_GameActivity_getPathToJni(JNIEnv *env, jobject obj, jstring prompt)
{
jboolean iscopy;
Buffer::setData((env)->GetStringUTFChars(prompt, &iscopy));

@ -1,8 +1,8 @@
/* DO NOT EDIT THIS FILE - it is machine generated */
#include <jni.h>
#ifndef _Included_org_libsdl_app_SDLActivity_getPathToJni
#define _Included_org_libsdl_app_SDLActivity_getPathToJni
#ifndef _Included_ui_activity_GameActivity_getPathToJni
#define _Included_ui_activity_GameActivity_getPathToJni
#ifdef __cplusplus
extern "C" {
#endif
@ -11,7 +11,7 @@ extern "C" {
* Method: getPathToJni
* Signature: (I)I
*/
JNIEXPORT void JNICALL Java_org_libsdl_app_SDLActivity_getPathToJni(JNIEnv *env, jobject obj, jstring prompt);
JNIEXPORT void JNICALL Java_ui_activity_GameActivity_getPathToJni(JNIEnv *env, jobject obj, jstring prompt);
#ifdef __cplusplus
}

@ -243,7 +243,9 @@
}
#else
#if NORMAL_MAP && SH_GLSLES
mat3 transpose( mat3 m);
#endif
// ----------------------------------- FRAGMENT ------------------------------------------
#if UNDERWATER
@ -376,13 +378,13 @@
float3 binormal = cross(tangentPassthrough.xyz, normal.xyz);
float3x3 tbn = float3x3(tangentPassthrough.xyz, binormal, normal.xyz);
#if SH_GLSL
#if SH_GLSL || SH_GLSLES
tbn = transpose(tbn);
#endif
float4 normalTex = shSample(normalMap, UV.xy);
normal = normalize (shMatrixMult( transpose(tbn), normalTex.xyz * 2 - 1 ));
normal = normalize (shMatrixMult( transpose(tbn), normalTex.xyz * 2.0 - float3 (1.0,1.0,1.0) ));
#endif
#if ENV_MAP || SPECULAR || PARALLAX
@ -576,5 +578,14 @@
// prevent negative colour output (for example with negative lights)
shOutputColour(0).xyz = max(shOutputColour(0).xyz, float3(0.0,0.0,0.0));
}
#if NORMAL_MAP && SH_GLSLES
mat3 transpose(mat3 m){
return mat3(
m[0][0],m[1][0],m[2][0],
m[0][1],m[1][1],m[2][1],
m[0][2],m[1][2],m[2][2]
);
}
#endif
#endif

@ -221,6 +221,9 @@
#if UNDERWATER
#include "underwater.h"
#endif
#if NORMAL_MAP && SH_GLSLES
mat3 transpose(mat3 m);
#endif
SH_BEGIN_PROGRAM
@ -319,7 +322,7 @@ shUniform(float4, cameraPos) @shAutoConstant(cameraPos, camera_position)
// derive final matrix
float3x3 tbn = float3x3(tangent, binormal, normal);
#if SH_GLSL
#if SH_GLSL || SH_GLSLES
tbn = transpose(tbn);
#endif
#endif
@ -492,5 +495,13 @@ albedo = shLerp(albedo, diffuseTex, blendValues@shPropertyString(blendmap_compon
shOutputColour(0).a = 1.0-previousAlpha;
#endif
}
#if NORMAL_MAP && SH_GLSLES
mat3 transpose(mat3 m){
return mat3(
m[0][0],m[1][0],m[2][0],
m[0][1],m[1][1],m[2][1],
m[0][2],m[1][2],m[2][2]
);
}
#endif
#endif

Loading…
Cancel
Save