载入中...
搜索中...
未找到
EcsScriptPack.cpp 文件参考
#include "gpgpu/EcsScriptPack.h"
#include "gpgpu/GpuBuffer.h"
#include "common/Exception.h"
#include <simplesquirrel/simplesquirrel.hpp>
#include <squirrel.h>
#include <algorithm>
#include <string>
#include <vector>

浏览源代码.

命名空间

namespace  eve
 
namespace  eve::gpgpu
 

函数

int eve::gpgpu::packScriptEntityFloats (ssq::Object entities, const std::string &slot, ssq::Object fields, GpuBuffer *buf)
 Pack script ECS entities' component number fields into a GpuBuffer (AoS). entities: Squirrel array of entity instances slot: component slot name on the entity (e.g. "pos") fields: Squirrel array of field name strings (e.g. ["x","y"]) Returns entity count packed (0 on empty / error).
 
int eve::gpgpu::unpackScriptEntityFloats (ssq::Object entities, const std::string &slot, ssq::Object fields, GpuBuffer *buf, int entityCount)
 Inverse of packScriptEntityFloats; entityCount should match pack result.