Adding transparency support
This commit is contained in:
@@ -43,5 +43,6 @@ void Camera::buildViewMatrix() {
|
||||
Vector lookAt = eyePos + getTransform().getForward();
|
||||
viewMatrix = glm::lookAt(eyePos, lookAt, Vector(0, 1, 0));
|
||||
cameraPos = eyePos;
|
||||
cameraForward = getTransform().getForward();
|
||||
bNeedsViewBuild = false;
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@ struct Camera {
|
||||
return viewMatrix;
|
||||
}
|
||||
Vector getCameraPosition() const { return cameraPos; }
|
||||
Vector getCameraForward() const { return cameraForward; }
|
||||
void mouseMove(float deltaX, float deltaY);
|
||||
void mouseScroll(float x);
|
||||
void moveX(float amount);
|
||||
@@ -29,6 +30,7 @@ struct Camera {
|
||||
float pitch;
|
||||
Matrix4 viewMatrix;
|
||||
Vector cameraPos;
|
||||
Vector cameraForward;
|
||||
bool bNeedsViewBuild;
|
||||
};
|
||||
} // namespace Component
|
||||
|
||||
Reference in New Issue
Block a user