OpenGL (0,0) Location Advice (was "Re: OpenGL "1 to 1" Pixel Setup?")

Fixed it, and have one more question, details follow.

Whoa! Okay, Here’s the deal, I was using glOrtho, but things didn’t look
right when I did – didn’t see anything at the center of the screen. Of
course, stupid me, I didn’t think to enlarge the polygon to GREATER than 1
pixel wide (as was defined previously) for the non-Ortho, so I could see
it)… I changed the size, and caught the edge of it in (drumrole) the
bottom left corner! Where else.

Anyway, thanks for the help, and sorry for proving my inexperience so
publicly!

My other question for you with experience is this: How does one best handle
the situation wherein it seems everything except OpenGL reads pixels from
the top-left? (Is it a linux thing, to read pixels starting at the
bottom-left?) I read NeHe’s tutorial code for textures, and he does this
crazy line swapping thing, which doesn’t seem like it would be terribly
efficient. Just curious.> ----- Original Message -----

From: marc@solcon.nl (M.A. Oude Kotte)
To:
Sent: Monday, May 10, 2004 8:20 PM
Subject: Re: [SDL] OpenGL “1 to 1” Pixel Setup?

You should check the glOrtho function to setup an orthogonal view in
your projection matrix.

HTH

Marc

you can always turn the texture coordinates upside down (:> ----- Original Message -----

From: lareon@comcast.net (Scott Harper)
To:
Sent: Monday, May 10, 2004 7:44 PM
Subject: [SDL] OpenGL (0,0) Location Advice (was “Re: OpenGL “1 to 1” Pixel
Setup?”)

Fixed it, and have one more question, details follow.

Whoa! Okay, Here’s the deal, I was using glOrtho, but things didn’t look
right when I did – didn’t see anything at the center of the screen. Of
course, stupid me, I didn’t think to enlarge the polygon to GREATER than 1
pixel wide (as was defined previously) for the non-Ortho, so I could see
it)… I changed the size, and caught the edge of it in (drumrole) the
bottom left corner! Where else.

Anyway, thanks for the help, and sorry for proving my inexperience so
publicly!

My other question for you with experience is this: How does one best
handle
the situation wherein it seems everything except OpenGL reads pixels from
the top-left? (Is it a linux thing, to read pixels starting at the
bottom-left?) I read NeHe’s tutorial code for textures, and he does this
crazy line swapping thing, which doesn’t seem like it would be terribly
efficient. Just curious.

----- Original Message -----
From: “M.A. Oude Kotte”
To:
Sent: Monday, May 10, 2004 8:20 PM
Subject: Re: [SDL] OpenGL “1 to 1” Pixel Setup?

You should check the glOrtho function to setup an orthogonal view in
your projection matrix.

HTH

Marc


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

Actually most things that aren’t intimately involved with video ram
buffers are bottom up, you know, like the REST OF THE GODDAMNED WORLD.
Up should be positive!On May 10, 2004, at 10:44 PM, Scott Harper wrote:

Fixed it, and have one more question, details follow.

Whoa! Okay, Here’s the deal, I was using glOrtho, but things didn’t
look
right when I did – didn’t see anything at the center of the screen.
Of
course, stupid me, I didn’t think to enlarge the polygon to GREATER
than 1
pixel wide (as was defined previously) for the non-Ortho, so I could
see
it)… I changed the size, and caught the edge of it in (drumrole) the
bottom left corner! Where else.

Anyway, thanks for the help, and sorry for proving my inexperience so
publicly!

My other question for you with experience is this: How does one best
handle
the situation wherein it seems everything except OpenGL reads pixels
from
the top-left? (Is it a linux thing, to read pixels starting at the
bottom-left?) I read NeHe’s tutorial code for textures, and he does
this
crazy line swapping thing, which doesn’t seem like it would be terribly
efficient. Just curious.

----- Original Message -----
From: “M.A. Oude Kotte”
To:
Sent: Monday, May 10, 2004 8:20 PM
Subject: Re: [SDL] OpenGL “1 to 1” Pixel Setup?

You should check the glOrtho function to setup an orthogonal view in
your projection matrix.

HTH

Marc


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

Scott,

On your glOrtho, swap parameters 3 and 4. (0,0) changes bottom-left to
top-left.

void glOrtho(GLdouble left,
GLdouble right,
GLdouble bottom,
GLdouble top,
GLdouble near,
GLdouble far)

Regards,
Gerald Kaszuba

Scott Harper> -----Original Message-----

From: sdl-admin at libsdl.org [mailto:sdl-admin at libsdl.org] On Behalf Of
Sent: Tuesday, 11 May 2004 12:45 PM
To: sdl at libsdl.org
Subject: [SDL] OpenGL (0,0) Location Advice (was "Re: OpenGL “1 to 1"
Pixel Setup?”)

Fixed it, and have one more question, details follow.

Whoa! Okay, Here’s the deal, I was using glOrtho, but things didn’t
look
right when I did – didn’t see anything at the center of the screen.
Of
course, stupid me, I didn’t think to enlarge the polygon to GREATER
than 1
pixel wide (as was defined previously) for the non-Ortho, so I could
see
it)… I changed the size, and caught the edge of it in (drumrole)
the
bottom left corner! Where else.

Anyway, thanks for the help, and sorry for proving my inexperience so
publicly!

My other question for you with experience is this: How does one best
handle
the situation wherein it seems everything except OpenGL reads pixels
from
the top-left? (Is it a linux thing, to read pixels starting at the
bottom-left?) I read NeHe’s tutorial code for textures, and he does
this
crazy line swapping thing, which doesn’t seem like it would be
terribly
efficient. Just curious.

----- Original Message -----
From: “M.A. Oude Kotte”
To:
Sent: Monday, May 10, 2004 8:20 PM
Subject: Re: [SDL] OpenGL “1 to 1” Pixel Setup?

You should check the glOrtho function to setup an orthogonal view in
your projection matrix.

HTH

Marc


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl