HaxeFoundation / hashlink

A virtual machine for Haxe
https://hashlink.haxe.org/
MIT License
811 stars 156 forks source link

ThirdParty iOS Dependencies #144

Open thejustinwalsh opened 6 years ago

thejustinwalsh commented 6 years ago

I am working on building all third party dependencies for iOS, so might as well start this thread as I see one for android all ready open.

Working

libsdl2: Official Distro has an Xcode project, that will generate libSDL2.a

libpng: Built from source in project w/ preprocessor macros

PNG_NO_CONFIG_H
PNG_ARM_NEON_OPT=0
HAVE_DLFCN_H=1
HAVE_INTTYPES_H=1
HAVE_LIBZ=1
HAVE_MEMORY_H=1
HAVE_MEMSET=1
HAVE_POW=1
HAVE_STDINT_H=1
HAVE_STDLIB_H=1
HAVE_STRINGS_H=1
HAVE_STRING_H=1
HAVE_SYS_STAT_H=1
HAVE_SYS_TYPES_H=1
HAVE_UNISTD_H=1
STDC_HEADERS=1

pcre: Included source in project

libz: Included in iPhoneSDK as libz.tbd

libsqlite3: Included in iPhoneSDK as libdqlite3.tbd

libturbo-jpeg: https://libjpeg-turbo.org/Documentation/OfficialBinaries Installed dmg, then linked against the library that is installed in /opt/libjpeg-turb/**, the resulting dylib path is not relative to the application binary, so instead using this static version found here (https://github.com/hjeffrey/turbojpeg) BITCODE is not enabled though... ☹️

Ogg: https://github.com/iosdevzone/IDZPrecompiledOgg Vorbis: https://github.com/iosdevzone/IDZPrecompiledVorbis Link to the included Frameworks in these repositories

OpenAL: Link against the OpenAL.framework in the iphone SDK. Ensure you pass -L hlopenal when generating your c source with hl Patch EFX.hx to just provide empty stubs

TODO

libturbo-jpeg: Need to find build a fat-binary with BITCODE enabled.

mbedtls: ???

ffmpeg: https://github.com/kewlbear/FFmpeg-iOS-build-script

General Setup

Once this is all wrangled setting up a CocoaPod that resolves all dependencies for hashlink could be pretty slick. Thoughts?

ncannasse commented 6 years ago

Ping @rtissera

ncannasse commented 6 years ago

PS: ffmpeg is only experimental video support and requires extra license compliance, see https://www.ffmpeg.org/legal.html

And OpenSSL should not be required, as we use mbedtls for SSL support

rtissera commented 6 years ago

Beware of LGPL legal requirements if using OpenAL Soft on iOS too.

We are using Apple stock OpenAL on Evoland 2 iOS without EFX.

I will drop later instructions and possibly an archive from our dependencies used for Evoland 2 iOS and tvOS.

Le mar. 8 mai 2018 à 18:35, Nicolas Cannasse notifications@github.com a écrit :

PS: ffmpeg is only experimental video support and requires extra license compliance, see https://www.ffmpeg.org/legal.html

And OpenSSL should not be required, as we use mbedtls for SSL support

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/HaxeFoundation/hashlink/issues/144#issuecomment-387463930, or mute the thread https://github.com/notifications/unsubscribe-auth/AC3LBQqbtP02fscGsEEavjN-v5aHPgfiks5twclIgaJpZM4T28Pm .

thejustinwalsh commented 6 years ago

Yeah I noticed the LGPL on OpenAL Soft. Does there need to be a switch in hashlink when generating the source to not use the EFX bindings?

I noticed the bindings themselves are wrapped in #if ALC_EXT_EFX, however the hl code generation was assuming that it would be available regardless, or I miss configured something.

thejustinwalsh commented 6 years ago

Still haven't managed to switch off EFX or get anything compiling against OpenAL. My first approach was to modify heaps and instead of exporting class EFX just give it stubbed implementation instead. I am still getting references in functions.c to a bunch of openal functions that the linker can not find, (since ALC_EXT_EFX is off when compiling the openal stuff in hashlink.

@rtissera Any pointers you can share?

thejustinwalsh commented 6 years ago

Posted too soon, I was generating the src into the wrong location. Here is the EFX hack, that I think could be put behind a compile time constant pretty easily...

