|
||
|
GP Mailing List
ATXGPSIG List
|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: Dynamic arrays
dakline@vassar.edu wrote: > > >I'm missing something here. If they size of the window changes don't you > >have to recompute the pixels anyway? If the size changes your save > >buffer either has to many pixels or not enough pixels. You can also > >resize the currently visible buffer by scaling the image (look for > >glZoom()). Most of the time though it is easiest to just regenerate the > >values. Also, seems like the only time you would use floats for color > >values is when you are doing ultra high precision rendering. Most > >computers can't do that very fast. Not to mention that converting 96 bit > >floating point color to 24 bit color (or what ever tyhe frame buffer > >needs) is going to take quite a while. > > > > Bob P. > > You do have to recompute the pixel values when the size of the window > changes, and restore them in array. The array is used for when portions of > the window need to be redisplayed and the image has not changed. > > You would need to do this when regenerating the image is a large > calculation, and the image remains fairly static. The rendering sequence is > exactly what I had in mind. Say you render a scene and just want to display > it. Then you need the high color and also the array so you don't have to > rerender the image everytime it gets lost on the screen. > > I do have to admit that I'm not sure why OpenGL is working with 3 floats. > I'm more used to DirectX color. As far as I'm using OpenGL, I was told to > just use glColor3f and not worrying about the bit color. What's a better > way to do this? How is, say 24-bit or 32-bit color generally done in OpenGL? the glColor3f is just used to specify a color. It doesn't say anything about how the color is stored in the frame bufer. When you create your GL visual you specify the type of color you want. Usually you will just get whatever the screen is set up for. But, you can specify the depth you want (as long as it's a depth the machine supports.) > > Thanks, > SirFern > > ================================================================= > The GameProgrammer.Com mailing list is for the open discussion > of any topic related to the art, science, and business of > programming games. This list is especially tolerant of beginners. > We were all beginners once > > To SUBSCRIBE or UNSUBSCRIBE please visit: > http://gameprogrammer.com/mailinglist.html ================================================================= The GameProgrammer.Com mailing list is for the open discussion of any topic related to the art, science, and business of programming games. This list is especially tolerant of beginners. We were all beginners once To SUBSCRIBE or UNSUBSCRIBE please visit: http://gameprogrammer.com/mailinglist.html
|
|