view Renderer/Engine/spe/Property.cc @ 756:a871b0d9c9ae draft

Test/create_task , create SPE task from application.
author hiroki
date Fri, 29 Jan 2010 14:34:30 +0900
parents 8aaa29d3e874
children 2aa6e7150588
line wrap: on
line source

#include <stdio.h>
#include <string.h>
#include <math.h>
#include "Property.h"
#include "Func.h"
#include "types.h"

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

typedef struct {
    float x, y, z;
    int pad;
} Property, *PropertyPtr;

static int
run(SchedTask *s,void *rbuf, void *wbuf)
{
    PropertyPtr	property	= (PropertyPtr)s->get_input(rbuf, 0);
    PropertyPtr	update_property = (PropertyPtr)s->get_output(wbuf, 0);

    property->x += 1.0f;
    property->y += 1.0f;
    property->z += 1.0f;

    memcpy((void*)update_property, (void*)property, sizeof(Property));
    return 0;
}