1
General / Re: Converting from VertexArray& to const Vertex*
« on: March 05, 2016, 01:14:12 pm »
The binding is complete now, but thanks anyway
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
@:include("SFML/Graphics.hpp")
@:native("const sf::Vertex *")
extern class ConstVertexArray { }
@:include("SFML/Graphics.hpp")
@:structAccess
@:native("sf::VertexArray&")
extern class VertexArray implements Drawable {
...
package window;
import cpp.Int32;
import sfml.window.Event in SFMLEvent;
@:include("hx/sfml/Event.cpp")
extern class EventHelper {
@:native("hx::sfml::Event::createEvent") public static function createEvent():SFMLEvent;
@:native("hx::sfml::Event::getEventType") public static function getEventType(event:SFMLEvent):Int32;
}
package;
import sfml.window.*;
import window.EventHelper;
@:buildXml('<include name="${haxelib:hxsfml}/../Build.xml" />')
class Main
{
public static function main()
{
var window:Window = Window.create(VideoMode.create(800, 600), "Test 01 - Blank Window");
while (window.isOpen())
{
var event = EventHelper.createEvent();
while (window.pollEvent(event))
{
if (EventHelper.getEventType(event) == 1) {
window.close();
}
}
window.display();
}
return 0;
}
}
haxelib install hxcpp