You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -309,7 +309,7 @@ class CC_DLL Camera :public Node
309
309
static Camera* _visitingCamera;
310
310
static experimental::Viewport _defaultViewport;
311
311
312
-
Scene* _scene; //Scene camera belongs to
312
+
Scene* _scene = nullptr; //Scene camera belongs to
313
313
Mat4 _projection;
314
314
mutable Mat4 _view;
315
315
mutable Mat4 _viewInv;
@@ -322,20 +322,20 @@ class CC_DLL Camera :public Node
322
322
float _aspectRatio;
323
323
float _nearPlane;
324
324
float _farPlane;
325
-
mutablebool _viewProjectionDirty;
326
-
bool _viewProjectionUpdated; //Whether or not the viewprojection matrix was updated since the last frame.
327
-
unsignedshort_cameraFlag; // camera flag
325
+
mutablebool _viewProjectionDirty = true;
326
+
bool _viewProjectionUpdated = false; //Whether or not the viewprojection matrix was updated since the last frame.
327
+
CameraFlag _cameraFlag = CameraFlag::DEFAULT; // camera flag
328
328
mutable Frustum _frustum; // camera frustum
329
-
mutablebool _frustumDirty;
330
-
int8_t _depth; //camera depth, the depth of camera with CameraFlag::DEFAULT flag is 0 by default, a camera with larger depth is drawn on top of camera with smaller depth
329
+
mutablebool _frustumDirty = true;
330
+
int8_t _depth = -1; //camera depth, the depth of camera with CameraFlag::DEFAULT flag is 0 by default, a camera with larger depth is drawn on top of camera with smaller depth
331
331
332
-
CameraBackgroundBrush* _clearBrush; //brush used to clear the back ground
332
+
CameraBackgroundBrush* _clearBrush = nullptr; //brush used to clear the back ground
0 commit comments