mirror of
https://github.com/overte-org/overte.git
synced 2025-04-22 09:33:36 +02:00
Coding standard
This commit is contained in:
parent
254f05072f
commit
a9d2bb1e1c
2 changed files with 4 additions and 4 deletions
|
@ -72,7 +72,7 @@ void Skybox::render(gpu::Batch& batch, const ViewFrustum& viewFrustum, const Sky
|
|||
|
||||
thePipeline = gpu::PipelinePointer(gpu::Pipeline::create(skyShader, skyState));
|
||||
|
||||
const float CLIP = 1.0;
|
||||
const float CLIP = 1.0f;
|
||||
const glm::vec2 vertices[4] = { {-CLIP, -CLIP}, {CLIP, -CLIP}, {-CLIP, CLIP}, {CLIP, CLIP}};
|
||||
theBuffer.reset(new gpu::Buffer(sizeof(vertices), (const gpu::Byte*) vertices));
|
||||
|
||||
|
@ -110,7 +110,7 @@ void Skybox::render(gpu::Batch& batch, const ViewFrustum& viewFrustum, const Sky
|
|||
} else {
|
||||
// skybox has no cubemap, just clear the color buffer
|
||||
auto color = skybox.getColor();
|
||||
batch.clearFramebuffer(gpu::Framebuffer::BUFFER_COLOR0, glm::vec4(color, 0.0f), 0.f, 0);
|
||||
batch.clearFramebuffer(gpu::Framebuffer::BUFFER_COLOR0, glm::vec4(color, 0.0f), 0.0f, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -545,9 +545,9 @@ void ViewFrustum::printDebugDetails() const {
|
|||
|
||||
glm::vec2 ViewFrustum::projectPoint(glm::vec3 point, bool& pointInView) const {
|
||||
|
||||
glm::vec4 pointVec4 = glm::vec4(point,1);
|
||||
glm::vec4 pointVec4 = glm::vec4(point, 1.0f);
|
||||
glm::vec4 projectedPointVec4 = _ourModelViewProjectionMatrix * pointVec4;
|
||||
pointInView = (projectedPointVec4.w > 0); // math! If the w result is negative then the point is behind the viewer
|
||||
pointInView = (projectedPointVec4.w > 0.0f); // math! If the w result is negative then the point is behind the viewer
|
||||
|
||||
// what happens with w is 0???
|
||||
float x = projectedPointVec4.x / projectedPointVec4.w;
|
||||
|
|
Loading…
Reference in a new issue