b7456401e0
Added image scene to render an image in a scene. There is also now a testing image that is an uber meme. Currently the problem is that the spritebatch cannot use the offsetof macro because it is a templated class. Possible solutions to this are changing it to be specifyable or implemented per vertex type as the other batches have been.
35 lines
583 B
C++
35 lines
583 B
C++
#pragma once
|
|
|
|
#include "Scene.h"
|
|
|
|
#include "Camera2D.h"
|
|
|
|
#include "MyBatch.h"
|
|
#include "MySimpleShaderProgram.h"
|
|
|
|
using namespace charcoal;
|
|
|
|
class MySimple2DScene : public Scene
|
|
{
|
|
public:
|
|
MySimple2DScene(Application& application);
|
|
~MySimple2DScene();
|
|
|
|
void init() override;
|
|
|
|
void use() override;
|
|
|
|
void unuse() override;
|
|
|
|
void update(float delta_time, clock_t clock) override;
|
|
|
|
void prerender() override;
|
|
|
|
void render() override;
|
|
|
|
private:
|
|
MySimpleShaderProgram m_shader_program;
|
|
MySimpleShaderProgram::RenderableT m_shape;
|
|
MyBatch m_batch;
|
|
charcoal::Camera2D m_camera;
|
|
}; |