Just Launched: You can now import projects and releases from Google Code onto SourceForge
We are excited to release new functionality to enable a 1-click import from Google Code onto the Allura platform on SourceForge. You can import tickets, wikis, source, releases, and more with a few simple steps. Read More
I am trying texturing for the first time and I also am only seeing the
rectangle I'm drawing, the texture is not being applied for some reason. I
am using a 24 bit .BMP file......using an fread to read in the width,
height, etc which I know is being pulled out correctly, but how do I know
that the raster data is being pulled out correctly? Does it need to be read
any differently if it is 24 bit as opposed to 1,4,8 or 16? Help!
From: Stefan Seefeld [mailto:seefelds@...]
Sent: Tuesday, December 05, 2000 3:55 PM
Subject: [Mesa3d-users] texture demo
I'm trying to use texture maps to render transformable text.
As I currently use b/w text (i.e. no antialiasing), I'd like
to use GL_LUMINANCE as the format. However, all I get are white
rectangles (corresponding to the bounding boxes of the glyhs). I
played with the 'texobj' demo to understand the problem better, but got
the same trouble there. The modification I applied were to change from
glTexImage2D( GL_TEXTURE_2D, 0, 3, width, height, 0, GL_RGB,
glTexImage2D( GL_TEXTURE_2D, 0, 1, width, height, 0, GL_LUMINANCE,
(plus of course some adjustments to the 'tex' data themselfs).
Can anybody tell me what I'm doing wrong ?
Departement de Physique
Universite de Montreal
...ich hab' noch einen Koffer in Berlin...
Mesa3d-users mailing list
From: Brian Paul <brianp@va...> - 2000-12-08 00:01:20
Estevez Cherie J DLVA wrote:
> I am trying texturing for the first time and I also am only seeing the
> rectangle I'm drawing, the texture is not being applied for some reason. I
> am using a 24 bit .BMP file......using an fread to read in the width,
> height, etc which I know is being pulled out correctly, but how do I know
> that the raster data is being pulled out correctly? Does it need to be read
> any differently if it is 24 bit as opposed to 1,4,8 or 16? Help!
I can't help you with BMP file loading.
The OpenGL spec says that OpenGL will act as if texturing is disabled when
texture state is "incomplete". That's a common newbie problem.
You might check:
1. Do you have all mipmap levels defined if using a mipmap minification
filter? The default minification filter needs mipmaps. Try GL_LINEAR
or GL_NEAREST filtering instead.
2. Is your texture env mode and texture format a valid combination?
See table 3.19 in the spec.
3. Are you providing good texture coordinates?
4. You've called glEnable(GL_TEXTURE_2D)?