[OpenGL] Width & Height of scaled and/or rotated texture?

[OpenGL] Width & Height of scaled and/or rotated texture???

Hi,

I’m trying to do 2d collision detection
between two 2-dimensional OpenGL textures.

My problem is:
How do I find the new width and height
of a 2d OpenGL texture that has been scaled and/or rotated??

Here is some source code, any help would be appreciated!!!

//-------------------------------------------------------------------------------------------------
void DrawMovableScalableRotatableTestTexture(void)
{
if (BMP_To_Texture_OK == true)
{
glPushMatrix();

    glTranslatef(Sprites[1].ScreenX, Sprites[1].ScreenY, 0.0f);
    glScalef(Sprites[1].ScaleX, Sprites[1].ScaleY, 1.0f);
    glRotatef(Sprites[1].RotationDegree, 0.0f, 0.0f, 1.0f);

    // Bind the texture to which subsequent calls refer to
    glBindTexture( GL_TEXTURE_2D, Sprites[1].OGL_Texture );

    glEnable(GL_BLEND);
    glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);

    //          R,   G,   B,   A
    glColor4f(1.0, 1.0, 1.0, 1.0);

    glBegin( GL_QUADS ); // Draw texture with scaling
        //Top-left vertex (corner)
        glTexCoord2i( 0, 0 );
        glVertex3f(-64,-64,0);

        //Bottom-left vertex (corner)
        glTexCoord2i( 1, 0 );
        glVertex3f(64,-64,0);

        //Bottom-right vertex (corner)
        glTexCoord2i( 1, 1 );
        glVertex3f(64,64,0);

        //Top-right vertex (corner)
        glTexCoord2i( 0, 1 );
        glVertex3f(-64,64,0);
    glEnd();
}

glPopMatrix();

}
//-------------------------------------------------------------------------------------------------

JeZ+Lee
SLNTHERO at aol.com
Silent Hero Productions®
Video Game Design Studio
www.SilentHeroProductions.com

Simple answer: you can’t.

Not quite as simple answer: finding the width and height of the
quads (or polys generally) on which your textures are displayed is
relatively easy, just some simple trig functions. The textures are
just spray paint on a wall, and what you need is to find the size of
the wall.

HTH.On Wed, Feb 17, 2010 at 2:32 PM, Jesse Palser wrote:

[OpenGL] Width & Height of scaled and/or rotated texture???

Hi,

I’m trying to do 2d collision detection
between two 2-dimensional OpenGL textures.

My problem is:
How do I find the new width and height
of a 2d OpenGL texture that has been scaled and/or rotated??

Here is some source code, any help would be appreciated!!!

//-------------------------------------------------------------------------------------------------
void DrawMovableScalableRotatableTestTexture(void)
{
? if (BMP_To_Texture_OK == true)
? {
? ? ? glPushMatrix();

? ? ? glTranslatef(Sprites[1].ScreenX, Sprites[1].ScreenY, 0.0f);
? ? ? glScalef(Sprites[1].ScaleX, Sprites[1].ScaleY, 1.0f);
? ? ? glRotatef(Sprites[1].RotationDegree, 0.0f, 0.0f, 1.0f);

? ? ? // Bind the texture to which subsequent calls refer to
? ? ? glBindTexture( GL_TEXTURE_2D, Sprites[1].OGL_Texture );

? ? ? glEnable(GL_BLEND);
? ? ? glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);

? ? ? // ? ? ? ? ?R, ? G, ? B, ? A
? ? ? glColor4f(1.0, 1.0, 1.0, 1.0);

? ? ? glBegin( GL_QUADS ); // Draw texture with scaling
? ? ? ? ? //Top-left vertex (corner)
? ? ? ? ? glTexCoord2i( 0, 0 );
? ? ? ? ? glVertex3f(-64,-64,0);

? ? ? ? ? //Bottom-left vertex (corner)
? ? ? ? ? glTexCoord2i( 1, 0 );
? ? ? ? ? glVertex3f(64,-64,0);

? ? ? ? ? //Bottom-right vertex (corner)
? ? ? ? ? glTexCoord2i( 1, 1 );
? ? ? ? ? glVertex3f(64,64,0);

? ? ? ? ? //Top-right vertex (corner)
? ? ? ? ? glTexCoord2i( 0, 1 );
? ? ? ? ? glVertex3f(-64,64,0);
? ? ? glEnd();
? }

