Skip to content

Commit

Permalink
Updated CLI test to build on windows and be called Main instead of Test
Browse files Browse the repository at this point in the history
  • Loading branch information
Aidan63 committed Jan 14, 2018
1 parent 6db6dad commit 5f30625
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 6 deletions.
34 changes: 34 additions & 0 deletions test/cli/Main.hx
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import cpp.Pointer;
import imgui.ImGui;
import imgui.util.ImVec2;

class Main
{
public static function main()
{
new Main();
}

public function new()
{
var io = ImGui.getIO();
io.displaySize = ImVec2.create(640, 480);

var text = "TextureID";

var atlas = Pointer.fromRaw(io.fonts).ref;
var width : Int = 0;
var height : Int = 0;
var pixels : Array<Int> = null;

atlas.getTexDataAsRGBA32(pixels, width, height);
atlas.texID = Pointer.addressOf(text).rawCast();

// Update
ImGui.newFrame();

ImGui.showDemoWindow();

ImGui.render();
}
}
10 changes: 4 additions & 6 deletions test/cli/build.hxml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@

-main Test.hx
-cpp cpp/
-cp ../
-D HXCPP_FLOAT32
-lib linc_imgui
-main Main
-cpp cpp
-cp ../../
-D HXCPP_FLOAT32

0 comments on commit 5f30625

Please sign in to comment.