Skip to content

Commit

Permalink
feat: #47 Add material
Browse files Browse the repository at this point in the history
  • Loading branch information
ducphamhong committed Jan 12, 2020
1 parent b5588c8 commit 904a955
Show file tree
Hide file tree
Showing 14 changed files with 1,162 additions and 114 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "pch.h"
#include "Material/CShaderManager.h"
#include "Material/Shader/CShaderManager.h"
#include "CLineDrawData.h"

namespace Skylicht
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ This file is part of the "Skylicht Engine".

#include "pch.h"
#include "CSkyDomeData.h"
#include "Material/CShaderManager.h"
#include "Material/Shader/CShaderManager.h"

namespace Skylicht
{
Expand Down
23 changes: 14 additions & 9 deletions Projects/Skylicht/Engine/Source/GameObject/CGameObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ namespace Skylicht
public:
static long s_objectID;
static std::map<long, long> s_mapObjIDOnFileSaved;
static bool s_repairIDMode;
static bool s_repairIDMode;

protected:
long m_objectID;
Expand All @@ -67,7 +67,7 @@ namespace Skylicht
CShaderParams m_shaderParams;

std::vector<CComponentSystem*> m_components;
public:
public:
CGameObject(CGameObject *parent, CZone *zone);

virtual ~CGameObject();
Expand Down Expand Up @@ -128,19 +128,24 @@ namespace Skylicht
inline void setParent(CGameObject *p)
{
m_parent = p;
}
}

inline CEntity* getEntity()
{
return m_entity;
}

inline CShaderParams& getShaderParams()
{
return m_shaderParams;
}

CEntityManager* getEntityManager();

CTransform* getTransform();

CTransformEuler* getTransformEuler();

inline bool isEnable()
{
return m_enable;
Expand Down Expand Up @@ -179,7 +184,7 @@ namespace Skylicht
inline bool isLighting()
{
return m_lighting;
}
}

inline void setLockObject(bool b)
{
Expand Down Expand Up @@ -220,14 +225,14 @@ namespace Skylicht
{
return m_tagDataString.c_str();
}

virtual void updateObject();

virtual void postUpdateObject();

virtual void endUpdate();

virtual void remove();
virtual void remove();

template<class T>
T* addComponent();
Expand Down Expand Up @@ -266,7 +271,7 @@ namespace Skylicht
m_components.push_back(compSystem);

compSystem->setOwner(this);
compSystem->initComponent();
compSystem->initComponent();

return newComp;
}
Expand Down
2 changes: 1 addition & 1 deletion Projects/Skylicht/Engine/Source/Graphics2D/CGraphics2D.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ This file is part of the "Skylicht Engine".
#include "pch.h"

#include "CGraphics2D.h"
#include "Material/CShaderManager.h"
#include "Material/Shader/CShaderManager.h"

#define MAX_VERTICES (128*4)
#define MAX_INDICES (128*6)
Expand Down
Loading

0 comments on commit 904a955

Please sign in to comment.