? glPopMatrix();
}
//-------------------------------------------------------------------------------------------------

JeZ+Lee
SLNTHERO at aol.com
Silent Hero Productions®
Video Game Design Studio
www.SilentHeroProductions.com


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Ugg, not trigonometry - hate math!

There is no simple OpenGL command
to test if one 2d texture on the screen
is touching another 2d texture on the screen?

Guess I’ll Google more…

JeZ+Lee

Justin Coleman wrote:> Simple answer: you can’t.

Not quite as simple answer: finding the width and height of the
quads (or polys generally) on which your textures are displayed is
relatively easy, just some simple trig functions. The textures are
just spray paint on a wall, and what you need is to find the size of
the wall.

HTH.

On Wed, Feb 17, 2010 at 2:32 PM, Jesse Palser wrote:

[OpenGL] Width & Height of scaled and/or rotated texture???

Hi,

I’m trying to do 2d collision detection
between two 2-dimensional OpenGL textures.

My problem is:
How do I find the new width and height
of a 2d OpenGL texture that has been scaled and/or rotated??

Here is some source code, any help would be appreciated!!!

//-------------------------------------------------------------------------------------------------
void DrawMovableScalableRotatableTestTexture(void)
{
if (BMP_To_Texture_OK == true)
{
glPushMatrix();

  glTranslatef(Sprites[1].ScreenX, Sprites[1].ScreenY, 0.0f);
  glScalef(Sprites[1].ScaleX, Sprites[1].ScaleY, 1.0f);
  glRotatef(Sprites[1].RotationDegree, 0.0f, 0.0f, 1.0f);

  // Bind the texture to which subsequent calls refer to
  glBindTexture( GL_TEXTURE_2D, Sprites[1].OGL_Texture );

  glEnable(GL_BLEND);
  glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);

  //          R,   G,   B,   A
  glColor4f(1.0, 1.0, 1.0, 1.0);

  glBegin( GL_QUADS ); // Draw texture with scaling
      //Top-left vertex (corner)
      glTexCoord2i( 0, 0 );
      glVertex3f(-64,-64,0);

      //Bottom-left vertex (corner)
      glTexCoord2i( 1, 0 );
      glVertex3f(64,-64,0);

      //Bottom-right vertex (corner)
      glTexCoord2i( 1, 1 );
      glVertex3f(64,64,0);

      //Top-right vertex (corner)
      glTexCoord2i( 0, 1 );
      glVertex3f(-64,64,0);
  glEnd();

}

glPopMatrix();
}
//-------------------------------------------------------------------------------------------------

JeZ+Lee
SLNTHERO at aol.com
Silent Hero Productions®
Video Game Design Studio
www.SilentHeroProductions.com


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

No, because OpenGL doesn’t care. It’s not a scene graph, or a 3d
engine. It’s a renderer, pure and simple, and it knows nothing (for
the purposes of this question) about where your textures are, other
than on your polygons.

BTW, you’ll probably get better google results if you stop using the
word texture where you should be using polygon.On Wed, Feb 17, 2010 at 2:58 PM, Jesse Palser wrote:

Ugg, not trigonometry - hate math!

There is no simple OpenGL command
to test if one 2d texture on the screen
is touching another 2d texture on the screen?

Guess I’ll Google more…

JeZ+Lee

Justin Coleman wrote:

Simple answer: you can’t.

Not quite as simple answer: finding the width and height of the
quads (or polys generally) on which your textures are displayed is
relatively easy, just some simple trig functions. The textures are
just spray paint on a wall, and what you need is to find the size of
the wall.

HTH.

On Wed, Feb 17, 2010 at 2:32 PM, Jesse Palser wrote:

[OpenGL] Width & Height of scaled and/or rotated texture???

Hi,

I’m trying to do 2d collision detection
between two 2-dimensional OpenGL textures.

My problem is:
How do I find the new width and height
of a 2d OpenGL texture that has been scaled and/or rotated??

Here is some source code, any help would be appreciated!!!

