axmol/extensions/Effekseer/EffekseerRendererGL/EffekseerRenderer/EffekseerRendererGL.Renderer.h

112 lines
3.3 KiB
C
Raw Normal View History


#ifndef __EFFEKSEERRENDERER_GL_RENDERER_H__
#define __EFFEKSEERRENDERER_GL_RENDERER_H__
//----------------------------------------------------------------------------------
// Include
//----------------------------------------------------------------------------------
#include "../../EffekseerRendererCommon/EffekseerRenderer.Renderer.h"
#include "EffekseerRendererGL.Base.h"
//----------------------------------------------------------------------------------
// Lib
//----------------------------------------------------------------------------------
//----------------------------------------------------------------------------------
//
//----------------------------------------------------------------------------------
namespace EffekseerRendererGL
{
::Effekseer::Backend::GraphicsDeviceRef CreateGraphicsDevice(OpenGLDeviceType deviceType, bool isExtensionsEnabled = true);
::Effekseer::MaterialLoaderRef CreateMaterialLoader(Effekseer::Backend::GraphicsDeviceRef graphicsDevice,
::Effekseer::FileInterfaceRef fileInterface = nullptr);
Effekseer::Backend::TextureRef CreateTexture(Effekseer::Backend::GraphicsDeviceRef graphicsDevice, GLuint buffer, bool hasMipmap, const std::function<void()>& onDisposed);
/**
@brief \~English Properties in a texture
\~Japanese
*/
struct TextureProperty
{
GLuint Buffer = 0;
};
TextureProperty GetTextureProperty(::Effekseer::Backend::TextureRef texture);
class Renderer;
using RendererRef = ::Effekseer::RefPtr<Renderer>;
class Renderer : public ::EffekseerRenderer::Renderer
{
protected:
Renderer()
{
}
virtual ~Renderer()
{
}
public:
/**
@brief
\~english Create an instance
\~japanese
@param squareMaxCount
\~english the number of maximum sprites
\~japanese
@param deviceType
\~english device type of opengl
\~japanese
@param isExtensionsEnabled
\~english whether does make extensions enabled.
\~japanese
@return
\~english instance
\~japanese
*/
static RendererRef Create(int32_t squareMaxCount, OpenGLDeviceType deviceType = OpenGLDeviceType::OpenGL2, bool isExtensionsEnabled = true);
static RendererRef Create(Effekseer::Backend::GraphicsDeviceRef graphicsDevice, int32_t squareMaxCount);
/**
@brief
*/
virtual int32_t GetSquareMaxCount() const = 0;
/**
@brief
@note
使
*/
virtual void SetSquareMaxCount(int32_t count) = 0;
/**
@brief
\~english Specify a background.
\~japanese
*/
virtual void SetBackground(GLuint background, bool hasMipmap = false) = 0;
/**
@brief
\~english get a device type
\~japanese
*/
virtual OpenGLDeviceType GetDeviceType() const = 0;
/**
@brief
\~english get whether VAO is supported
\~japanese VAOがサポートされているか取得する
*/
virtual bool IsVertexArrayObjectSupported() const = 0;
};
} // namespace EffekseerRendererGL
//----------------------------------------------------------------------------------
//
//----------------------------------------------------------------------------------
#endif // __EFFEKSEERRENDERER_GL_RENDERER_H__