forked from Aidan63/linc_imgui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated CLI test to build on windows and be called Main instead of Test
- Loading branch information
Showing
2 changed files
with
38 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |