From: Ben H. <be...@ex...> - 2001-10-01 02:50:15
|
Oops... I'm wrong... I just read that besides the numberous constants you can pass in as the "internal format" parameter you can also just specify the number of components as either 1, 2, 3 or 4. I.e.: "internalformat The number of color components in the texture. Must be 1, 2, 3, or 4, or one of the following symbolic constants: GL_ALPHA, GL_ALPHA4, GL_ALPHA8, GL_ALPHA12, GL_ALPHA16,..." -ben > -----Original Message----- > From: Ben Houston [mailto:be...@ex...] > Sent: Sunday, September 30, 2001 10:47 PM > To: 'csg...@li...' > Subject: Q about PreTexture2D settings. > > Hi all, > > In "csopengl.c" the function "DMGetTex2DInfo(...)" sets up a Texture2DInfo > structure. In that structure it sets the "internFormat" to the value "3". > Later on this variable gets passed in as the "internal format" setting in > the GL.glTexImage2D() function. As far as I can tell the value "3" is not > a valid setting. What I am wondering is if this a trick or a mistake or > am I missing something? > > <code> > DLLOBJ BOOL DMGetTex2DInfo(HBITMAP hBitmap, Texture2DInfo * ret) > { > BITMAPINFO bInfo; > > [...snip...] > > ret->internFormat = 3; > ret->type = GL_UNSIGNED_BYTE; > ret->format = GL_RGB; > </code> > > Take care, > -ben > |