Fast Copy of screen to array of words

Fast Copy of screen to array of words

Post by jake_solo.. » Thu, 21 Dec 2000 04:22:01



The post just about sums it up, but here are the particulars:

I am rendering into a fullscreen 16 bit single-buffered Windows window
using OpenGL 1.1 calls.  I would like to quickly copy the pixel data
into a specific array of words after the image is rendered.  Using
OpenGL, I could save the screen data to an array, but it uses 24 bits
per pixel.  (OpenGL 1.2 fixes this, but that revision isn't included in
Windows)

If I had to, I could transform the 24 bit data into 16 bits, but speed
is of the utmost importance here.

Given the hDC, the hWND, yada, yada, what is the quickest method of
copying that pixel data (in 16 bit 555 format) into an array of words?

Any help is greatly appreciated.

Jacob Solomon

Sent via Deja.com
http://www.deja.com/

 
 
 

Fast Copy of screen to array of words

Post by Rob Atkinso » Thu, 21 Dec 2000 05:03:35


you can download openGL 1.2


Quote:> The post just about sums it up, but here are the particulars:

> I am rendering into a fullscreen 16 bit single-buffered Windows window
> using OpenGL 1.1 calls.  I would like to quickly copy the pixel data
> into a specific array of words after the image is rendered.  Using
> OpenGL, I could save the screen data to an array, but it uses 24 bits
> per pixel.  (OpenGL 1.2 fixes this, but that revision isn't included in
> Windows)

> If I had to, I could transform the 24 bit data into 16 bits, but speed
> is of the utmost importance here.

> Given the hDC, the hWND, yada, yada, what is the quickest method of
> copying that pixel data (in 16 bit 555 format) into an array of words?

> Any help is greatly appreciated.

> Jacob Solomon

> Sent via Deja.com
> http://www.deja.com/


 
 
 

Fast Copy of screen to array of words

Post by jake_solo.. » Thu, 21 Dec 2000 05:27:43




Quote:> you can download openGL 1.2

Ah, no.  OpenGL 1.1 is integrated in windows, not 1.2.  I want this app
to run on a wide variety of machines free of any hardware support, i.e.
I want to use the generic Microsoft OpenGL implementation.

Jacob



> > The post just about sums it up, but here are the particulars:

> > I am rendering into a fullscreen 16 bit single-buffered Windows
window
> > using OpenGL 1.1 calls.  I would like to quickly copy the pixel data
> > into a specific array of words after the image is rendered.  Using
> > OpenGL, I could save the screen data to an array, but it uses 24
bits
> > per pixel.  (OpenGL 1.2 fixes this, but that revision isn't
included in
> > Windows)

> > If I had to, I could transform the 24 bit data into 16 bits, but
speed
> > is of the utmost importance here.

> > Given the hDC, the hWND, yada, yada, what is the quickest method of
> > copying that pixel data (in 16 bit 555 format) into an array of
words?

> > Any help is greatly appreciated.

> > Jacob Solomon

> > Sent via Deja.com
> > http://www.deja.com/

Sent via Deja.com
http://www.deja.com/