package openal;
import openal.AL;

abstract Effect(Int) {
    public inline function toInt() : Int { return this; }
    public static inline function ofInt( v : Int ) : Effect { return cast v; }
}

abstract Filter(Int) {
    public inline function toInt() : Int { return this; }
    public static inline function ofInt( v : Int ) : Filter { return cast v; }
}

abstract EffectSlot(Int) {
    public inline function toInt() : Int { return this; }
    public static inline function ofInt( v : Int ) : EffectSlot { return cast v; }
}

// ------------------------------------------------------------------------
// ALC_EXT_EFX
// ------------------------------------------------------------------------

//@:hlNative("openal","al_")
class EFX {
    // Device attributes
    public static inline var EFX_MAJOR_VERSION                     = 0x20001;
    public static inline var EFX_MINOR_VERSION                     = 0x20002;
    public static inline var MAX_AUXILIARY_SENDS                   = 0x20003;

    // Listener properties.
    public static inline var METERS_PER_UNIT                       = 0x20004;

    // Source properties.
    public static inline var DIRECT_FILTER                         = 0x20005;
    public static inline var AUXILIARY_SEND_FILTER                 = 0x20006;
    public static inline var AIR_ABSORPTION_FACTOR                 = 0x20007;
    public static inline var ROOM_ROLLOFF_FACTOR                   = 0x20008;
    public static inline var CONE_OUTER_GAINHF                     = 0x20009;
    public static inline var DIRECT_FILTER_GAINHF_AUTO             = 0x2000A;
    public static inline var AUXILIARY_SEND_FILTER_GAIN_AUTO       = 0x2000B;
    public static inline var AUXILIARY_SEND_FILTER_GAINHF_AUTO     = 0x2000C;

    // Effect properties.

    // Reverb effect parameters
    public static inline var REVERB_DENSITY                        = 0x0001;
    public static inline var REVERB_DIFFUSION                      = 0x0002;
    public static inline var REVERB_GAIN                           = 0x0003;
    public static inline var REVERB_GAINHF                         = 0x0004;
    public static inline var REVERB_DECAY_TIME                     = 0x0005;
    public static inline var REVERB_DECAY_HFRATIO                  = 0x0006;
    public static inline var REVERB_REFLECTIONS_GAIN               = 0x0007;
    public static inline var REVERB_REFLECTIONS_DELAY              = 0x0008;
    public static inline var REVERB_LATE_REVERB_GAIN               = 0x0009;
    public static inline var REVERB_LATE_REVERB_DELAY              = 0x000A;
    public static inline var REVERB_AIR_ABSORPTION_GAINHF          = 0x000B;
    public static inline var REVERB_ROOM_ROLLOFF_FACTOR            = 0x000C;
    public static inline var REVERB_DECAY_HFLIMIT                  = 0x000D;

    // EAX Reverb effect parameters
    public static inline var EAXREVERB_DENSITY                     = 0x0001;
    public static inline var EAXREVERB_DIFFUSION                   = 0x0002;
    public static inline var EAXREVERB_GAIN                        = 0x0003;
    public static inline var EAXREVERB_GAINHF                      = 0x0004;
    public static inline var EAXREVERB_GAINLF                      = 0x0005;
    public static inline var EAXREVERB_DECAY_TIME                  = 0x0006;
    public static inline var EAXREVERB_DECAY_HFRATIO               = 0x0007;
    public static inline var EAXREVERB_DECAY_LFRATIO               = 0x0008;
    public static inline var EAXREVERB_REFLECTIONS_GAIN            = 0x0009;
    public static inline var EAXREVERB_REFLECTIONS_DELAY           = 0x000A;
    public static inline var EAXREVERB_REFLECTIONS_PAN             = 0x000B;
    public static inline var EAXREVERB_LATE_REVERB_GAIN            = 0x000C;
    public static inline var EAXREVERB_LATE_REVERB_DELAY           = 0x000D;
    public static inline var EAXREVERB_LATE_REVERB_PAN             = 0x000E;
    public static inline var EAXREVERB_ECHO_TIME                   = 0x000F;
    public static inline var EAXREVERB_ECHO_DEPTH                  = 0x0010;
    public static inline var EAXREVERB_MODULATION_TIME             = 0x0011;
    public static inline var EAXREVERB_MODULATION_DEPTH            = 0x0012;
    public static inline var EAXREVERB_AIR_ABSORPTION_GAINHF       = 0x0013;
    public static inline var EAXREVERB_HFREFERENCE                 = 0x0014;
    public static inline var EAXREVERB_LFREFERENCE                 = 0x0015;
    public static inline var EAXREVERB_ROOM_ROLLOFF_FACTOR         = 0x0016;
    public static inline var EAXREVERB_DECAY_HFLIMIT               = 0x0017;

    // Chorus effect parameters
    public static inline var CHORUS_WAVEFORM                       = 0x0001;
    public static inline var CHORUS_PHASE                          = 0x0002;
    public static inline var CHORUS_RATE                           = 0x0003;
    public static inline var CHORUS_DEPTH                          = 0x0004;
    public static inline var CHORUS_FEEDBACK                       = 0x0005;
    public static inline var CHORUS_DELAY                          = 0x0006;

    // Distortion effect parameters
    public static inline var DISTORTION_EDGE                       = 0x0001;
    public static inline var DISTORTION_GAIN                       = 0x0002;
    public static inline var DISTORTION_LOWPASS_CUTOFF             = 0x0003;
    public static inline var DISTORTION_EQCENTER                   = 0x0004;
    public static inline var DISTORTION_EQBANDWIDTH                = 0x0005;

    // Echo effect parameters
    public static inline var ECHO_DELAY                            = 0x0001;
    public static inline var ECHO_LRDELAY                          = 0x0002;
    public static inline var ECHO_DAMPING                          = 0x0003;
    public static inline var ECHO_FEEDBACK                         = 0x0004;
    public static inline var ECHO_SPREAD                           = 0x0005;

    // Flanger effect parameters
    public static inline var FLANGER_WAVEFORM                      = 0x0001;
    public static inline var FLANGER_PHASE                         = 0x0002;
    public static inline var FLANGER_RATE                          = 0x0003;
    public static inline var FLANGER_DEPTH                         = 0x0004;
    public static inline var FLANGER_FEEDBACK                      = 0x0005;
    public static inline var FLANGER_DELAY                         = 0x0006;

    // Frequency shifter effect parameters
    public static inline var FREQUENCY_SHIFTER_FREQUENCY           = 0x0001;
    public static inline var FREQUENCY_SHIFTER_LEFT_DIRECTION      = 0x0002;
    public static inline var FREQUENCY_SHIFTER_RIGHT_DIRECTION     = 0x0003;

    // Vocal morpher effect parameters
    public static inline var VOCAL_MORPHER_PHONEMEA                = 0x0001;
    public static inline var VOCAL_MORPHER_PHONEMEA_COARSE_TUNING  = 0x0002;
    public static inline var VOCAL_MORPHER_PHONEMEB                = 0x0003;
    public static inline var VOCAL_MORPHER_PHONEMEB_COARSE_TUNING  = 0x0004;
    public static inline var VOCAL_MORPHER_WAVEFORM                = 0x0005;
    public static inline var VOCAL_MORPHER_RATE                    = 0x0006;

    // Pitchshifter effect parameters
    public static inline var PITCH_SHIFTER_COARSE_TUNE             = 0x0001;
    public static inline var PITCH_SHIFTER_FINE_TUNE               = 0x0002;

    // Ringmodulator effect parameters
    public static inline var RING_MODULATOR_FREQUENCY              = 0x0001;
    public static inline var RING_MODULATOR_HIGHPASS_CUTOFF        = 0x0002;
    public static inline var RING_MODULATOR_WAVEFORM               = 0x0003;

    // Autowah effect parameters
    public static inline var AUTOWAH_ATTACK_TIME                   = 0x0001;
    public static inline var AUTOWAH_RELEASE_TIME                  = 0x0002;
    public static inline var AUTOWAH_RESONANCE                     = 0x0003;
    public static inline var AUTOWAH_PEAK_GAIN                     = 0x0004;

    // Compressor effect parameters
    public static inline var COMPRESSOR_ONOFF                      = 0x0001;

    // Equalizer effect parameters
    public static inline var EQUALIZER_LOW_GAIN                    = 0x0001;
    public static inline var EQUALIZER_LOW_CUTOFF                  = 0x0002;
    public static inline var EQUALIZER_MID1_GAIN                   = 0x0003;
    public static inline var EQUALIZER_MID1_CENTER                 = 0x0004;
    public static inline var EQUALIZER_MID1_WIDTH                  = 0x0005;
    public static inline var EQUALIZER_MID2_GAIN                   = 0x0006;
    public static inline var EQUALIZER_MID2_CENTER                 = 0x0007;
    public static inline var EQUALIZER_MID2_WIDTH                  = 0x0008;
    public static inline var EQUALIZER_HIGH_GAIN                   = 0x0009;
    public static inline var EQUALIZER_HIGH_CUTOFF                 = 0x000A;

    // Effect type
    public static inline var EFFECT_FIRST_PARAMETER                = 0x0000;
    public static inline var EFFECT_LAST_PARAMETER                 = 0x8000;
    public static inline var EFFECT_TYPE                           = 0x8001;

    // Effect types, used with the AL_EFFECT_TYPE property
    public static inline var EFFECT_NULL                           = 0x0000;
    public static inline var EFFECT_REVERB                         = 0x0001;
    public static inline var EFFECT_CHORUS                         = 0x0002;
    public static inline var EFFECT_DISTORTION                     = 0x0003;
    public static inline var EFFECT_ECHO                           = 0x0004;
    public static inline var EFFECT_FLANGER                        = 0x0005;
    public static inline var EFFECT_FREQUENCY_SHIFTER              = 0x0006;
    public static inline var EFFECT_VOCAL_MORPHER                  = 0x0007;
    public static inline var EFFECT_PITCH_SHIFTER                  = 0x0008;
    public static inline var EFFECT_RING_MODULATOR                 = 0x0009;
    public static inline var EFFECT_AUTOWAH                        = 0x000A;
    public static inline var EFFECT_COMPRESSOR                     = 0x000B;
    public static inline var EFFECT_EQUALIZER                      = 0x000C;
    public static inline var EFFECT_EAXREVERB                      = 0x8000;

    // Auxiliary Effect Slot properties.
    public static inline var EFFECTSLOT_EFFECT                     = 0x0001;
    public static inline var EFFECTSLOT_GAIN                       = 0x0002;
    public static inline var EFFECTSLOT_AUXILIARY_SEND_AUTO        = 0x0003;

    // NULL Auxiliary Slot ID to disable a source send.
    public static inline var EFFECTSLOT_NULL                       = 0x0000;

    // Filter properties.

    // Lowpass filter parameters
    public static inline var LOWPASS_GAIN                          = 0x0001;
    public static inline var LOWPASS_GAINHF                        = 0x0002;

    // Highpass filter parameters
    public static inline var HIGHPASS_GAIN                         = 0x0001;
    public static inline var HIGHPASS_GAINLF                       = 0x0002;

    // Bandpass filter parameters
    public static inline var BANDPASS_GAIN                         = 0x0001;
    public static inline var BANDPASS_GAINLF                       = 0x0002;
    public static inline var BANDPASS_GAINHF                       = 0x0003;

    // Filter type
    public static inline var FILTER_FIRST_PARAMETER                = 0x0000;
    public static inline var FILTER_LAST_PARAMETER                 = 0x8000;
    public static inline var FILTER_TYPE                           = 0x8001;

    // Filter types, used with the AL_FILTER_TYPE property
    public static inline var FILTER_NULL                           = 0x0000;
    public static inline var FILTER_LOWPASS                        = 0x0001;
    public static inline var FILTER_HIGHPASS                       = 0x0002;
    public static inline var FILTER_BANDPASS                       = 0x0003;

    public static function genEffects    (n : Int, effects : hl.Bytes) : Void { }
    public static function deleteEffects (n : Int, effects : hl.Bytes) : Void { }
    public static function isEffect      (effect : Effect) : Bool { return false; }
    public static function effecti       (effect : Effect, param : Int, iValue    : Int)      : Void { }
    public static function effectiv      (effect : Effect, param : Int, piValues  : hl.Bytes) : Void { }
    public static function effectf       (effect : Effect, param : Int, flValue   : hl.F32)   : Void { }
    public static function effectfv      (effect : Effect, param : Int, pflValues : hl.Bytes) : Void { }
    public static function getEffecti    (effect : Effect, param : Int)                       : Int { return 0; }
    public static function getEffectiv   (effect : Effect, param : Int, piValues  : hl.Bytes) : Void { };
    public static function getEffectf    (effect : Effect, param : Int)                       : hl.F32 { return 0; }
    public static function getEffectfv   (effect : Effect, param : Int, pflValues : hl.Bytes) : Void { }

    public static function genFilters    (n : Int, filters : hl.Bytes) : Void { }
    public static function deleteFilters (n : Int, filters : hl.Bytes) : Void { }
    public static function isFilter      (filter : Filter) : Bool { return false; }
    public static function filteri       (filter : Filter, param : Int, iValue    : Int)      : Void { }
    public static function filteriv      (filter : Filter, param : Int, piValues  : hl.Bytes) : Void { }
    public static function filterf       (filter : Filter, param : Int, flValue   : hl.F32)   : Void { }
    public static function filterfv      (filter : Filter, param : Int, pflValues : hl.Bytes) : Void { }
    public static function getFilteri    (filter : Filter, param : Int)                       : Int { return 0; }
    public static function getFilteriv   (filter : Filter, param : Int, piValues  : hl.Bytes) : Void { }
    public static function getFilterf    (filter : Filter, param : Int)                       : hl.F32 { return 0; }
    public static function getFilterfv   (filter : Filter, param : Int, pflValues : hl.Bytes) : Void { }

    public static function genAuxiliaryEffectSlots    (n : Int, effectslots : hl.Bytes) : Void { }
    public static function deleteAuxiliaryEffectSlots (n : Int, effectslots : hl.Bytes) : Void { }
    public static function isAuxiliaryEffectSlot      (effectslot : EffectSlot) : Bool { return false; }
    public static function auxiliaryEffectSloti       (effectslot : EffectSlot, param : Int, iValue    : Int)      : Void { }
    public static function auxiliaryEffectSlotiv      (effectslot : EffectSlot, param : Int, piValues  : hl.Bytes) : Void { }
    public static function auxiliaryEffectSlotf       (effectslot : EffectSlot, param : Int, flValue   : hl.F32)   : Void { }
    public static function auxiliaryEffectSlotfv      (effectslot : EffectSlot, param : Int, pflValues : hl.Bytes) : Void { }
    public static function getAuxiliaryEffectSloti    (effectslot : EffectSlot, param : Int) : Int { return 0; }
    public static function getAuxiliaryEffectSlotiv   (effectslot : EffectSlot, param : Int, piValues  : hl.Bytes)  : Void { }
    public static function getAuxiliaryEffectSlotf    (effectslot : EffectSlot, param : Int) : hl.F32 { return 0; }
    public static function getAuxiliaryEffectSlotfv   (effectslot : EffectSlot, param : Int, pflValues : hl.Bytes)  : Void { }
}
thejustinwalsh commented 6 years ago

Had to add PNG_ARM_NEON_OPT=0 to preprocessor macros because arm64 didn't want to link with it enabled.

thejustinwalsh commented 6 years ago

I have about 9k duplicate symbols all coming from heaps now. So, everything is compiling and almost linking. Things like... _h2d_col_Matrix_prependTranslate defined in both MyApp-59865.o and Matrix-48723.0.

EDIT: Do not add anything other than the top level generated source from hl, i.e. MyApp.c to your project as it includes all the other c files it needs to compile.

thejustinwalsh commented 6 years ago

@ncannasse Do you have a recommendation for a way to make EFX a configuration option, or long term would you prefer openal-soft compiled per platform as a dynamic library to stay in check with the lgpl?

starburst997 commented 6 years ago

Hey thanks @thejustinwalsh ! Got heaps (hlc) to run on both mac and iOS thanks to your tips (well I have a nice spinning red rectangle, will test the samples later and I do expect some roadblock haha).

