Skip to content

Instantly share code, notes, and snippets.

@bananu7
Created January 17, 2013 18:02
Show Gist options
  • Save bananu7/4558067 to your computer and use it in GitHub Desktop.
Save bananu7/4558067 to your computer and use it in GitHub Desktop.
I have an issue
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