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