GlistEngine
Loading...
Searching...
No Matches
gMagnifier.h
Go to the documentation of this file.
1/*
2 * gMagnifier.h
3 *
4 * Created on: 26 Aug 2026
5 * Author: Bahar Kucukozer, Mehmet Sefa Ciftci
6 */
7
8#ifndef GRAPHICS_POSTEFFECTS_GMAGNIFIER_H_
9#define GRAPHICS_POSTEFFECTS_GMAGNIFIER_H_
10
11#include "gBasePostProcess.h"
12
14public:
15 gMagnifier(float radius = 120.0f, float zoom = 2.0f,
16 float softness = 2.0f);
17 virtual ~gMagnifier();
18
19 void use();
20
21 // Mouse coordinates use a top-left origin and pixel units.
22 void setMousePosition(float mousex, float mousey);
23
24 // Width and height must use the same coordinate scale as the mouse.
25 void setScreenSize(float width, float height);
26
27 void setRadius(float radius);
28 void setZoom(float zoom);
29 void setSoftness(float softness);
30
31protected:
32 const std::string getVertSrc();
33 const std::string getFragSrc();
34
35private:
36 float mousex;
37 float mousey;
38 float screenwidth;
39 float screenheight;
40 float radius;
41 float zoom;
42 float softness;
43};
44
45#endif /* GRAPHICS_POSTEFFECTS_GMAGNIFIER_H_ */
void setScreenSize(float width, float height)
void setZoom(float zoom)
const std::string getFragSrc()
void setMousePosition(float mousex, float mousey)
void setSoftness(float softness)
const std::string getVertSrc()
gMagnifier(float radius=120.0f, float zoom=2.0f, float softness=2.0f)
virtual ~gMagnifier()
void use()
void setRadius(float radius)