/*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*/
#include "utils.h"
-#include <cstdio>
#include <cstdarg>
+#include <cstdio>
#include <cmath>
};
Vertex vertexData[] = {
- { Vector3(-.5f, .5f, .0f) },
- { Vector3(.5f, .5f, .0f) },
- { Vector3(-.5f, -.5f, .0f) },
- { Vector3(.5f, -.5f, .0f) },
+ {Vector3(-.5f, .5f, .0f)},
+ {Vector3(.5f, .5f, .0f)},
+ {Vector3(-.5f, -.5f, .0f)},
+ {Vector3(.5f, -.5f, .0f)},
};
VertexBuffer vertexBuffer = VertexBuffer::New(Property::Map()
- .Add("aPosition", Property::VECTOR3));
+ .Add("aPosition", Property::VECTOR3));
vertexBuffer.SetData(vertexData, std::extent<decltype(vertexData)>::value);
Geometry geometry = Geometry::New();
{
Renderer renderer = Renderer::New(geometry, shader);
renderer.SetProperty(Renderer::Property::BLEND_MODE,
- (options & RendererOptions::BLEND) ? BlendMode::ON : BlendMode::OFF);
+ (options & RendererOptions::BLEND) ? BlendMode::ON : BlendMode::OFF);
renderer.SetProperty(Renderer::Property::DEPTH_TEST_MODE,
- (options & RendererOptions::DEPTH_TEST) ? DepthTestMode::ON : DepthTestMode::OFF);
+ (options & RendererOptions::DEPTH_TEST) ? DepthTestMode::ON : DepthTestMode::OFF);
renderer.SetProperty(Renderer::Property::DEPTH_WRITE_MODE,
- (options & RendererOptions::DEPTH_WRITE) ? DepthWriteMode::ON : DepthWriteMode::OFF);
+ (options & RendererOptions::DEPTH_WRITE) ? DepthWriteMode::ON : DepthWriteMode::OFF);
int faceCulling = (((options & RendererOptions::CULL_BACK) != 0) << 1) |
- ((options & RendererOptions::CULL_FRONT) != 0);
+ ((options & RendererOptions::CULL_FRONT) != 0);
renderer.SetProperty(Renderer::Property::FACE_CULLING_MODE, faceCulling);
- if (!textures)
+ if(!textures)
{
textures = TextureSet::New();
}
actor.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER);
actor.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER);
}
-