view Renderer/Engine/spe/DataAllocate.cc @ 915:ad10d6d39ca6

create_polygon_task ..not worked yet.
author yutaka@localhost.localdomain
date Fri, 23 Jul 2010 18:05:40 +0900
parents Renderer/Engine/spe/DataLoad.cc@01b6d924a560
children ac437c3cf766
line wrap: on
line source

#include <stdio.h>
#include <string.h>
#include "DataAllocate.h"
#include "Func.h"

/* これは必須 */
SchedDefineTask(DataAllocate);

static int
run(SchedTask *s, void *rbuf, void *wbuf)
{

  void *idata = s->get_input(rbuf, 0);
  long size = (long)s->get_param(0);
  long load_id = (long)s->get_param(1);

  void *buff = s->global_alloc(load_id, size);

  if (idata != NULL) {
    memcpy(buff,idata,size);
  }

  return 0;
}