Comments (9)
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.
Oh i forgot libsdl2-image!
It works fine now, thanks!
from fna-mghistory.
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.
What does otool -L libSDL2_image-2.0.0.dylib
return?
from fna-mghistory.
➜ 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.
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.
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.
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.
Yeah, I dunno much about Xamarin Studio - it's probably just using the wrong path.
from fna-mghistory.
Related Issues (20)
- shader normalmap not work HOT 3
- Can't run on machine without audio device HOT 9
- [OpenGL] VMware/VBox Support? HOT 7
- [MojoShader] MOJOSHADER_glSetVertexAttribDivisor causes 'System.AccessViolationException' on some computers HOT 3
- [Keyboard] Proposal for Keyboard.GetLayoutEXT() HOT 1
- Microsoft.Xna.Framework.Input.GamePad.INTERNAL_AddInstance throws "An element with the same key already exists in the dictionary" HOT 2
- Triangle color is wrong with fairly simple shader + access violation exception HOT 7
- Initialization order mishap HOT 3
- GraphicsDeviceManager never set in Game HOT 1
- GL Object Disposal Wrappers are not thread-safe HOT 3
- DynamicSoundEffectInstance behavior incompatible with XNA4 HOT 8
- OpenGL 3.2+ Core Profile support HOT 4
- Starting game in full screen bug HOT 8
- Null reference when disposing sound effect after checking sound device exists HOT 5
- [QUESTIONS] learning, using FNA HOT 3
- More spec-compliant Touch Support HOT 34
- FNA Binary Release HOT 1
- RasterizerState.MultiSampleAntiAlias not implemented HOT 8
- Set Render Target to Another Window HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fna-mghistory.