mirror of
https://github.com/Almamu/linux-wallpaperengine.git
synced 2025-07-14 13:22:23 +08:00

+ Added basic support for mouse position on shaders (still needs to be adjusted for backgrounds that are too big for the screen) (this makes XRAY effects work) Signed-off-by: Alexis Maiquez <almamu@almamu.com>
40 lines
814 B
C++
40 lines
814 B
C++
#pragma once
|
|
|
|
#include "CCamera.h"
|
|
|
|
#include "WallpaperEngine/Core/CScene.h"
|
|
|
|
#include "WallpaperEngine/Render/CWallpaper.h"
|
|
#include "WallpaperEngine/Render/CObject.h"
|
|
|
|
namespace WallpaperEngine::Render
|
|
{
|
|
class CCamera;
|
|
class CObject;
|
|
|
|
class CScene : public CWallpaper
|
|
{
|
|
public:
|
|
CScene (Core::CScene* scene, CContainer* container, CContext* context);
|
|
|
|
CCamera* getCamera () const;
|
|
|
|
Core::CScene* getScene ();
|
|
|
|
glm::vec2* getMousePosition ();
|
|
|
|
protected:
|
|
void renderFrame (glm::vec4 viewport) override;
|
|
void updateMouse (glm::vec4 viewport);
|
|
|
|
friend class CWallpaper;
|
|
|
|
static const std::string Type;
|
|
|
|
private:
|
|
CCamera* m_camera;
|
|
std::vector<CObject*> m_objects;
|
|
glm::vec2 m_mousePosition;
|
|
};
|
|
}
|