Hi all,
I really don't know where to post this thread, OpenGL, SDL, Nix,...? I finally choose Nehe.
In fact, i'm running Redhat linux 9.0 and using the SDL\Linux port for NeHe's tutorials. Everything is ok, compile,link,run! Everything is fine when i call the program from the terminal, but when i click on it, the textures just don't show up. What's wrong?
SDL\Linux port problem
"...and we all know what "undefined" means: it means it works during development, it works during testing, and it blows up in your most important customers' faces."----------Scott Meyers, "Effective C++"
My guess is that the paths to the texture files are relative paths. So it's likely when you launch from a terminal, the process is launched from its parent directory, but *not* when launched from a file manager.
A good solution is to modify the program so that it'll manage to find the textures directory.
Hints :
- argv[0] will give a path to the binary (use the dirname function) ;
- the PATH environment variable might be necessary if this path is not absolute.
A good solution is to modify the program so that it'll manage to find the textures directory.
Hints :
- argv[0] will give a path to the binary (use the dirname function) ;
- the PATH environment variable might be necessary if this path is not absolute.
SaM3d!, a cross-platform API for 3d based on SDL and OpenGL.The trouble is that things never get better, they just stay the same, only more so. -- (Terry Pratchett, Eric)
another possibility is case sensitivity.
file "Texture.jpg"
you call "texture.jpg"
that sort of thing.
file "Texture.jpg"
you call "texture.jpg"
that sort of thing.
lonesockPiranha are people too.www.lonesock.netSOIL: Simple OpenGL Image LibraryMovies I've mocked: "The Core", "The Mummy", "Tale of Despereaux"
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement