view task/Run.cc @ 5:39d405bc46b7

add fb
author yutaka@localhost.localdomain
date Sat, 10 Apr 2010 16:29:22 +0900
parents c2ce9efe2a52
children febf899d0043
line wrap: on
line source

#include <stdio.h>
#include "Run.h"

typedef struct {

  float red;
  float green;
  float bule;
  float alpha;

} rgb_t;

void
set_rgb(rgb_t rgb, int *pixels)
{

  *pixels = (char)rgb.red | ((char)rgb.green) << 8 | ((char)rgb.bule) << 16 | ((char)rgb.alpha) << 24;

}

void
run(void *in, void *out, int size_in, int size_out)
{

  int *pixels = (int*)out;
  rgb_t rgb;

  rgb.red = 0;
  rgb.green = 255;
  rgb.bule = 255;
  rgb.alpha = 1;

  for (int i = 0; i < size_out; i++) {

    set_rgb(rgb, &pixels[i]);
    
  }


}