This commit is contained in:
2017-08-11 19:08:15 +01:00
3 changed files with 4 additions and 2 deletions

View File

@@ -45,11 +45,12 @@ std::vector<std::string> Asset::list_files(std::string folder, bool is_asset, co
} }
#else #else
std::string abs_path = folder;
if (is_asset) if (is_asset)
{ {
NSString* bundle_path = [[NSBundle mainBundle] resourcePath]; NSString* bundle_path = [[NSBundle mainBundle] resourcePath];
std::string base = [bundle_path cStringUsingEncoding : 1]; std::string base = [bundle_path cStringUsingEncoding : 1];
std::string abs_path = base + "/" + folder; abs_path = base + "/" + folder;
} }
DIR *dp; DIR *dp;

View File

@@ -7,7 +7,7 @@ public:
static AAssetManager* m_am; static AAssetManager* m_am;
AAsset* m_asset = nullptr; AAsset* m_asset = nullptr;
#endif #endif
static std::vector<std::string> Asset::list_files(std::string folder, bool is_asset, const std::string& filter_regex); static std::vector<std::string> list_files(std::string folder, bool is_asset, const std::string& filter_regex);
std::string m_current_path; std::string m_current_path;
FILE* m_fp = nullptr; FILE* m_fp = nullptr;

View File

@@ -667,6 +667,7 @@ void ui::Canvas::layer_merge(int source_idx, int dest_idx)
ui::ShaderManager::u_int(kShaderUniform::Tex, 0); // dest ui::ShaderManager::u_int(kShaderUniform::Tex, 0); // dest
ui::ShaderManager::u_int(kShaderUniform::TexStroke, 1); // source ui::ShaderManager::u_int(kShaderUniform::TexStroke, 1); // source
ui::ShaderManager::u_float(kShaderUniform::Alpha, 1); ui::ShaderManager::u_float(kShaderUniform::Alpha, 1);
ShaderManager::u_int(kShaderUniform::Lock, false);
ShaderManager::u_mat4(kShaderUniform::MVP, glm::ortho(-.5f, .5f, -.5f, .5f, -1.f, 1.f)); ShaderManager::u_mat4(kShaderUniform::MVP, glm::ortho(-.5f, .5f, -.5f, .5f, -1.f, 1.f));
glActiveTexture(GL_TEXTURE0); glActiveTexture(GL_TEXTURE0);