//-------------------------------------------------------------------------------------------------
void DrawMovableScalableRotatableTestTexture(void)
{
?if (BMP_To_Texture_OK == true)
?{
? ? ?glPushMatrix();

? ? ?glTranslatef(Sprites[1].ScreenX, Sprites[1].ScreenY, 0.0f);
? ? ?glScalef(Sprites[1].ScaleX, Sprites[1].ScaleY, 1.0f);
? ? ?glRotatef(Sprites[1].RotationDegree, 0.0f, 0.0f, 1.0f);

? ? ?// Bind the texture to which subsequent calls refer to
? ? ?glBindTexture( GL_TEXTURE_2D, Sprites[1].OGL_Texture );

? ? ?glEnable(GL_BLEND);
? ? ?glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);

? ? ?// ? ? ? ? ?R, ? G, ? B, ? A
? ? ?glColor4f(1.0, 1.0, 1.0, 1.0);

? ? ?glBegin( GL_QUADS ); // Draw texture with scaling
? ? ? ? ?//Top-left vertex (corner)
? ? ? ? ?glTexCoord2i( 0, 0 );
? ? ? ? ?glVertex3f(-64,-64,0);

? ? ? ? ?//Bottom-left vertex (corner)
? ? ? ? ?glTexCoord2i( 1, 0 );
? ? ? ? ?glVertex3f(64,-64,0);

? ? ? ? ?//Bottom-right vertex (corner)
? ? ? ? ?glTexCoord2i( 1, 1 );
? ? ? ? ?glVertex3f(64,64,0);

? ? ? ? ?//Top-right vertex (corner)
? ? ? ? ?glTexCoord2i( 0, 1 );
? ? ? ? ?glVertex3f(-64,64,0);
? ? ?glEnd();
?}

?glPopMatrix();
}

//-------------------------------------------------------------------------------------------------

JeZ+Lee
SLNTHERO at aol.com
Silent Hero Productions®
Video Game Design Studio
www.SilentHeroProductions.com


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

I think you can nab the matrix that OpenGL is using to transform your quads.
Then you could apply that to your own data (positions of the corners) and
then calculate the dimensions with simple subtraction. Rotations in 2d are
not tough at all. You might want to be sure of your coordinate system. SDL
uses a left-handed one whereas many people set up 2d OpenGL to use
right-handed. Also, throwing scaling and translations into the mix will
require you to think a bit more.

// Just rotation, in radians:
float x2 = xcos(angle);
float y2 = y
sin(angle);

Jonny DOn Wed, Feb 17, 2010 at 3:08 PM, Justin Coleman wrote:

No, because OpenGL doesn’t care. It’s not a scene graph, or a 3d
engine. It’s a renderer, pure and simple, and it knows nothing (for
the purposes of this question) about where your textures are, other
than on your polygons.

BTW, you’ll probably get better google results if you stop using the
word texture where you should be using polygon.

On Wed, Feb 17, 2010 at 2:58 PM, Jesse Palser wrote:

Ugg, not trigonometry - hate math!

There is no simple OpenGL command
to test if one 2d texture on the screen
is touching another 2d texture on the screen?

Guess I’ll Google more…

JeZ+Lee

Justin Coleman wrote:

Simple answer: you can’t.

Not quite as simple answer: finding the width and height of the
quads (or polys generally) on which your textures are displayed is
relatively easy, just some simple trig functions. The textures are
just spray paint on a wall, and what you need is to find the size of
the wall.

HTH.

On Wed, Feb 17, 2010 at 2:32 PM, Jesse Palser wrote:

[OpenGL] Width & Height of scaled and/or rotated texture???

Hi,

I’m trying to do 2d collision detection
between two 2-dimensional OpenGL textures.

My problem is:
How do I find the new width and height
of a 2d OpenGL texture that has been scaled and/or rotated??

Here is some source code, any help would be appreciated!!!

//-------------------------------------------------------------------------------------------------

