Results 1 to 4 of 4

Thread: Zooming/Magnify

  1. #1
    Member Newbie
    Join Date
    Jan 2002
    Posts
    32

    Zooming/Magnify

    I have a Question about zooming. I use OpenGL for 2d currently. How can I zoom/magnify the things? I mean pixels, like in gimp or photoshop with the zoom tool. So when I zoom by the factor of 2, all pixels should be twice as large. I do not use glDrawPixels(), because I need to translate/rotate images, lines etc.

    plastichead.

  2. #2
    Junior Member Newbie
    Join Date
    Jul 2001
    Posts
    4

    Re: Zooming/Magnify

    Did you try glPointSize()?

    [This message has been edited by citizen (edited 07-19-2001).]

  3. #3
    Member Newbie
    Join Date
    Jul 2001
    Location
    boston, ma, usa
    Posts
    30

    Re: Zooming/Magnify

    It depends on what you want.
    If you want your image still be straightly faced to you after the rotation, you must use Raster mothod to display your image. And the zooming effect can be achieved by glPixelZoom(xScale, yScale).
    If you want the outlook of your image be conformed with the rotation, you actually need 3D rendering. Here you must use texture machanism to map your image on to a QUAD. The rotation and zooming of your image therefore is by performing the same operations on the QUAD.



    [This message has been edited by jxruan (edited 07-19-2001).]

  4. #4
    Member Newbie
    Join Date
    Jan 2002
    Posts
    32

    Re: Zooming/Magnify

    (Back from vacation). glPointSize() only magnifies points drawn with GL_POINT.
    Yes, I need to keep rotation etc. Because I also draw lines and not only images (I draw them with textures, glDrawPixels() is slow), I can't simply solve the problem with letting opengl zooming the texture.
    Yes, I could draw all the things to a texture and use it with a doubly sized QUAD.
    I also thought about drawing the things to the backbuffer and then copy a smaller part of the backbuffer to the whole frontbuffer with glCopyPixels() and glPixelZoom().
    Any suggestions?

Similar Threads

  1. Zooming out
    By Canadian0469 in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 05-19-2008, 01:01 PM
  2. Replies: 1
    Last Post: 11-14-2005, 04:12 PM
  3. zooming
    By in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 01-10-2005, 11:29 AM
  4. zooming
    By in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 02-18-2004, 03:26 PM
  5. zooming
    By in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 08-14-2002, 10:47 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean