Git Product home page Git Product logo

Comments (9)

flibitijibibo avatar flibitijibibo commented on July 23, 2024

This is probably the line you care about:

https://github.com/flibitijibibo/FNA/blob/master/src/SDL2/SDL2_GamePlatform.cs#L671

SDL_GetError() will tell you what's wrong when that returns null.

from fna-mghistory.

 avatar commented on July 23, 2024

Oh i forgot libsdl2-image!

It works fine now, thanks!

from fna-mghistory.

 avatar commented on July 23, 2024

Hm, i just tried on OSX 10.11, and i have a similar issue, unable to load from stream

I tried to install sd2 and sdl2_image using homebrew, i also tried to compile from source but still unable to load texture..

Any idea?

SDL2_ERROR: Failed loading glProgramLocalParameterI4ivNV: dlsym(0x78755d90, _glProgramLocalParameterI4ivNV): symbol not found


<dllmap dll="SDL2_image.dll" os="osx" target="native/osx/libSDL2_image-2.0.0.dylib"/>


    System.DllNotFoundException: native/osx/libSDL2_image-2.0.0.dylib
      at at (wrapper managed-to-native) SDL2.SDL_image:IMG_Load_RW (intptr,int)
      at Microsoft.Xna.Framework.SDL2_GamePlatform.TextureDataFromStream (System.IO.Stream stream, System.Int32& width, System.Int32& height, System.Byte[]& pixels) [0x0002e] in /Users/scellow/Projects/CS/theroguer2/FNA/src/SDL2/SDL2_GamePlatform.cs:671
      at Microsoft.Xna.Framework.Graphics.Texture2D.TextureDataFromStreamEXT (System.IO.Stream stream, System.Int32& width, System.Int32& height, System.Byte[]& pixels) [0x0000f] in /Users/scellow/Projects/CS/theroguer2/FNA/src/Graphics/Texture2D.cs:284
      at Microsoft.Xna.Framework.Graphics.Texture2D.FromStream (Microsoft.Xna.Framework.Graphics.GraphicsDevice graphicsDevice, System.IO.Stream stream) [0x00008] in /Users/scellow/Projects/CS/theroguer2/FNA/src/Graphics/Texture2D.cs:250
      at Microsoft.Xna.Framework.Content.ContentManager.ReadRawAsset[Texture2D] (System.String assetName, System.String originalAssetName) [0x00052] in /Users/scellow/Projects/CS/theroguer2/FNA/src/Content/ContentManager.cs:506
      at Microsoft.Xna.Framework.Content.ContentManager.ReadAsset[Texture2D] (System.String assetName, System.Action`1 recordDisposableObject) [0x00145] in /Users/scellow/Projects/CS/theroguer2/FNA/src/Content/ContentManager.cs:435
      at Microsoft.Xna.Framework.Content.ContentManager.Load[Texture2D] (System.String assetName) [0x00077] in /Users/scellow/Projects/CS/theroguer2/FNA/src/Content/ContentManager.cs:260
      at theroguer.TextureManager.Init (Microsoft.Xna.Framework.Game game) [0x00025] in /Users/scellow/Projects/CS/theroguer2/theroguer/Managers/TextureManager.cs:19
      at theroguer.GameClient.Initialize () [0x00011] in /Users/scellow/Projects/CS/theroguer2/theroguer/GameClient.cs:46
      at Microsoft.Xna.Framework.Game.DoInitialize () [0x00013] in /Users/scellow/Projects/CS/theroguer2/FNA/src/Game.cs:712
      at Microsoft.Xna.Framework.Game.Run () [0x0003b] in /Users/scellow/Projects/CS/theroguer2/FNA/src/Game.cs:410
      at theroguer.MainClass.Main (System.String[] args) [0x00006] in /Users/scellow/Projects/CS/theroguer2/theroguer/Program.cs:12

from fna-mghistory.

flibitijibibo avatar flibitijibibo commented on July 23, 2024

What does otool -L libSDL2_image-2.0.0.dylib return?

from fna-mghistory.

 avatar commented on July 23, 2024
➜  lib otool -L libSDL2_image-2.0.0.dylib
libSDL2_image-2.0.0.dylib:
    /usr/local/lib/libSDL2_image-2.0.0.dylib (compatibility version 1.0.0, current version 1.0.0)
    /usr/local/lib/libSDL2-2.0.0.dylib (compatibility version 3.0.0, current version 3.1.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1225.0.0)
    /usr/lib/libiconv.2.dylib (compatibility version 7.0.0, current version 7.0.0)
    /usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 228.0.0)
    /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 48.0.0)
    /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1229.11.0)
    /System/Library/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics (compatibility version 64.0.0, current version 600.0.0)
    /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 726.4.0)
    /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO (compatibility version 1.0.0, current version 1.0.0)

from fna-mghistory.

flibitijibibo avatar flibitijibibo commented on July 23, 2024

Not sure. Be sure that the layout of the executables and native libs is exactly as specified in the FNA documentation, as the dylibs will need to look in the correct DYLD_LIBRARY_PATH as noted in the launch script.

from fna-mghistory.

 avatar commented on July 23, 2024

Strange thing is , when i run it from terminal using mono, it works just fine

But from Xamarin Studio i get the DllNotFoundException

I will restart from scratch, i might have done something wrong somewhere

from fna-mghistory.

 avatar commented on July 23, 2024

Created a new project, redownloaded FNA, redownloaded the libs, still same issue, unable to run from Xamarin Studio, only from terminal using mono

That's really strange, and i have no idea what's going on haha ^^

from fna-mghistory.

flibitijibibo avatar flibitijibibo commented on July 23, 2024

Yeah, I dunno much about Xamarin Studio - it's probably just using the wrong path.

from fna-mghistory.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.