void DrawMovableScalableRotatableTestTexture(void)
{
if (BMP_To_Texture_OK == true)
{
glPushMatrix();

 glTranslatef(Sprites[1].ScreenX, Sprites[1].ScreenY, 0.0f);
 glScalef(Sprites[1].ScaleX, Sprites[1].ScaleY, 1.0f);
 glRotatef(Sprites[1].RotationDegree, 0.0f, 0.0f, 1.0f);

 // Bind the texture to which subsequent calls refer to
 glBindTexture( GL_TEXTURE_2D, Sprites[1].OGL_Texture );

 glEnable(GL_BLEND);
 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);

 //          R,   G,   B,   A
 glColor4f(1.0, 1.0, 1.0, 1.0);

 glBegin( GL_QUADS ); // Draw texture with scaling
     //Top-left vertex (corner)
     glTexCoord2i( 0, 0 );
     glVertex3f(-64,-64,0);

     //Bottom-left vertex (corner)
     glTexCoord2i( 1, 0 );
     glVertex3f(64,-64,0);

     //Bottom-right vertex (corner)
     glTexCoord2i( 1, 1 );
     glVertex3f(64,64,0);

     //Top-right vertex (corner)
     glTexCoord2i( 0, 1 );
     glVertex3f(-64,64,0);
 glEnd();

}

glPopMatrix();
}

//-------------------------------------------------------------------------------------------------

JeZ+Lee
SLNTHERO at aol.com
Silent Hero Productions®
Video Game Design Studio
www.SilentHeroProductions.com


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

I have not checked but are you sure it is left-handed?

OpenGL uses a right-handed coordinate system (right, up, out).
Direct3D uses a right-handed coordinate system (right, down, in).

Left-handed is somewhat rare, I would have expected SDL to use the D3D one if it wants Y to be down.On 02/17/2010 12:22 PM, Jonathan Dearborn wrote:

I think you can nab the matrix that OpenGL is using to transform your
quads. Then you could apply that to your own data (positions of the
corners) and then calculate the dimensions with simple subtraction.
Rotations in 2d are not tough at all. You might want to be sure of
your coordinate system. SDL uses a left-handed one whereas many people
set up 2d OpenGL to use right-handed. Also, throwing scaling and
translations into the mix will require you to think a bit more.

// Just rotation, in radians:
float x2 = xcos(angle);
float y2 = y
sin(angle);

Jonny D

On Wed, Feb 17, 2010 at 3:08 PM, Justin Coleman <jmcoleman at gmail.com <mailto:jmcoleman at gmail.com>> wrote:

No, because OpenGL doesn't care. It's not a scene graph, or a 3d
engine. It's a renderer, pure and simple, and it knows nothing (for
the purposes of this question) about where your textures are, other
than on your polygons.

BTW, you'll probably get better google results if you stop using the
word texture where you should be using polygon.

On Wed, Feb 17, 2010 at 2:58 PM, Jesse Palser <SLNTHERO at aol.com <mailto:SLNTHERO at aol.com>> wrote:
> Ugg, not trigonometry - hate math!
>
> There is no simple OpenGL command
> to test if one 2d texture on the screen
> is touching another 2d texture on the screen?
>
> Guess I'll Google more...
>
>
> JeZ+Lee
>
>
>
>
>
> Justin Coleman wrote:
>>
>> Simple answer: you can't.
>>
>> Not quite as simple answer: finding the width and height of the
>> *quads* (or polys generally) on which your textures are displayed is
>> relatively easy, just some simple trig functions. The textures are
>> just spray paint on a wall, and what you need is to find the size of
>> the wall.
>>
>> HTH.
>>
>> On Wed, Feb 17, 2010 at 2:32 PM, Jesse Palser <SLNTHERO at aol.com <mailto:SLNTHERO at aol.com>> wrote:
>>
>>>
>>> [OpenGL] Width & Height of scaled and/or rotated texture???
>>>
>>>
>>> Hi,
>>>
>>> I'm trying to do 2d collision detection
>>> between two 2-dimensional OpenGL textures.
>>>
>>> My problem is:
>>> How do I find the new width and height
>>> of a 2d OpenGL texture that has been scaled and/or rotated??
>>>
>>> Here is some source code, any help would be appreciated!!!
>>>
>>>
>>>
//-------------------------------------------------------------------------------------------------
>>> void DrawMovableScalableRotatableTestTexture(void)
>>> {
>>>  if (BMP_To_Texture_OK == true)
>>>  {
>>>      glPushMatrix();
>>>
>>>      glTranslatef(Sprites[1].ScreenX, Sprites[1].ScreenY, 0.0f);
>>>      glScalef(Sprites[1].ScaleX, Sprites[1].ScaleY, 1.0f);
>>>      glRotatef(Sprites[1].RotationDegree, 0.0f, 0.0f, 1.0f);
>>>
>>>      // Bind the texture to which subsequent calls refer to
>>>      glBindTexture( GL_TEXTURE_2D, Sprites[1].OGL_Texture );
>>>
>>>      glEnable(GL_BLEND);
>>>      glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
>>>
>>>      //          R,   G,   B,   A
>>>      glColor4f(1.0, 1.0, 1.0, 1.0);
>>>
>>>      glBegin( GL_QUADS ); // Draw texture with scaling
>>>          //Top-left vertex (corner)
>>>          glTexCoord2i( 0, 0 );
>>>          glVertex3f(-64,-64,0);
>>>
>>>          //Bottom-left vertex (corner)
>>>          glTexCoord2i( 1, 0 );
>>>          glVertex3f(64,-64,0);
>>>
>>>          //Bottom-right vertex (corner)
>>>          glTexCoord2i( 1, 1 );
>>>          glVertex3f(64,64,0);
>>>
>>>          //Top-right vertex (corner)
>>>          glTexCoord2i( 0, 1 );
>>>          glVertex3f(-64,64,0);
>>>      glEnd();
>>>  }
>>>
>>>  glPopMatrix();
>>> }
>>>
>>>
//-------------------------------------------------------------------------------------------------
>>>
>>>
>>> JeZ+Lee
>>> SLNTHERO at aol.com <mailto:SLNTHERO at aol.com>
>>> Silent Hero Productions(R)
>>> Video Game Design Studio
>>> www.SilentHeroProductions.com <http://www.SilentHeroProductions.com>
>>>
>>> _______________________________________________
>>> SDL mailing list
>>> SDL at lists.libsdl.org <mailto:SDL at lists.libsdl.org>
>>> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
>>>
>>>
>>
>> _______________________________________________
>> SDL mailing list
>> SDL at lists.libsdl.org <mailto:SDL at lists.libsdl.org>
>> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
>>
>
> _______________________________________________
> SDL mailing list
> SDL at lists.libsdl.org <mailto:SDL at lists.libsdl.org>
> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
>
_______________________________________________
SDL mailing list
SDL at lists.libsdl.org <mailto:SDL at lists.libsdl.org>
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


LordHavoc
Author of DarkPlaces Quake1 engine - http://icculus.org/twilight/darkplaces
Co-designer of Nexuiz - http://alientrap.org/nexuiz
"War does not prove who is right, it proves who is left." - Unknown
"Any sufficiently advanced technology is indistinguishable from a rigged demo." - James Klass
"A game is a series of interesting choices." - Sid Meier

Well, with a 2d library it is easier to say left-handed than to specify the
sign of the 3rd dimension and explain that the projected 2d angle will be
backwards. SDL uses (right, down), of course.

Jonny DOn Wed, Feb 17, 2010 at 4:20 PM, Forest Hale wrote:

I have not checked but are you sure it is left-handed?

OpenGL uses a right-handed coordinate system (right, up, out).
Direct3D uses a right-handed coordinate system (right, down, in).

Left-handed is somewhat rare, I would have expected SDL to use the D3D one
if it wants Y to be down.

On 02/17/2010 12:22 PM, Jonathan Dearborn wrote:

I think you can nab the matrix that OpenGL is using to transform your
quads. Then you could apply that to your own data (positions of the
corners) and then calculate the dimensions with simple subtraction.
Rotations in 2d are not tough at all. You might want to be sure of
your coordinate system. SDL uses a left-handed one whereas many people
set up 2d OpenGL to use right-handed. Also, throwing scaling and
translations into the mix will require you to think a bit more.

// Just rotation, in radians:
float x2 = xcos(angle);
float y2 = y
sin(angle);

Jonny D

On Wed, Feb 17, 2010 at 3:08 PM, Justin Coleman <jmcoleman at gmail.com <mailto:jmcoleman at gmail.com>> wrote:

No, because OpenGL doesn't care. It's not a scene graph, or a 3d
engine. It's a renderer, pure and simple, and it knows nothing (for
the purposes of this question) about where your textures are, other
than on your polygons.

BTW, you'll probably get better google results if you stop using the
word texture where you should be using polygon.

