3 #ifndef GDK_GFX_WEBGL1ES2_SCREEN_CAMERA_H 4 #define GDK_GFX_WEBGL1ES2_SCREEN_CAMERA_H 6 #include <gdk/screen_camera.h> 8 #include <gdk/graphics_types.h> 9 #include <gdk/webgl1es2_texture.h> 10 #include <gdk/webgl1es2_camera.h> 12 #include <jfc/unique_handle.h> 32 const float aHeight)
override;
36 const float aNearClippingPlane,
37 const float aFarClippingPlane,
38 const float aViewportAspectRatio)
override;
43 const float aNearClippingPlane,
44 const float aFarClippingPlane,
45 const float aViewportAspectRatio)
override;
48 virtual void set_view_matrix(
const gdk::graphics_vector3_type &aWorldPos,
49 const gdk::graphics_quaternion_type &aRotation)
override;
62 void activate(
const gdk::graphics_intvector2_type& aFrameBufferSize)
const;
81 graphics_vector2_type m_ViewportPosition = graphics_vector2_type::Zero;
82 graphics_vector2_type m_ViewportSize = graphics_vector2_type(1, 1);
virtual void set_clear_color(const gdk::color &acolor) override
sets the clear color, used to fill color buffer after it is cleared.
webgl1es2_screen_camera implementation of camera
Definition: webgl1es2_screen_camera.h:22
virtual void set_viewport(const float aX, const float aY, const float aWidth, const float aHeight) override
sets the normalized size and position of the viewport within of the window
webgl1es2_screen_camera & operator=(const webgl1es2_screen_camera &a)=default
copy semantics
void activate(const gdk::graphics_intvector2_type &aFrameBufferSize) const
activates this camera; mutates gl according to this camera's state
virtual void set_perspective_projection(const float aFieldOfView, const float aNearClippingPlane, const float aFarClippingPlane, const float aViewportAspectRatio) override
sets the projection matrix to a perspective projection
Position, orientation and perspective from which entity(s) are drawn.
Definition: screen_camera.h:16
virtual void set_view_matrix(const gdk::graphics_vector3_type &aWorldPos, const gdk::graphics_quaternion_type &aRotation) override
rebuilds the view matrix from a 3d position and rotation
virtual void set_clear_mode(const gdk::camera::clear_mode aClearMode) override
clear mode decides which buffers to clear. see enum
virtual void set_orthographic_projection(const float aWidth, const float aHeight, const float aNearClippingPlane, const float aFarClippingPlane, const float aViewportAspectRatio) override
sets the projection matrix to an orthographic projection
clear_mode
Describes camera clear behaviour: which buffers in the current FBO should be cleared?
Definition: camera.h:16
webgl1es2_camera implementation of camera
Definition: webgl1es2_camera.h:21
webgl1es2_screen_camera()
constructs with reasonable default values
Represents a 4 channel color: {Red, Green, Blue, Alpha}.
Definition: color.h:11