Pointlight no pointer Model render pointer
This commit is contained in:
parent
b80f594440
commit
e0f3031187
|
@ -35,7 +35,7 @@ void C_DynamicObj::setPos(Oyster::Math::Float4x4 world)
|
|||
|
||||
void C_DynamicObj::Render()
|
||||
{
|
||||
Oyster::Graphics::API::RenderModel(*(privData->model));
|
||||
Oyster::Graphics::API::RenderModel(privData->model);
|
||||
}
|
||||
void C_DynamicObj::Release()
|
||||
{
|
||||
|
|
|
@ -39,7 +39,7 @@ void C_Player::setPos(Oyster::Math::Float4x4 world)
|
|||
|
||||
void C_Player::Render()
|
||||
{
|
||||
Oyster::Graphics::API::RenderModel(*(privData->model));
|
||||
Oyster::Graphics::API::RenderModel(privData->model);
|
||||
}
|
||||
void C_Player::Release()
|
||||
{
|
||||
|
|
|
@ -38,7 +38,7 @@ void C_StaticObj::setPos(Oyster::Math::Float4x4 world)
|
|||
|
||||
void C_StaticObj::Render()
|
||||
{
|
||||
Oyster::Graphics::API::RenderModel(*(privData->model));
|
||||
Oyster::Graphics::API::RenderModel(privData->model);
|
||||
}
|
||||
void C_StaticObj::Release()
|
||||
{
|
||||
|
|
|
@ -34,7 +34,7 @@ void C_UIobject::setPos(Oyster::Math::Float4x4 world)
|
|||
|
||||
void C_UIobject::Render()
|
||||
{
|
||||
Oyster::Graphics::API::RenderModel(*(privData->model));
|
||||
Oyster::Graphics::API::RenderModel(privData->model);
|
||||
}
|
||||
void C_UIobject::Release()
|
||||
{
|
||||
|
|
|
@ -17,7 +17,7 @@ namespace Oyster
|
|||
{
|
||||
Math::Float4x4 View;
|
||||
Math::Float4x4 Projection;
|
||||
std::vector<Definitions::Pointlight*> Lights;
|
||||
std::vector<Definitions::Pointlight> Lights;
|
||||
float deltaTime;
|
||||
}
|
||||
|
||||
|
@ -55,7 +55,7 @@ namespace Oyster
|
|||
}
|
||||
else
|
||||
{
|
||||
Render::DefaultRenderer::NewFrame(View, Projection, NULL, 0);
|
||||
Render::DefaultRenderer::NewFrame(View, Projection, Definitions::Pointlight(), 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -128,7 +128,7 @@ namespace Oyster
|
|||
SAFE_RELEASE(Core::device);
|
||||
}
|
||||
|
||||
void API::AddLight(Definitions::Pointlight *light)
|
||||
void API::AddLight(Definitions::Pointlight light)
|
||||
{
|
||||
Lights.push_back(light);
|
||||
}
|
||||
|
|
|
@ -71,7 +71,7 @@ namespace Oyster
|
|||
static void DeleteTexture(Texture);
|
||||
|
||||
//! @brief adds a light to the scene
|
||||
static void AddLight(Definitions::Pointlight* light);
|
||||
static void AddLight(Definitions::Pointlight light);
|
||||
//! @brief removes all lights from the scene
|
||||
static void ClearLights();
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ namespace Oyster
|
|||
Model::Model* DefaultRenderer::cube = NULL;
|
||||
Model::Model* DefaultRenderer::cube2 = NULL;
|
||||
|
||||
void DefaultRenderer::NewFrame(Oyster::Math::Float4x4 View, Oyster::Math::Float4x4 Projection, Definitions::Pointlight* Lights, int numLights)
|
||||
void DefaultRenderer::NewFrame(Oyster::Math::Float4x4 View, Oyster::Math::Float4x4 Projection, Definitions::Pointlight Lights, int numLights)
|
||||
{
|
||||
Preparations::Basic::ClearBackBuffer(Oyster::Math::Float4(1,0,0,1));
|
||||
Preparations::Basic::ClearRTV(Resources::GBufferRTV,Resources::GBufferSize,Math::Float4(0,0,0,0));
|
||||
|
@ -37,7 +37,7 @@ namespace Oyster
|
|||
Resources::Light::LightConstantsData.Unmap();
|
||||
|
||||
data = Resources::Light::PointLightsData.Map();
|
||||
memcpy(data, Lights, sizeof(Definitions::Pointlight) * numLights);
|
||||
memcpy(data, &Lights, sizeof(Definitions::Pointlight) * numLights);
|
||||
Resources::Light::PointLightsData.Unmap();
|
||||
|
||||
Definitions::PostData pd;
|
||||
|
|
|
@ -13,7 +13,7 @@ namespace Oyster
|
|||
class DefaultRenderer
|
||||
{
|
||||
public:
|
||||
static void NewFrame(Oyster::Math::Float4x4 View, Oyster::Math::Float4x4 Projection, Definitions::Pointlight* Lights, int numLights);
|
||||
static void NewFrame(Oyster::Math::Float4x4 View, Oyster::Math::Float4x4 Projection, Definitions::Pointlight Lights, int numLights);
|
||||
static void RenderScene(Model::Model* models, int count, Math::Matrix View, Math::Matrix Projection, float DeltaTime = 0);
|
||||
static void EndFrame();
|
||||
|
||||
|
|
|
@ -187,7 +187,7 @@ HRESULT InitDirect3D()
|
|||
pl.Pos = Oyster::Math::Float3(0,-20.0f,0.4f);
|
||||
pl.Radius = 90;
|
||||
|
||||
Oyster::Graphics::API::AddLight(&pl);
|
||||
Oyster::Graphics::API::AddLight(pl);
|
||||
|
||||
|
||||
return S_OK;
|
||||
|
|
Loading…
Reference in New Issue