Merge branch 'master' of https://github.com/godotengine/godot
This commit is contained in:
commit
bbb2a863f9
4 changed files with 29 additions and 24 deletions
|
@ -21,8 +21,8 @@ def get_opts():
|
||||||
|
|
||||||
return [
|
return [
|
||||||
('ISIMPLATFORM', 'name of the iphone platform', 'iPhoneSimulator'),
|
('ISIMPLATFORM', 'name of the iphone platform', 'iPhoneSimulator'),
|
||||||
('ISIMPATH', 'the path to iphone toolchain', '/Applications/Xcode.app/Contents/Developer/Platforms/${ISIMPLATFORM}.platform'),
|
('ISIMPATH', 'the path to iphone toolchain', '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain'),
|
||||||
('ISIMSDK', 'path to the iphone SDK', '$ISIMPATH/Developer/SDKs/${ISIMPLATFORM}.sdk'),
|
('ISIMSDK', 'path to the iphone SDK', '/Applications/Xcode.app/Contents/Developer/Platforms/${ISIMPLATFORM}.platform/Developer/SDKs/${ISIMPLATFORM}.sdk'),
|
||||||
('game_center', 'Support for game center', 'yes'),
|
('game_center', 'Support for game center', 'yes'),
|
||||||
('store_kit', 'Support for in-app store', 'yes'),
|
('store_kit', 'Support for in-app store', 'yes'),
|
||||||
('ios_gles22_override', 'Force GLES2.0 on iOS', 'yes'),
|
('ios_gles22_override', 'Force GLES2.0 on iOS', 'yes'),
|
||||||
|
@ -46,9 +46,10 @@ def configure(env):
|
||||||
|
|
||||||
env['ENV']['PATH'] = env['ISIMPATH']+"/Developer/usr/bin/:"+env['ENV']['PATH']
|
env['ENV']['PATH'] = env['ISIMPATH']+"/Developer/usr/bin/:"+env['ENV']['PATH']
|
||||||
|
|
||||||
env['CC'] = '$ISIMPATH/Developer/usr/bin/gcc'
|
env['CC'] = '$ISIMPATH/usr/bin/${ios_triple}clang'
|
||||||
env['CXX'] = '$ISIMPATH/Developer/usr/bin/g++'
|
env['CXX'] = '$ISIMPATH/usr/bin/${ios_triple}clang++'
|
||||||
env['AR'] = 'ar'
|
env['AR'] = '$ISIMPATH/usr/bin/${ios_triple}ar'
|
||||||
|
env['RANLIB'] = '$ISIMPATH/usr/bin/${ios_triple}ranlib'
|
||||||
|
|
||||||
import string
|
import string
|
||||||
env['CCFLAGS'] = string.split('-arch i386 -fobjc-abi-version=2 -fobjc-legacy-dispatch -fmessage-length=0 -fpascal-strings -fasm-blocks -Wall -D__IPHONE_OS_VERSION_MIN_REQUIRED=40100 -isysroot $ISIMSDK -mios-simulator-version-min=4.3 -DCUSTOM_MATRIX_TRANSFORM_H=\\\"build/iphone/matrix4_iphone.h\\\" -DCUSTOM_VECTOR3_TRANSFORM_H=\\\"build/iphone/vector3_iphone.h\\\"')
|
env['CCFLAGS'] = string.split('-arch i386 -fobjc-abi-version=2 -fobjc-legacy-dispatch -fmessage-length=0 -fpascal-strings -fasm-blocks -Wall -D__IPHONE_OS_VERSION_MIN_REQUIRED=40100 -isysroot $ISIMSDK -mios-simulator-version-min=4.3 -DCUSTOM_MATRIX_TRANSFORM_H=\\\"build/iphone/matrix4_iphone.h\\\" -DCUSTOM_VECTOR3_TRANSFORM_H=\\\"build/iphone/vector3_iphone.h\\\"')
|
||||||
|
@ -97,4 +98,8 @@ def configure(env):
|
||||||
env['ENV']['CODESIGN_ALLOCATE'] = '/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate'
|
env['ENV']['CODESIGN_ALLOCATE'] = '/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate'
|
||||||
env.Append(CPPFLAGS=['-DIPHONE_ENABLED', '-DUNIX_ENABLED', '-DGLES2_ENABLED', '-fexceptions'])
|
env.Append(CPPFLAGS=['-DIPHONE_ENABLED', '-DUNIX_ENABLED', '-DGLES2_ENABLED', '-fexceptions'])
|
||||||
|
|
||||||
|
import methods
|
||||||
|
env.Append( BUILDERS = { 'GLSL120' : env.Builder(action = methods.build_legacygl_headers, suffix = 'glsl.h',src_suffix = '.glsl') } )
|
||||||
|
env.Append( BUILDERS = { 'GLSL' : env.Builder(action = methods.build_glsl_headers, suffix = 'glsl.h',src_suffix = '.glsl') } )
|
||||||
|
env.Append( BUILDERS = { 'GLSL120GLES' : env.Builder(action = methods.build_gles2_headers, suffix = 'glsl.h',src_suffix = '.glsl') } )
|
||||||
|
|
||||||
|
|
|
@ -535,6 +535,8 @@ void ShaderMaterial::_shader_changed() {
|
||||||
|
|
||||||
void ShaderMaterial::set_shader(const Ref<Shader>& p_shader) {
|
void ShaderMaterial::set_shader(const Ref<Shader>& p_shader) {
|
||||||
|
|
||||||
|
ERR_FAIL_COND(p_shader.is_valid() && p_shader->get_mode()!=Shader::MODE_MATERIAL);
|
||||||
|
|
||||||
if (shader.is_valid())
|
if (shader.is_valid())
|
||||||
shader->disconnect(SceneStringNames::get_singleton()->changed,this,SceneStringNames::get_singleton()->_shader_changed);
|
shader->disconnect(SceneStringNames::get_singleton()->changed,this,SceneStringNames::get_singleton()->_shader_changed);
|
||||||
shader=p_shader;
|
shader=p_shader;
|
||||||
|
|
|
@ -448,31 +448,19 @@ RES ResourceFormatLoaderShader::load(const String &p_path, const String& p_origi
|
||||||
|
|
||||||
void ResourceFormatLoaderShader::get_recognized_extensions(List<String> *p_extensions) const {
|
void ResourceFormatLoaderShader::get_recognized_extensions(List<String> *p_extensions) const {
|
||||||
|
|
||||||
p_extensions->push_back("shader");
|
ObjectTypeDB::get_extensions_for_type("Shader", p_extensions);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ResourceFormatLoaderShader::handles_type(const String& p_type) const {
|
bool ResourceFormatLoaderShader::handles_type(const String& p_type) const {
|
||||||
|
|
||||||
return p_type=="Shader";
|
return ObjectTypeDB::is_type(p_type, "Shader");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
String ResourceFormatLoaderShader::get_resource_type(const String &p_path) const {
|
String ResourceFormatLoaderShader::get_resource_type(const String &p_path) const {
|
||||||
|
|
||||||
if (p_path.extension().to_lower()=="shader")
|
if (p_path.extension().to_lower()=="shd")
|
||||||
return "Shader";
|
return "Shader";
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -89,13 +89,23 @@ void CustomPropertyEditor::_menu_option(int p_which) {
|
||||||
case OBJ_MENU_LOAD: {
|
case OBJ_MENU_LOAD: {
|
||||||
|
|
||||||
file->set_mode(EditorFileDialog::MODE_OPEN_FILE);
|
file->set_mode(EditorFileDialog::MODE_OPEN_FILE);
|
||||||
List<String> extensions;
|
|
||||||
String type=(hint==PROPERTY_HINT_RESOURCE_TYPE)?hint_text:String();
|
String type=(hint==PROPERTY_HINT_RESOURCE_TYPE)?hint_text:String();
|
||||||
|
|
||||||
ResourceLoader::get_recognized_extensions_for_type(type,&extensions);
|
List<String> extensions;
|
||||||
file->clear_filters();
|
for (int i=0;i<type.get_slice_count(",");i++) {
|
||||||
|
|
||||||
|
ResourceLoader::get_recognized_extensions_for_type(type.get_slice(",",i),&extensions);
|
||||||
|
}
|
||||||
|
|
||||||
|
Set<String> valid_extensions;
|
||||||
for (List<String>::Element *E=extensions.front();E;E=E->next()) {
|
for (List<String>::Element *E=extensions.front();E;E=E->next()) {
|
||||||
|
|
||||||
|
valid_extensions.insert(E->get());
|
||||||
|
}
|
||||||
|
|
||||||
|
file->clear_filters();
|
||||||
|
for (Set<String>::Element *E=valid_extensions.front();E;E=E->next()) {
|
||||||
|
|
||||||
file->add_filter("*."+E->get()+" ; "+E->get().to_upper() );
|
file->add_filter("*."+E->get()+" ; "+E->get().to_upper() );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue