Created
January 17, 2013 18:02
-
-
Save bananu7/4558067 to your computer and use it in GitHub Desktop.
I have an issue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ILoader | |
{ | |
public: | |
virtual boost::optional<std::string const&> GetParam(std::string const& name) const = 0; | |
virtual boost::optional<std::istream> GetDataStream(std::string const& name) = 0; | |
}; | |
class CSimpleFileLoader : | |
public ILoader | |
{ | |
std::map<std::string, std::string> Params; | |
public: | |
boost::optional<std::string const&> GetParam(std::string const& name) const override; | |
boost::optional<std::istream> GetDataStream(std::string const& name) override; | |
explicit CSimpleFileLoader (std::string const& simplePath) | |
{ | |
Params["path"] = simplePath; | |
} | |
}; | |
// THE ACTUAL PROBLEM: | |
//SOIL_load_OGL_texture_from_memory | |
// ( | |
// image_in_RAM, | |
// image_in_RAM_bytes, | |
std::string CImage::Load(ILoader const& loader) | |
{ | |
auto stream = loader.GetDataStream("main"); | |
m_TexId = SOIL_load_OGL_texture ( | |
// WAT NOW? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment