Minor fixes

This commit is contained in:
Jérôme Leclercq 2022-02-21 20:46:37 +01:00
parent ad544a595d
commit a1b6f51398
8 changed files with 16 additions and 15 deletions

View File

@ -36,12 +36,7 @@ jobs:
# Install Nazara dependencies
- name: Install system dependencies
run: |
sudo apt-get install libsndfile1-dev libfreetype6-dev libsdl2-dev mesa-common-dev libxcb-ewmh-dev libxcb-randr0-dev libxcb-icccm4-dev libxcb-keysyms1-dev libglx-mesa0 mesa-vulkan-drivers alsa-base alsa-oss alsa-utils pulseaudio git gcovr -y
sudo apt-get -y install linux-modules-extra-$(uname -r)
# Setup dummy audio device
- name: Enable snd-dummy
run: sudo modprobe snd-dummy
sudo apt-get -y install libsndfile1-dev libfreetype6-dev libsdl2-dev mesa-common-dev libxcb-ewmh-dev libxcb-randr0-dev libxcb-icccm4-dev libxcb-keysyms1-dev git gcovr
# Force xmake to a specific folder (for cache)
- name: Set xmake env
@ -79,7 +74,7 @@ jobs:
# Run unit tests
- name: Run unit tests
run: xmake run NazaraClientUnitTests
run: xmake run NazaraUnitTests
# Build coverage file
- name: Build coverage output

View File

@ -38,7 +38,7 @@ PROJECT_NAME = "Nazara Engine"
# could be handy for archiving the generated documentation or if some version
# control system is used.
PROJECT_NUMBER = 0.4
PROJECT_NUMBER = 0.1
# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a

View File

@ -147,7 +147,7 @@ int main()
registry.emplace<Nz::NodeComponent>(viewer);
auto& cameraComponent = registry.emplace<Nz::CameraComponent>(viewer, window.GetRenderTarget());
cameraComponent.UpdateRenderMask(1);
//cameraComponent.UpdateClearColor(Nz::Color(127, 127, 127));
cameraComponent.UpdateClearColor(Nz::Color(127, 127, 127));
}
auto shipCollider = std::make_shared<Nz::ConvexCollider3D>(vertices, vertexMapper.GetVertexCount(), 0.01f);

View File

@ -654,7 +654,7 @@ namespace Nz
// Activation of the bit without branching
// https://graphics.stanford.edu/~seander/bithacks.html#ConditionalSetOrClearBitsWithoutBranching
block = (block & ~mask) | (-val & mask);
block = (block & ~mask) | (-static_cast<Block>(val) & mask);
}
/*!

View File

@ -20,7 +20,7 @@ namespace Nz
public:
inline SimpleTextDrawer();
inline SimpleTextDrawer(const SimpleTextDrawer& drawer);
inline SimpleTextDrawer(SimpleTextDrawer&& drawer);
inline SimpleTextDrawer(SimpleTextDrawer&& drawer) noexcept;
~SimpleTextDrawer() = default;
inline void AppendText(const std::string_view& str);
@ -58,7 +58,7 @@ namespace Nz
inline void SetText(std::string str);
inline SimpleTextDrawer& operator=(const SimpleTextDrawer& drawer);
inline SimpleTextDrawer& operator=(SimpleTextDrawer&& drawer);
inline SimpleTextDrawer& operator=(SimpleTextDrawer&& drawer) noexcept;
static inline SimpleTextDrawer Draw(const std::string& str, unsigned int characterSize, TextStyleFlags style = TextStyle_Regular, const Color& color = Color::White);
static inline SimpleTextDrawer Draw(const std::string& str, unsigned int characterSize, TextStyleFlags style, const Color& color, float outlineThickness, const Color& outlineColor);

View File

@ -38,7 +38,7 @@ namespace Nz
SetFont(drawer.m_font);
}
inline SimpleTextDrawer::SimpleTextDrawer(SimpleTextDrawer&& drawer)
inline SimpleTextDrawer::SimpleTextDrawer(SimpleTextDrawer&& drawer) noexcept
{
operator=(std::move(drawer));
}
@ -228,7 +228,7 @@ namespace Nz
return *this;
}
inline SimpleTextDrawer& SimpleTextDrawer::operator=(SimpleTextDrawer&& drawer)
inline SimpleTextDrawer& SimpleTextDrawer::operator=(SimpleTextDrawer&& drawer) noexcept
{
DisconnectFontSlots();

View File

@ -86,8 +86,10 @@ struct VertOut
[entry(vert)]
fn main(input: VertIn) -> VertOut
{
let worldPosition = instanceData.worldMatrix * vec4[f32](input.pos, 1.0);
let output: VertOut;
output.position = viewerData.viewProjMatrix * instanceData.worldMatrix * vec4[f32](input.pos, 1.0);
output.position = viewerData.viewProjMatrix * worldPosition;
const if (HasUV)
output.uv = input.uv;

View File

@ -1160,6 +1160,10 @@ namespace Nz
AppendVariableDeclaration(member.type.GetResultingValue(), member.name);
Append(";");
}
// Empty structs are not allowed in GLSL
if (first)
AppendLine("int dummy;");
}
LeaveScope(false);
AppendLine(";");