Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I have a rasterizer that I am building. It will first load a .obj file and create points to draw. Then, an image will be plastered over the wire frame and from there become an image on the next frame. The details are:

  • Load vectors from file
  • create a wire frame from the points
  • overlay an image
  • create raster from Pixel[] array
  • create BufferedImage
  • draw to screen

The last three steps repeat after loading the vectors.

My Pixel class just stores an RGB value, as well as I have an RGB class which specifies how much Red, Green, and Blue. (public Pixel(RGB rgb))

With an array of these Pixels, I want to make a Raster. How can I create a Raster with raw pixel data? the colors are 64-bit if that helps (private static final long RED, GREEN, BLUE; in RGB instance within Pixel instance)

share|improve this question
1  
What do you exactly mean by raster? Do you wish to render pixel array onto screen? –  wondra 2 days ago
    
Yes. Exactly that. –  Link TheProgrammer yesterday

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.