Thread: Using Opengl to transform images

  1. #1
    Registered User
    Join Date
    Jun 2008

    Using Opengl to transform images

    I have a project where I need to be able to rotate, stretch, and skew images fairly quickly. The images will almost always be completely in memory (IE no file to deal with). So I figured "Hey, Graphics cards are good at the sort of stuff, why not use them?" The other benefit to this is that it would make the cross-platformness of the algorithm much easier to handle.

    So here is what I would like my pipeline to look like. Get image data and put it in some OpenGL readable texture, Tell OpenGL to transform the texture, retrieve the transformed data from opengl and place it into some new image container (IE an HBITMAP or XImage).

    So can you do something like that? or do I just have to rely on the cpu to process this stuff?

  2. #2
    Crazy Fool Perspective's Avatar
    Join Date
    Jan 2003
    OpenGL is really a rendering API. You could use it for this but it seems like the wrong tool for the job. If you're running on linux or mac you could use the Image Magic tools (look specifically at mogrify).

  3. #3
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    I agree with Perspective that this does not sound like the sort of application that would benefit from OGL. I will add that D3D also will not help much. Perhaps a pixel shader or two could do some of what you want but I don't feel those are the right tool for this job.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Linking OpenGL in Dev-C++
    By linkofazeroth in forum Game Programming
    Replies: 4
    Last Post: 09-13-2005, 10:17 AM
  2. opengl images
    By jaylc185 in forum C++ Programming
    Replies: 1
    Last Post: 05-21-2005, 06:51 PM
  3. OpenGL Window
    By Morgul in forum Game Programming
    Replies: 1
    Last Post: 05-15-2005, 12:34 PM
  4. OpenGL .dll vs video card dll
    By Silvercord in forum Game Programming
    Replies: 14
    Last Post: 02-12-2003, 07:57 PM
  5. opengl code not working
    By Unregistered in forum Windows Programming
    Replies: 4
    Last Post: 02-14-2002, 10:01 PM