Browse Source

Add PIC, test font

master
Macoy Madson 1 year ago
parent
commit
fc16769dbb
2 changed files with 13 additions and 3 deletions
  1. +1
    -2
      Jamrules
  2. +12
    -1
      tests/main.cpp

+ 1
- 2
Jamrules View File

@ -44,8 +44,7 @@ LINK = clang++ ;
# lstdc++ = standard library [Unused]
# Arguments used on all projects, regardless of any variables
# C++FLAGS = -std=c++11 -Wall -Wextra -Wno-unused-parameter -D IMGUI_INCLUDE_IMCONFIG_H ;
C++FLAGS = -std=c++11 -Wall -Wextra -Wno-unused-parameter
C++FLAGS = -std=c++11 -Wall -Wextra -Wno-unused-parameter -fPIC
# Why isn't this quoting properly?
# -D IMGUI_USER_CONFIG=\"dependencies/imgui-sfml/imconfig-SFML.h\"
;


+ 12
- 1
tests/main.cpp View File

@ -44,6 +44,7 @@ int main()
#include <SFML/Graphics/RenderWindow.hpp>
#include <SFML/System/Clock.hpp>
#include <SFML/Window/Event.hpp>
#include <SFML/Graphics.hpp>
#include <SFML/Graphics/CircleShape.hpp>
int main2()
@ -52,7 +53,17 @@ int main2()
window.setFramerateLimit(60);
ImGui::SFML::Init(window);
sf::CircleShape shape(100.f);
sf::Font font;
sf::Text str;
if (!font.loadFromFile("/home/macoy/Development/code/repositories/spargus-vehicle-prototype/"
"data/fonts/UbuntuMono-R.ttf"))
return false;
else
{
str.setFont(font);
}
sf::CircleShape shape(100.f);
shape.setFillColor(sf::Color::Green);
sf::Clock deltaClock;


Loading…
Cancel
Save