C++ HaxePunk:导出到C++;

C++ HaxePunk:导出到C++;,c++,graphics,rendering,haxe,haxepunk,C++,Graphics,Rendering,Haxe,Haxepunk,所以我在和哈克斯和哈克斯朋克做一个游戏。好的除了当我导出到C++时,什么都没有渲染!我以前在Haxepunk板上发布过这篇文章,因此可以找到更多信息。以下是哈克斯朋克线程的摘录 我仍然可以很好地编译它,但是除了我定义的背景色之外,游戏中没有任何东西是真正渲染的。尽管如此,控制台仍然可以正常工作并呈现良好效果。HaxePunk控制台告诉我使用BitmapData的地图集将不会被管理 我使用的是Ash的组件实体系统,而不是Haxe的实体。相关对象有一个可见的组件连接到它们,如下所示 package

所以我在和哈克斯和哈克斯朋克做一个游戏。好的除了当我导出到C++时,什么都没有渲染!我以前在Haxepunk板上发布过这篇文章,因此可以找到更多信息。以下是哈克斯朋克线程的摘录

我仍然可以很好地编译它,但是除了我定义的背景色之外,游戏中没有任何东西是真正渲染的。尽管如此,控制台仍然可以正常工作并呈现良好效果。HaxePunk控制台告诉我使用BitmapData的地图集将不会被管理

我使用的是Ash的组件实体系统,而不是Haxe的实体。相关对象有一个
可见的
组件连接到它们,如下所示

package game.component;

import com.haxepunk.Graphic;
import com.haxepunk.graphics.Image;

class Visible {

    public var image(default, default) : Graphic;

    public function new() {
        this.image = Image.createRect(16, 16, 0xFF0000);
    }
}
这是相关的渲染系统

package game.system;

import ash.core.Engine;
import ash.core.Entity;
import ash.core.System;
import ash.tools.ListIteratingSystem;

import com.haxepunk.HXP;

import Constants;
import game.component.Positionable;
import game.component.Visible;

import game.node.RenderNode;

class RenderingSystem extends ListIteratingSystem<RenderNode> {

    public function new() {
        super(RenderNode, this.updateNode);
    }

    private function updateNode(node:RenderNode, time:Float) : Void {
        node.renderable.image.render(HXP.buffer, node.position.position, Constants.ORIGIN);
    }
}
package.system;
进口灰芯发动机;
进口ash.core.Entity;
进口ash.core.System;
导入ash.tools.ListIteratingSystem;
导入com.haxepunk.HXP;
导入常数;
导入game.component.Positionable;
导入game.component.Visible;
导入game.node.RenderNode;
类RenderingSystem扩展了ListIteratingSystem{
公共职能(新增){
super(RenderNode,this.updateNode);
}
私有函数updateNode(节点:RenderNode,时间:Float):Void{
node.renderable.image.render(HXP.buffer、node.position.position、Constants.ORIGIN);
}
}

任何提示?

< P>如果在C++中使用缓冲区呈现,则需要在构造函数内设置渲染模式。这是因为引擎构造函数是创建屏幕缓冲区的唯一位置。不幸的是,API文档没有清楚地解释这一点

class Main extends Engine
{
    public function new()
    {
        super(0, 0, 60, false, RenderMode.BUFFER);
    }
}
非常感谢你!(对于那些跟踪的人来说,他是HaxePunk的开发者)