1. Opengl Texturing

This is a multi-part message in MIME format.

------=_NextPart_000_0005_01C3B132.0D5D3800
	charset="iso-8859-1"

I'm drawing alot of textured quads. And the texture doesn't look right they look
like there turned into triangles then textured, look at the screen shots
bad ati text 1.png
bad ati text 2.png
at the site http://nightangles.com/screenshots/
I've looked everywhere I know to look and still have no way to make them look
right

------=_NextPart_000_0005_01C3B132.0D5D3800
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: 8bit

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1276" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>I'm drawing alot of textured quads. And the texture
doesn't look right they look like there turned into triangles then textured, 
look at the screen shots</FONT></DIV>
<DIV><FONT face=Arial size=2>
<DIV><FONT face=Arial size=2>bad ati text 1.png
<DIV><FONT face=Arial size=2>bad ati text 2.png</FONT></DIV>
<DIV>at the site <A 
href="http://nightangles.com/screenshots/">http://nightangles.com/screenshots/</A></DIV>
<DIV>I've looked everywhere I know to look and still have no way to make them 
look right</DIV>

------=_NextPart_000_0005_01C3B132.0D5D3800--

new topic     » topic index » view message » categorize

2. Re: Opengl Texturing

Make sure you didn't use 0.5 as the texture coordinate for the first 
triangle and 1.0 for the other. Or something like that - the texture looks 
about twice as big on one of them compared to the other.

new topic     » goto parent     » topic index » view message » categorize

3. Re: Opengl Texturing

Looks like one of your texture coordinates is wrong.
If you want, you can send me that part of your code and I'll give it a 
look.  A second set of eyes might help.

Daniel Kluss wrote:

> 
> I'm drawing alot of textured quads. And the texture doesn't look right 
> they look like there turned into triangles then textured, look at the 
> screen shots
> bad ati text 1.png
> bad ati text 2.png
> at the site http://nightangles.com/screenshots/
> I've looked everywhere I know to look and still have no way to make them 
> look right
>  
> 
> --^^---------------------------------------------------------------
> This email was sent to: 1evan at sbcglobal.net
> 
> 
> TOPICA - Start your own email discussion group. FREE!
>

new topic     » goto parent     » topic index » view message » categorize

4. Re: Opengl Texturing

Those two pictures are the same model, the same rendering, just turned a
couple degrees and the texture flips like that, all funny. But neither of
the two are correct, It should look like there is no seam, cause its drawn
like this below.
I think its the ATI, look at some of the other other pics in
http://nightangles.com/screenshots/, there are lots of errors that just
aren't my fault. By using a computer that has only software emulation draws
that same texture problems.

>From a totally baffled individual named,
Daniel Kluss

<code snip of texture loading>
        glEnable(GL_TEXTURE_2D)
        glGenTextures(1,mem2)
        texture_nums&=peek4u(mem2)
        glBindTexture(GL_TEXTURE_2D,peek4u(mem2))
        free(mem2)

                glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S,
GL_CLAMP_TO_EDGE)
                glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T,
GL_CLAMP_TO_EDGE)
                glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER,
GL_LINEAR)
                glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER,
GL_LINEAR)
if match("GL_SGIS_generate_mipmap",EXT_GL_EXTENSION) then
                glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER,
GL_LINEAR_MIPMAP_LINEAR)

glTexParameterf(GL_TEXTURE_2D,GL_GENERATE_MIPMAP_SGIS,GL_TRUE)
end if
                glTexEnvf(GL_TEXTURE_ENV,GL_TEXTURE_ENV_MODE, GL_REPLACE)

        glTexImage2D(
        GL_TEXTURE_2D,          --GLenum target
        0,                      --GLint level,
        3,                      --GLint internalformat,
        tw,                     --GLsizei width,
        th,                     --GLsizei height,
        0,                      --GLint border,
        GL_COLOR_INDEX,         --GLenum format,
        GL_UNSIGNED_BYTE,       --GLenum type,
        mem)                    --const GLvoid *pixels )
        free(mem)
</code snip of texture loading>
<code snip of polygon drawing>
                tcoords={{0,0},{1,0},{1,1},{0,1}}
                glBegin(GL_POLYGON)
                for i = 1 to length(data) do
                        glTexCoord2d(tcoords[i][1],tcoords[i][2])
                        glVertex3d(data[i][1],data[i][2],data[i][3])
                end for
                glEnd()
</code snip of polygon drawing>
----- Original Message ----- 
From: "mic _" <stabmaster_ at hotmail.com>
To: <EUforum at topica.com>
Sent: Sunday, November 23, 2003 5:47 AM
Subject: Re: Opengl Texturing


>
>
> Make sure you didn't use 0.5 as the texture coordinate for the first
> triangle and 1.0 for the other. Or something like that - the texture looks
> about twice as big on one of them compared to the other.
>
>
>
> TOPICA - Start your own email discussion group. FREE!
>
>

new topic     » goto parent     » topic index » view message » categorize

5. Re: Opengl Texturing

GL_SGIS_generate_mipmap doesn't work too well on ATI cards, especially not 
combined with texture compression. Try using gluBuild2DMipmaps() instead.

new topic     » goto parent     » topic index » view message » categorize

6. Re: Opengl Texturing

I have an OLD ATI radeon 7000 bad and slow, but I don't think
GL_SGIS_generate_mipmap is the problem, I've turned that off and every other
feature, and just used GL_NEAREST for everything and still same problem, it
looks like when you have a trapazoid and you cut it into two triangles(thats
what every card does, all triangles) the triangles are the same size in
surface area, and thus the texture get streched funny, so what to I do to
make them not get cut into triangles? I already use GL_QUADS, tried
GL_POLYGON,is there no solution?

Daniel Kluss
----- Original Message ----- 
From: "mic _" <stabmaster_ at hotmail.com>
To: <EUforum at topica.com>
Sent: Sunday, November 23, 2003 4:53 PM
Subject: Re: Opengl Texturing


>
>
> GL_SGIS_generate_mipmap doesn't work too well on ATI cards, especially not
> combined with texture compression. Try using gluBuild2DMipmaps() instead.
>
>
>
> TOPICA - Start your own email discussion group. FREE!
>
>

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu