Danbias/Code/OysterGraphics/DllInterfaces/GFXAPI.h

71 lines
1.9 KiB
C
Raw Normal View History

2013-11-26 13:44:58 +01:00
#pragma once
#include <string>
#include "../Definitions/GraphicalDefinition.h"
2013-11-26 13:44:58 +01:00
#include "..\Model\Model.h"
#include "OysterMath.h"
#include <Windows.h>
//#include <vld.h>
2013-11-26 13:44:58 +01:00
2013-12-04 09:36:43 +01:00
#ifdef GFX_DLL_EXPORT
2013-11-26 15:33:05 +01:00
#define GFX_DLL_USAGE __declspec(dllexport)
#else
2013-12-04 09:36:43 +01:00
#define GFX_DLL_USAGE
2013-11-26 15:33:05 +01:00
#endif
2013-11-26 13:44:58 +01:00
namespace Oyster
{
namespace Graphics
{
2013-11-26 15:33:05 +01:00
class GFX_DLL_USAGE API
2013-11-26 13:44:58 +01:00
{
public:
enum State
{
Sucsess,
Fail
};
struct Option
{
2014-01-31 16:29:50 +01:00
std::wstring modelPath, texturePath;
2013-11-26 13:44:58 +01:00
};
2013-11-26 15:33:05 +01:00
static State Init(HWND Window, bool MSAA_Quality, bool Fullscreen, Oyster::Math::Float2 StartResulotion);
2014-01-08 07:01:59 +01:00
#ifdef _DEBUG
static State ReloadShaders();
#endif
//! @todo Memory Leaks
//! @brief Clean Resources and release all memory
static void Clean();
2014-01-08 07:01:59 +01:00
//! @brief Sets the view matrix to use next frame
static void SetView(Oyster::Math::Float4x4& View);
2014-01-08 07:01:59 +01:00
//! @brief Sets the projection matrix to use next frame
static void SetProjection(Oyster::Math::Float4x4& Projection);
//! @brief will internally use last values from SetView and SetProjection
static void NewFrame();
2014-01-08 07:01:59 +01:00
//! @brief Renders a list of models
static void RenderScene(Oyster::Graphics::Model::Model models[], int count);
2014-01-08 07:01:59 +01:00
//! @brief Renders a single model
static void RenderModel(Oyster::Graphics::Model::Model& model);
2014-01-08 07:01:59 +01:00
//! @brief Performs light calculations, post effects and presents the scene
2013-11-26 13:44:58 +01:00
static void EndFrame();
2014-01-08 07:01:59 +01:00
//! @brief Creates a model from the supplied file, note: do not include .obj
2013-11-26 13:44:58 +01:00
static Oyster::Graphics::Model::Model* CreateModel(std::wstring filename);
2014-01-08 07:01:59 +01:00
//! @brief deletes a model and relases the models resources
2013-11-26 13:44:58 +01:00
static void DeleteModel(Oyster::Graphics::Model::Model* model);
2014-01-08 07:01:59 +01:00
//! @brief adds a light to the scene
static void AddLight(Definitions::Pointlight light);
2014-01-08 07:01:59 +01:00
//! @brief removes all lights from the scene
static void ClearLights();
2014-01-08 07:01:59 +01:00
//! @brief Sets Options to the graphics, note: currently unused
2013-11-26 13:44:58 +01:00
static State SetOptions(Option);
};
}
}