On Wed, Feb 17, 2010 at 2:58 PM, Jesse Palser <SLNTHERO at aol.com <mailto:SLNTHERO at aol.com>> wrote:
> Ugg, not trigonometry - hate math!
>
> There is no simple OpenGL command
> to test if one 2d texture on the screen
> is touching another 2d texture on the screen?
>
> Guess I'll Google more...
>
>
> JeZ+Lee
>
>
>
>
>
> Justin Coleman wrote:
>>
>> Simple answer: you can't.
>>
>> Not quite as simple answer: finding the width and height of the
>> *quads* (or polys generally) on which your textures are displayed

is

>> relatively easy, just some simple trig functions. The textures are
>> just spray paint on a wall, and what you need is to find the size

of

>> the wall.
>>
>> HTH.
>>
>> On Wed, Feb 17, 2010 at 2:32 PM, Jesse Palser <SLNTHERO at aol.com <mailto:SLNTHERO at aol.com>> wrote:
>>
>>>
>>> [OpenGL] Width & Height of scaled and/or rotated texture???
>>>
>>>
>>> Hi,
>>>
>>> I'm trying to do 2d collision detection
>>> between two 2-dimensional OpenGL textures.
>>>
>>> My problem is:
>>> How do I find the new width and height
>>> of a 2d OpenGL texture that has been scaled and/or rotated??
>>>
>>> Here is some source code, any help would be appreciated!!!
>>>
>>>
>>>

//-------------------------------------------------------------------------------------------------

>>> void DrawMovableScalableRotatableTestTexture(void)
>>> {
>>>  if (BMP_To_Texture_OK == true)
>>>  {
>>>      glPushMatrix();
>>>
>>>      glTranslatef(Sprites[1].ScreenX, Sprites[1].ScreenY, 0.0f);
>>>      glScalef(Sprites[1].ScaleX, Sprites[1].ScaleY, 1.0f);
>>>      glRotatef(Sprites[1].RotationDegree, 0.0f, 0.0f, 1.0f);
>>>
>>>      // Bind the texture to which subsequent calls refer to
>>>      glBindTexture( GL_TEXTURE_2D, Sprites[1].OGL_Texture );
>>>
>>>      glEnable(GL_BLEND);
>>>      glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
>>>
>>>      //          R,   G,   B,   A
>>>      glColor4f(1.0, 1.0, 1.0, 1.0);
>>>
>>>      glBegin( GL_QUADS ); // Draw texture with scaling
>>>          //Top-left vertex (corner)
>>>          glTexCoord2i( 0, 0 );
>>>          glVertex3f(-64,-64,0);
>>>
>>>          //Bottom-left vertex (corner)
>>>          glTexCoord2i( 1, 0 );
>>>          glVertex3f(64,-64,0);
>>>
>>>          //Bottom-right vertex (corner)
>>>          glTexCoord2i( 1, 1 );
>>>          glVertex3f(64,64,0);
>>>
>>>          //Top-right vertex (corner)
>>>          glTexCoord2i( 0, 1 );
>>>          glVertex3f(-64,64,0);
>>>      glEnd();
>>>  }
>>>
>>>  glPopMatrix();
>>> }
>>>
>>>

//-------------------------------------------------------------------------------------------------

>>>
>>>
>>> JeZ+Lee
>>> SLNTHERO at aol.com <mailto:SLNTHERO at aol.com>
>>> Silent Hero Productions(R)
>>> Video Game Design Studio
>>> www.SilentHeroProductions.com <

http://www.SilentHeroProductions.com>

>>>
>>> _______________________________________________
>>> SDL mailing list
>>> SDL at lists.libsdl.org <mailto:SDL at lists.libsdl.org>
>>> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
>>>
>>>
>>
>> _______________________________________________
>> SDL mailing list
>> SDL at lists.libsdl.org <mailto:SDL at lists.libsdl.org>
>> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
>>
>
> _______________________________________________
> SDL mailing list
> SDL at lists.libsdl.org <mailto:SDL at lists.libsdl.org>
> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
>
_______________________________________________
SDL mailing list
SDL at lists.libsdl.org <mailto:SDL at lists.libsdl.org>
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


LordHavoc
Author of DarkPlaces Quake1 engine -
http://icculus.org/twilight/darkplaces
Co-designer of Nexuiz - http://alientrap.org/nexuiz
"War does not prove who is right, it proves who is left." - Unknown
"Any sufficiently advanced technology is indistinguishable from a rigged
demo." - James Klass
"A game is a series of interesting choices." - Sid Meier


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org