Wasn't as hard as I expect, altho having some "official" XCode template would be super nice. Here's mine if anyone interested, might add a quick README eventually (the xcode project expect the hashlink folder to be at the same level as the git folder, see the build-c.hxml if it isn't clear) added submodules and the xcode project point to them.

https://github.com/starburst997/xcode-heaps

Also some minor fixes in hashlink for ios: https://github.com/starburst997/hashlink/tree/ios-fixes

Mind sharing yours? I'm curious

thejustinwalsh commented 6 years ago

@starburst997 Awesome! I am working on a template that i'm about ready to share. Still working out some kinks. I'll post a link here. I'm also working on a few PRs for mobile support for the main hashlink and heaps repos.

starburst997 commented 6 years ago

Alright, got all samples running and working, the 3D ones, like "world" have a few visual glitches, I was pleasantly surprised that I had to do nothing for the assets to somehow end up in the app (really need to check how this black magic is performed).

thejustinwalsh commented 6 years ago

@starburst997 Here are the only modifications I had to make to get hashlink compiling on iOS

Stubbing EFX.hx and wrapping a few gl calls with !defined(HL_MOBILE) in gl.c

Here is a script that I am using on appcenter.ms to fully install and compile everything from scratch on a fresh environment. It's not the prettiest but it compiles, links, and runs, with minimal modification.

In order to build, It required me syncing to very specific revisions of development repositories, so obviously as versions stabilize this will not be needed.

I am planning on submitting my modifications as a PR when I get some time this weekend, however the hack needed to EFX.hx probably wont fly, so finding a solution that allows a developer to turn it off / on for specific platforms / targets would be ideal.

I use the same script for boot-strapping my project where I have the dependencies installed already as well. Additionally, I added a Run Script phase to my Xcode Project that generates the source and creates the res.pak file before compiling and bundling. That script is the tail end of my boot-strap script above.

As soon as a fix for OpenAL/EFX and OpenGL/GLES go in, I believe this issue should be marked as closed / archived. Additionally we should probably create a new issue for the OpenAL/EFX thing to reduce the noise.

starburst997 commented 6 years ago

Nice! Looks very similar to the edit I had to do, did you try to build like the "World" samples from heaps? Did you have any visual glitch? Here's what it look like on my iphone 7

heaps_test

No issue on 2D as far as I can see yet.

thejustinwalsh commented 6 years ago

I'll try the World sample soon and let you know.

tanis2000 commented 6 years ago

I see that there's a fork from the guys at Playdigious here https://github.com/playdigious/hashlink It looks like most of the changes haven't been merged back into this repo. Is there any plan in building a toolset to actually create the iOS project with all the dependencies (eventually already compiled as hdll from a CI server) starting from an Heaps project?

ncannasse commented 6 years ago

@tanis2000 I think we have merged the most important things, I'm sure @rtissera can tell more about it.

tanis2000 commented 6 years ago

That’s good. I’ve been thinking about something like https://github.com/native-toolkit but for projects using HL. Maybe we can build repos for all of the libraries involved so that they can be easily compiled for the different platforms and included as static/dynamic libraries as needed. But then we would need a tool to coordinate all that and eventually run the various builds on CI servers so that precompiled libraries can be bundled. Just thinking out loud.

jeremyfa commented 6 years ago

Following this topic silently, out of curiosity I tried to build libjpeg-turbo from source for iOS and iOS Simulator with bitcode enabled.

Although I didn't tested the resulting binary in a project, I successfuly built (from mac) a universal binary (armv7, arm64, i386, x86_64). You can find the build script I setup and used (and the binary) there. Hopefully this binary will work for HEAPS/Xcode projects and solve the bitcode problem?

kkukshtel commented 5 years ago

Any movement on this? Looking at Heaps for an iOS project and unclear what state it's in.

felixakiragreen commented 5 years ago

I have a game that is nearly complete, still working on trying to get the iOS build to work correctly so I can publish to App Store.

kkukshtel commented 5 years ago

@xenophilicibex Have you gotten iOS running properly then? If so, would love to see if you have code anywhere or have written a guide about how to do it!

felixakiragreen commented 5 years ago

@kkukshtel I was able to get this project: https://github.com/starburst997/xcode-heaps up & running. But was not successful in getting my game running, I just get a black screen, though logging is working. I hope to get some time in the next few weeks to really dig in and figure out the iOS build so I can publish it.

Edit: I think the only thing really holding Heaps back is the ease of publishing. I got stuck in May 2018, and gave up for the time being, hoping there would be a community solution by the time I came back.

starburst997 commented 5 years ago

I could update that sample, I do have a running version of heaps on iOS but haven't updated that repo in a while, don't have much time this week but maybe I could get something this we

kkukshtel commented 5 years ago

Would definitely love to see an updated version! Understand if you don't have time but there are a fair amount of people both on the forums/on the discord asking for something.

On Wed, Mar 27, 2019 at 12:44 PM Jean-Denis Boivin notifications@github.com wrote:

I could update that sample, I do have a running version of heaps on iOS but haven't updated that repo in a while, don't have much time this week but maybe I could get something this we

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/HaxeFoundation/hashlink/issues/144#issuecomment-477246789, or mute the thread https://github.com/notifications/unsubscribe-auth/AHW5z2YrYciGCpIZGQ2ZSlq1MsMJeoyIks5va5_kgaJpZM4T28Pm .

thejustinwalsh commented 5 years ago

Got my old sample project compiling once again with haxe 4.0.0-rc2, heaps 1.6.1, and hashlink 1.9.0 for iOS. Still had to create an efx shim to get it to compile when using OpenAL.framework for iOS included with the iOS SDK.

No other hacks needed this time though, and shimming the EFX calls in a simple c file is way easier than patching hashlink.

Updated build script to match as well... The last piece of the puzzle is just the Xcode project itself. Working on stripping down my Xcode project and uploading a shell project, however I already spent must of my weekend free time simply updating my own project.

thejustinwalsh commented 5 years ago

New template project for iOS is up! https://github.com/thejustinwalsh/heaps-ios

@starburst997 Same issues as you when using h3d or more specifically the World sample. Looks like triangles are choosing not to render, some kind of z-fighting / depth issue...

Not sure when or how diligent I will be in updating the sample when version change happens, however any PR is welcome. Currently working with haxe 4.0.0-rc.2+77068e1, hl 1.9.0, heaps 1.6.1, hxbit 1.4.1, format 3.4.2, hlsdl 1.9.0.

kkukshtel commented 5 years ago

This is excting, thanks for this! Any specific limitations besides h3d?

On Thu, Apr 11, 2019 at 3:41 PM Justin Walsh notifications@github.com wrote:

New template project for iOS is up! https://github.com/thejustinwalsh/heaps-ios

@starburst997 https://github.com/starburst997 Same issues as you when using h3d or more specifically the World sample. Looks like triangles are choosing not to render, some kind of z-fighting / depth issue...

Not sure when or how diligent I will be in updating the sample when version change happens, however any PR is welcome. Currently working with haxe 4.0.0-rc.2+77068e1, hl 1.9.0, heaps 1.6.1, hxbit 1.4.1, format 3.4.2, hlsdl 1.9.0.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/HaxeFoundation/hashlink/issues/144#issuecomment-482277051, or mute the thread https://github.com/notifications/unsubscribe-auth/AHW5z1GVs1K0WV61E36fX3tmRQXTKmOwks5vf4_WgaJpZM4T28Pm .

thejustinwalsh commented 5 years ago

I'll have to update the readme now that you mention it...

thejustinwalsh commented 5 years ago

So just tried the heaps samples on my iPhone in the web browser. Same visual artifacts are happening there as well with the skinning and world samples. That bug seems to be heaps related or specific to some apple OpenGL to metal translation? Regardless I will create a new issue in heaps specifically with screen captures.

ncannasse commented 5 years ago

@thejustinwalsh check if it works better with https://github.com/HeapsIO/heaps/pull/599

thejustinwalsh commented 5 years ago

@ncannasse I have merged in the above PR (HeapsIO/heaps#599) and am not seeing any better results. Suggesting we move further discussion of particular issue to HeapsIO/heaps#602.

qkdreyer commented 4 years ago

I've finally managed to compile a heaps project using https://github.com/thejustinwalsh/heaps-ios as a base project.

These are the modifications I had to apply to fully make it work :

You will also need to update the App.xcodeproj DEVELOPMENT_TEAM and PRODUCT_BUNDLE_IDENTIFIER in the Signing & Capabilities target tab.

You will also need to define sdlSdlval in the GCC_PREPROCESSOR_DEFINITIONS because of this : https://github.com/HaxeFoundation/hashlink/pull/101/files#diff-2e6cb46956f711087d1dde23e196527fR24

ncannasse commented 4 years ago