Added functions acSetVertexBuffer, acNodeSetVertexBuffer, and acDeviceSetVertexBuffer for setting device memory directly to some constant
This commit is contained in:
@@ -74,6 +74,12 @@ acLoad(const AcMesh host_mesh)
|
||||
return acNodeLoadMesh(nodes[0], STREAM_DEFAULT, host_mesh);
|
||||
}
|
||||
|
||||
AcResult
|
||||
acSetVertexBuffer(const VertexBufferHandle handle, const AcReal value)
|
||||
{
|
||||
return acNodeSetVertexBuffer(nodes[0], STREAM_DEFAULT, handle, value);
|
||||
}
|
||||
|
||||
AcResult
|
||||
acStore(AcMesh* host_mesh)
|
||||
{
|
||||
@@ -182,7 +188,7 @@ acGetNode(void)
|
||||
}
|
||||
|
||||
AcResult
|
||||
acUpdateBuiltinParams(AcMeshInfo* config)
|
||||
acHostUpdateBuiltinParams(AcMeshInfo* config)
|
||||
{
|
||||
config->int_params[AC_mx] = config->int_params[AC_nx] + STENCIL_ORDER;
|
||||
///////////// PAD TEST
|
||||
@@ -221,7 +227,7 @@ acUpdateBuiltinParams(AcMeshInfo* config)
|
||||
}
|
||||
|
||||
AcResult
|
||||
acMeshCreate(const AcMeshInfo info, AcMesh* mesh)
|
||||
acHostMeshCreate(const AcMeshInfo info, AcMesh* mesh)
|
||||
{
|
||||
mesh->info = info;
|
||||
|
||||
@@ -241,7 +247,7 @@ randf(void)
|
||||
}
|
||||
|
||||
AcResult
|
||||
acMeshRandomize(AcMesh* mesh)
|
||||
acHostMeshRandomize(AcMesh* mesh)
|
||||
{
|
||||
const int n = acVertexBufferSize(mesh->info);
|
||||
for (int w = 0; w < NUM_VTXBUF_HANDLES; ++w)
|
||||
@@ -252,7 +258,7 @@ acMeshRandomize(AcMesh* mesh)
|
||||
}
|
||||
|
||||
AcResult
|
||||
acMeshDestroy(AcMesh* mesh)
|
||||
acHostMeshDestroy(AcMesh* mesh)
|
||||
{
|
||||
for (int w = 0; w < NUM_VTXBUF_HANDLES; ++w)
|
||||
free(mesh->vertex_buffer[w]);
|
||||
|
Reference in New Issue
Block a user