1
0
mirror of https://github.com/rwengine/openrw.git synced 2024-09-20 09:21:44 +02:00
openrw/rwengine/include/loaders/TextureLoader.hpp

42 lines
744 B
C++
Raw Normal View History

2013-07-02 08:06:03 +02:00
#pragma once
#ifndef _TEXTURELOADER_HPP_
#define _TEXTURELOADER_HPP_
2013-07-02 08:06:03 +02:00
#define GLEW_STATIC
#include <GL/glew.h>
#include <loaders/rwbinarystream.h>
2013-07-02 08:06:03 +02:00
#include <string>
#include <map>
2013-12-20 17:02:46 +01:00
class GameData;
2013-09-11 20:23:31 +02:00
2013-07-02 08:06:03 +02:00
class TextureLoader
{
public:
2013-12-20 17:02:46 +01:00
bool loadFromFile(std::string filename, GameData* gameData);
bool loadFromMemory(char *data, GameData* gameData);
2013-07-02 08:06:03 +02:00
};
2014-06-06 13:18:32 +02:00
#include <WorkContext.hpp>
#include <functional>
// TODO: refactor this interface to be more like ModelLoader so they can be rolled into one.
class LoadTextureArchiveJob : public WorkJob
{
private:
GameData* _gameData;
std::string _file;
char* _data;
public:
LoadTextureArchiveJob(WorkContext* context, GameData* gd, const std::string& file);
void work();
void complete();
};
2013-09-08 21:14:48 +02:00
#endif