PageRenderTime 1008ms CodeModel.GetById 816ms app.highlight 1ms RepoModel.GetById 190ms app.codeStats 0ms

/OJGL/GLMaterial.j

http://github.com/tartiflop/ojgl
Unknown | 47 lines | 31 code | 16 blank | 0 comment | 0 complexity | b11b1a9f364c8b02f2d79d6a3e51c45b MD5 | raw file
 1@import <Foundation/CPObject.j>
 2@import "GLContext.j"
 3@import "GLRenderer.j"
 4@import "GLPrimitive.j"
 5@import "../renderers/RendererManager.j"
 6
 7@implementation GLMaterial : CPObject {
 8	GLPrimitive _primitive;
 9	
10	String _rendererType;
11	
12}
13
14- (id)initWithRendererType:(String)rendererType {
15	self = [super init];
16	
17	if (self) {
18		_rendererType = rendererType;
19		[[RendererManager getInstance] registerRenderer:rendererType];
20	}
21	
22	return self;
23}
24
25
26- (void)setPrimitive:(GLPrimitive)primitive {
27	_primitive = primitive;
28}
29
30- (GLPrimitive)getPrimitive {
31	return _primitive;
32}
33
34- (void)prepareGL:(GLContext)glContext {
35
36}
37
38- (void)prepareRenderer {
39
40}
41
42- (String)getRendererType {
43	return _rendererType;
44}
45
46
47@end