Initial import of KREngine
--HG-- extra : convert_revision : svn%3A7752d6cf-9f14-4ad2-affc-04f1e67b81a5/trunk%404
This commit is contained in:
46
objview/Classes/krengine/KRMaterial.h
Normal file
46
objview/Classes/krengine/KRMaterial.h
Normal file
@@ -0,0 +1,46 @@
|
||||
//
|
||||
// KRMaterial.h
|
||||
// gldemo
|
||||
//
|
||||
// Created by Kearwood Gilbert on 10-10-24.
|
||||
// Copyright (c) 2010 Kearwood Software. All rights reserved.
|
||||
//
|
||||
|
||||
#import <OpenGLES/ES2/gl.h>
|
||||
#import <OpenGLES/ES2/glext.h>
|
||||
#import <stdint.h>
|
||||
#import <list>
|
||||
using std::list;
|
||||
|
||||
#ifndef KRMATERIAL_H
|
||||
#define KRMATRIAL_H
|
||||
|
||||
#import "KRTexture.h"
|
||||
|
||||
class KRMaterial {
|
||||
public:
|
||||
KRMaterial();
|
||||
~KRMaterial();
|
||||
|
||||
void setAmbientMap(KRTexture *pTexture);
|
||||
void setDiffuseMap(KRTexture *pTexture);
|
||||
void setSpecularMap(KRTexture *pTexture);
|
||||
void setNormalMap(KRTexture *pTexture);
|
||||
void setAmbient(GLfloat r, GLfloat g, GLfloat b);
|
||||
void setDiffuse(GLfloat r, GLfloat g, GLfloat b);
|
||||
void setSpecular(GLfloat r, GLfloat g, GLfloat b);
|
||||
|
||||
void bind(GLuint program);
|
||||
|
||||
private:
|
||||
KRTexture *m_pAmbientMap; // mtl map_Ka value
|
||||
KRTexture *m_pDiffuseMap; // mtl map_Kd value
|
||||
KRTexture *m_pSpecularMap; // mtl map_Ks value
|
||||
KRTexture *m_pNormalMap; // mtl map_Normal value
|
||||
|
||||
GLfloat m_ka_r, m_ka_g, m_ka_b; // Ambient rgb
|
||||
GLfloat m_kd_r, m_kd_g, m_kd_b; // Diffuse rgb
|
||||
GLfloat m_ks_r, m_ks_g, m_ks_b; // Specular rgb
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user