Removed duplicate constructor problems using the 'using' directive
This commit is contained in:
parent
cbcf9dad21
commit
6020231c23
@ -10,11 +10,10 @@ namespace charcoal
|
||||
{
|
||||
namespace builtin
|
||||
{
|
||||
class AutoPrerenderingScene : public Scene
|
||||
class AutoPrerenderingScene : public charcoal::Scene
|
||||
{
|
||||
public:
|
||||
AutoPrerenderingScene(Application& application) : Scene(application) {}
|
||||
virtual ~AutoPrerenderingScene() {}
|
||||
using charcoal::Scene::Scene;
|
||||
|
||||
void prerender() override;
|
||||
|
||||
|
@ -12,18 +12,7 @@ namespace charcoal
|
||||
class Batch : public PoseableBatch<Vertex, Index, Renderable>
|
||||
{
|
||||
public:
|
||||
Batch(
|
||||
Renderable* renderable,
|
||||
int element_count
|
||||
) : PoseableBatch<Vertex, Index, Renderable>(renderable, element_count)
|
||||
{}
|
||||
|
||||
Batch(
|
||||
Renderable* renderable,
|
||||
int element_count,
|
||||
int element_render_count
|
||||
) : PoseableBatch<Vertex, Index, Renderable>(renderable, element_count, element_render_count)
|
||||
{}
|
||||
using PoseableBatch<Vertex, Index, Renderable>::PoseableBatch;
|
||||
|
||||
protected:
|
||||
void setup_vao() override;
|
||||
|
@ -23,7 +23,6 @@ namespace charcoal
|
||||
{
|
||||
public:
|
||||
Scene(Application& application) : AutoPrerenderingScene(application) {}
|
||||
virtual ~Scene() {}
|
||||
|
||||
void init() override;
|
||||
|
||||
|
@ -11,10 +11,7 @@ namespace charcoal
|
||||
class Batch : public Prerenderable, public charcoal::Batch<VertexType, IndexType, element_buffer_count, RenderableT>
|
||||
{
|
||||
public:
|
||||
Batch(
|
||||
const RenderableT* renderable,
|
||||
int element_render_count
|
||||
) : charcoal::Batch<VertexType, IndexType, element_buffer_count, RenderableT>(renderable, element_render_count) {}
|
||||
using charcoal::Batch<VertexType, IndexType, element_buffer_count, RenderableT>::Batch;
|
||||
|
||||
void prerender() override { charcoal::Batch<VertexType, IndexType, element_buffer_count, RenderableT>::prerender(); }
|
||||
};
|
||||
|
@ -10,10 +10,7 @@ namespace charcoal
|
||||
class Camera2D : public Prerenderable, public charcoal::Camera2D
|
||||
{
|
||||
public:
|
||||
Camera2D(const vec2& size, const vec2& position = vec2(0.0f, 0.0f))
|
||||
: charcoal::Camera2D(size, position) {}
|
||||
Camera2D(const vec3& size = vec3(2.0f, 2.0f, 2.0f), const vec3& position = vec3(0.0f, 0.0f, 0.0f))
|
||||
: charcoal::Camera2D(size, position) {}
|
||||
using charcoal::Camera2D::Camera2D;
|
||||
|
||||
void prerender() override { charcoal::Camera2D::prerender(); }
|
||||
};
|
||||
|
@ -10,16 +10,7 @@ namespace charcoal
|
||||
class Camera3D : public Prerenderable, public charcoal::Camera3D
|
||||
{
|
||||
public:
|
||||
Camera3D(
|
||||
float fov_y,
|
||||
float aspect_ratio,
|
||||
float znear,
|
||||
float zfar,
|
||||
const vec3& position,
|
||||
const vec3& forward = vec3(0.0f, 0.0f, 1.0f),
|
||||
const vec3& up = vec3(0.0f, 1.0f, 0.0f),
|
||||
const vec3& right = vec3(0.0f) // Zero for auto-calculated
|
||||
) : charcoal::Camera3D(fov_y, aspect_ratio, znear, zfar, position, forward, up, right) {}
|
||||
using charcoal::Camera3D::Camera3D;
|
||||
|
||||
void prerender() override { charcoal::Camera3D::prerender(); }
|
||||
};
|
||||
|
@ -107,9 +107,6 @@
|
||||
<ClInclude Include="TexturedTypes.h">
|
||||
<Filter>Header Files\Scenes\Textured</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="LitShaderProgram.h">
|
||||
<Filter>Header Files\Scenes\LitShadowed</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="LitShadowedBatch.h">
|
||||
<Filter>Header Files\Scenes\LitShadowed</Filter>
|
||||
</ClInclude>
|
||||
@ -191,5 +188,8 @@
|
||||
<ClInclude Include="WithCamera.h">
|
||||
<Filter>Header Files\General</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="LitShaderProgram.h">
|
||||
<Filter>Header Files\Scenes\Lit</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Project>
|
@ -18,7 +18,6 @@ namespace charcoal
|
||||
{
|
||||
public:
|
||||
Scene(Application& application) : AutoPrerenderingScene(application) {}
|
||||
virtual ~Scene() {}
|
||||
|
||||
void init() override;
|
||||
|
||||
|
@ -12,18 +12,7 @@ namespace charcoal
|
||||
class Batch : public PoseableBatch<Vertex, Index, Renderable>
|
||||
{
|
||||
public:
|
||||
Batch(
|
||||
Renderable* renderable,
|
||||
int element_count
|
||||
) : PoseableBatch<Vertex, Index, Renderable>(renderable, element_count)
|
||||
{}
|
||||
|
||||
Batch(
|
||||
Renderable* renderable,
|
||||
int element_count,
|
||||
int element_render_count
|
||||
) : PoseableBatch<Vertex, Index, Renderable>(renderable, element_count, element_render_count)
|
||||
{}
|
||||
using PoseableBatch<Vertex, Index, Renderable>::PoseableBatch;
|
||||
|
||||
protected:
|
||||
void setup_vao() override;
|
||||
|
@ -21,7 +21,6 @@ namespace charcoal
|
||||
{
|
||||
public:
|
||||
Scene(Application& application) : AutoPrerenderingScene(application) {}
|
||||
virtual ~Scene() {}
|
||||
|
||||
void init() override;
|
||||
|
||||
|
@ -12,18 +12,7 @@ namespace charcoal
|
||||
class Batch : public PoseableBatch<Vertex, Index, Renderable>
|
||||
{
|
||||
public:
|
||||
Batch(
|
||||
Renderable* renderable,
|
||||
int element_count
|
||||
) : PoseableBatch<Vertex, Index, Renderable>(renderable, element_count)
|
||||
{}
|
||||
|
||||
Batch(
|
||||
Renderable* renderable,
|
||||
int element_count,
|
||||
int element_render_count
|
||||
) : PoseableBatch<Vertex, Index, Renderable>(renderable, element_count, element_render_count)
|
||||
{}
|
||||
using PoseableBatch<Vertex, Index, Renderable>::PoseableBatch;
|
||||
|
||||
protected:
|
||||
void setup_vao() override;
|
||||
|
@ -21,7 +21,6 @@ namespace charcoal
|
||||
{
|
||||
public:
|
||||
Scene(Application& application) : AutoPrerenderingScene(application) {}
|
||||
virtual ~Scene() {}
|
||||
|
||||
void init() override;
|
||||
|
||||
|
@ -14,7 +14,6 @@ namespace charcoal
|
||||
class PoseableBatch : public builtin::Batch<VertexType, IndexType, 1, RenderableT>
|
||||
{
|
||||
public:
|
||||
// TODO: Figure out how to get rid of this typename garbage. If that it figured out, m_element_buffers should get fixed.
|
||||
PoseableBatch(
|
||||
RenderableT* renderable,
|
||||
int element_count
|
||||
|
@ -14,21 +14,8 @@ namespace charcoal
|
||||
{
|
||||
public:
|
||||
// Note: This is VERY similar to builtin::textured::Batch
|
||||
// TODO: Use Poseable2D for each sprite's position
|
||||
// TODO: Have a texture
|
||||
// Note: Uses GL_TEXTURE0. The uniform for this texture should be set in the scene before rendering.
|
||||
SpriteBatch(
|
||||
TextureRenderable<VertexType, IndexType>* renderable,
|
||||
int element_count
|
||||
) : Poseable2DBatch<VertexType, IndexType, TextureRenderable<VertexType, IndexType> >(renderable, element_count)
|
||||
{}
|
||||
|
||||
SpriteBatch(
|
||||
TextureRenderable<VertexType, IndexType>* renderable,
|
||||
int element_count,
|
||||
int element_render_count
|
||||
) : Poseable2DBatch<VertexType, IndexType, TextureRenderable<VertexType, IndexType> >(renderable, element_count, element_render_count)
|
||||
{}
|
||||
using Poseable2DBatch<VertexType, IndexType, TextureRenderable<VertexType, IndexType> >::Poseable2DBatch;
|
||||
|
||||
void preprender() const override
|
||||
{
|
||||
|
@ -12,18 +12,7 @@ namespace charcoal
|
||||
class Batch : public PoseableBatch<Vertex, Index, Renderable>
|
||||
{
|
||||
public:
|
||||
Batch(
|
||||
Renderable* renderable,
|
||||
int element_count
|
||||
) : PoseableBatch<Vertex, Index, Renderable>(renderable, element_count)
|
||||
{}
|
||||
|
||||
Batch(
|
||||
Renderable* renderable,
|
||||
int element_count,
|
||||
int element_render_count
|
||||
) : PoseableBatch<Vertex, Index, Renderable>(renderable, element_count, element_render_count)
|
||||
{}
|
||||
using PoseableBatch<Vertex, Index, Renderable>::PoseableBatch;
|
||||
|
||||
void preprender() const override;
|
||||
|
||||
|
@ -19,7 +19,6 @@ namespace charcoal
|
||||
{
|
||||
public:
|
||||
Scene(Application& application) : AutoPrerenderingScene(application) {}
|
||||
virtual ~Scene() {}
|
||||
|
||||
void init() override;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user