@@ -1,3 +1,7 @@
+#ifdef GL_ES
+ precision mediump float;
+#endif
+
uniform sampler2D screenTexture;
uniform float blurSize;
varying vec2 texCoordVar;
@@ -8,9 +8,7 @@
PolycodeTemplateApp::PolycodeTemplateApp(PolycodeView *view) {
core = new POLYCODE_CORE(view, 64,64,false,false, 0,0,60, 0, true);
- NSString *str = [[NSBundle mainBundle] pathForResource: @"default" ofType: @"pak"];
-
- core->addFileSource("archive", [str UTF8String]);
+ core->addFileSource("archive", core->getResourcePathForFile("default.pak"));
ResourcePool *globalPool = Services()->getResourceManager()->getGlobalPool();
globalPool->loadResourcesFromFolder("default", true);
@@ -311,6 +311,7 @@ namespace Polycode {
virtual bool systemParseFolder(const Polycode::String& pathString, bool showHidden, std::vector<OSFileEntry> &targetVector) = 0;
+ virtual String getResourcePathForFile(const String &fileName);
/**
* Sets a new video mode.
@@ -70,6 +70,8 @@ namespace Polycode {
unsigned int getTicks();
String executeExternalCommand(String command, String args, String inDirectory);
bool systemParseFolder(const Polycode::String& pathString, bool showHidden, std::vector<OSFileEntry> &targetVector);
+ String getResourcePathForFile(const String &fileName);
void checkEvents();
void setDeviceSize(Number x, Number y);
@@ -1 +1 @@
-Subproject commit 1f45a39574ddda0b22c951c86b01612efda30a43
+Subproject commit cef1240e3359bc6be65a6b567c760ebe1b36937a
@@ -365,6 +365,10 @@ namespace Polycode {
}
+ String Core::getResourcePathForFile(const String &fileName) {
+ return fileName;
+ }
void Core::removeFileSource(const String &type, const String &source) {
for(int i=0; i < fileProviders.size(); i++) {
if(fileProviders[i]->type == type) {
@@ -164,7 +164,14 @@ void IOSCore::handleVideoModeChange(VideoModeChangeInfo *modeInfo) {
[EAGLContext setCurrentContext:context];
+}
+String IOSCore::getResourcePathForFile(const String &fileName) {
+ NSString* fullFileName = [NSString stringWithUTF8String:fileName.c_str()];
+ NSString* fileNameNoExt = [[fullFileName lastPathComponent] stringByDeletingPathExtension];
+ NSString* extension = [fullFileName pathExtension];
+ NSString *str = [[NSBundle mainBundle] pathForResource: fileNameNoExt ofType: extension];
+ return String([str UTF8String]);
void IOSCore::flushRenderContext() {
@@ -436,7 +436,7 @@ void OpenGLGraphicsInterface::createTexture(Texture *texture) {
break;
case Image::IMAGE_FP16:
glTextureType = GL_RGBA;
- glTextureFormat = GL_RGBA16F_ARB;
+ glTextureFormat = GL_RGBA16F_EXT;
pixelType = GL_FLOAT;
default: