Files
geant4/source/analysis/g4tools/include/tools/sg/gl_manager
T
2016-12-09 12:35:28 +01:00

47 lines
1.4 KiB
Plaintext

// Copyright (C) 2010, Guy Barrand. All rights reserved.
// See the file tools.license for terms.
#ifndef tools_sg_gl_manager
#define tools_sg_gl_manager
#include "enums"
#include "senums"
#include "../img"
#include "../vdata"
namespace tools {
namespace sg {
class gl_manager {
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 tools::img_byte&) = 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 ~gl_manager(){}
public:
unsigned int create_gsto_from_data(const std::vector<float>& a_xyzs){
const float* _xyzs = vec_data<float>(a_xyzs);
return create_gsto_from_data(a_xyzs.size(),_xyzs);
}
};
}}
#endif