summaryrefslogtreecommitdiffstats
path: root/scene/3d/camera.h
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2014-09-15 20:06:37 -0300
committerJuan Linietsky <reduzio@gmail.com>2014-09-15 20:06:37 -0300
commit642c63319eb7471c9accc0c50dfffef5d72c0078 (patch)
tree6d1a3c4ee4a591d9dc9ec9bdbf4054d66ea61774 /scene/3d/camera.h
parent8cab401d08f8e25aa9b2dc710204785858ff3dbb (diff)
downloadredot-engine-642c63319eb7471c9accc0c50dfffef5d72c0078.tar.gz
Camera Fixes
-=-=-=-=-=-= -Object Picking and orthogonal camera related functions fixed (i hope) -Going to preview mode in the camera shows a frame with the correct game aspect ratio -Changed Camera API and properties a little t make it more straightforward -Fixed bug in shader compiler. -Fixed bug in ShaderGL
Diffstat (limited to 'scene/3d/camera.h')
-rw-r--r--scene/3d/camera.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/scene/3d/camera.h b/scene/3d/camera.h
index a8599497ac..014c7cb520 100644
--- a/scene/3d/camera.h
+++ b/scene/3d/camera.h
@@ -46,6 +46,11 @@ public:
PROJECTION_ORTHOGONAL
};
+ enum KeepAspect {
+ KEEP_WIDTH,
+ KEEP_HEIGHT
+ };
+
private:
bool force_change;
@@ -56,7 +61,7 @@ private:
float fov;
float size;
float near,far;
- bool vaspect;
+ KeepAspect keep_aspect;
RID camera;
RID scenario_id;
@@ -126,8 +131,8 @@ public:
void set_environment(const Ref<Environment>& p_environment);
Ref<Environment> get_environment() const;
- void set_use_vertical_aspect(bool p_enable);
- bool is_using_vertical_aspect() const;
+ void set_keep_aspect_mode(KeepAspect p_aspect);
+ KeepAspect get_keep_aspect_mode() const;
void look_at(const Vector3& p_target, const Vector3& p_up_normal);
void look_at_from_pos(const Vector3& p_pos,const Vector3& p_target, const Vector3& p_up_normal);
@@ -140,5 +145,6 @@ public:
VARIANT_ENUM_CAST( Camera::Projection );
+VARIANT_ENUM_CAST( Camera::KeepAspect );
#endif