49 lines
1.5 KiB
Plaintext
49 lines
1.5 KiB
Plaintext
// Copyright (C) 2010, Guy Barrand. All rights reserved.
|
|
// See the file tools.license for terms.
|
|
|
|
#ifndef tools_sg_render_manager
|
|
#define tools_sg_render_manager
|
|
|
|
#include "enums"
|
|
#include "senums"
|
|
#include "../img"
|
|
#include "../scast"
|
|
|
|
namespace tools {
|
|
namespace sg {
|
|
|
|
class render_manager {
|
|
public:
|
|
virtual void* cast(const std::string&) const = 0;
|
|
public:
|
|
virtual bool begin_render(int,int, //drawing area pos
|
|
unsigned int,unsigned int, //drawing area size
|
|
float,float,float,float,bool a_clear = true) = 0; //back color
|
|
virtual void end_render() = 0;
|
|
|
|
virtual unsigned int create_texture(const img_byte&,bool /*a_NEAREST*/) = 0;
|
|
virtual unsigned int create_gsto_from_data(size_t,const float*) = 0;
|
|
|
|
virtual bool is_gsto_id_valid(unsigned int) const = 0;
|
|
virtual void delete_gsto(unsigned int) = 0;
|
|
|
|
// since rm of <TMGR,TRENDER> :
|
|
virtual gsto_mode get_gsto_mode() const = 0;
|
|
virtual void set_gsto_mode(gsto_mode) = 0;
|
|
virtual void available_gsto_modes(std::vector<std::string>&) = 0;
|
|
virtual void available_not_memory_gsto_mode(std::string&) const = 0;
|
|
virtual size_t used_texture_memory() const = 0;
|
|
virtual size_t gstos_size() const = 0;
|
|
public:
|
|
virtual ~render_manager(){}
|
|
public:
|
|
unsigned int create_gsto_from_data(const std::vector<float>& a_xyzs){
|
|
const float* _xyzs = a_xyzs.data();
|
|
return create_gsto_from_data(a_xyzs.size(),_xyzs);
|
|
}
|
|
};
|
|
|
|
}}
|
|
|
|
#endif
|