File: material.hpp

package info (click to toggle)
python-visual 1%3A5.12-1.1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 7,672 kB
  • ctags: 7,636
  • sloc: cpp: 15,593; sh: 9,615; ansic: 6,631; python: 4,737; makefile: 385
file content (45 lines) | stat: -rw-r--r-- 894 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#ifndef VPYTHON_MATERIAL_HPP
#define VPYTHON_MATERIAL_HPP
#pragma once

#include "util/texture.hpp"
#include "util/shader_program.hpp"

namespace cvisual {

class material {
 public:
	material();

	void set_textures( std::vector< boost::shared_ptr< texture > > );
	std::vector< boost::shared_ptr< texture > > get_textures();
	
	void set_shader( const std::string& );
	std::string get_shader();
	
	void set_translucent( bool );
	bool get_translucent();
	
	shader_program* get_shader_program() { return shader.get(); }

 private:
	friend class apply_material;
	
	std::vector< boost::shared_ptr< texture > > textures;
	boost::scoped_ptr< shader_program > shader;
	bool translucent;
};

class apply_material {
 public:
	apply_material( const view& v, material* m, tmatrix& material_matrix );
	~apply_material();

 private:
	const view& v;
	use_shader_program sp;
};

} // namespace cvisual

#endif