Editor
EditorLayer
class EditorLayer : public Layer
{
public:
EditorLayer();
virtual ~EditorLayer() = default;
virtual void OnAttach() override;
virtual void OnDetach() override;
void OnUpdate(Timestep ts) override;
virtual void OnImGuiRender() override;
void OnEvent(Event& e) override;
private:
CryDust::OrthographicCameraController m_CameraController;
// Temp
Ref<VertexArray> m_SquareVA;
Ref<Shader> m_FlatColorShader;
Ref<Framebuffer> m_Framebuffer;
Ref<Texture2D> m_CheckerboardTexture;
glm::vec4 m_SquareColor = { 0.2f, 0.3f, 0.8f, 1.0f };
};
注意定义对应的宏
将帧缓冲添加到视窗,做成Scene界面