Last visit was: It is currently Thu Mar 28, 2024 5:19 am


All times are UTC-05:00




Post new topic Reply to topic  [5 posts ] 
    Author Message
     Post subject:Color-masking... shading a surface... whatever you call it.
    PostPosted:Sat Jun 21, 2008 2:28 am 
    User avatar
     

    Joined:Sun Feb 12, 2006 8:56 pm
    Posts:1019
    Website:http://eddieringle.com
    Location:Detroit, MI
    Okay, I'm sure most of you know that Introversion use one image for the darwinian and shade it to green, red, blue, etc.

    I've been able to do this in DirectX, but cannot figure out how to do it in SDL.

    Following lazyfoo's SDL tutorials, I've created an app where you can move this DG around:
    Attachment:
    movethedarwinian.png
    movethedarwinian.png [12.02KiB |Viewed 7127 times ]
    Any suggestions?

    _________________
    -- Eddie Ringle

    Check out Elysian Shadows and consider backing us on Kickstarter!

    ====================================

    Image


    Top
    Offline  
     Post subject:Re: Color-masking... shading a surface... whatever you call it.
    PostPosted:Sun Jun 22, 2008 7:34 am 
    Connoisseur of the Godawful
    User avatar
     

    Joined:Tue Mar 01, 2005 9:00 am
    Posts:456
    ICQ:286315965
    Website:http://rabidtinker.mine.nu/
    Yahoo Messenger:alistair_lynn
    AOL:Agent_Vast@mac.com
    Location:127.0.0.1
    SDL + OpenGL or pure SDL?

    _________________
    Alastair Lynn / Alumnus / Onlink Team


    Top
    Offline  
     Post subject:Re: Color-masking... shading a surface... whatever you call it.
    PostPosted:Sun Jun 22, 2008 8:19 am 
    User avatar
     

    Joined:Sun Feb 12, 2006 8:56 pm
    Posts:1019
    Website:http://eddieringle.com
    Location:Detroit, MI
    Both if you can, because I'll eventually need both.

    But I'm learning pure SDL right now.

    _________________
    -- Eddie Ringle

    Check out Elysian Shadows and consider backing us on Kickstarter!

    ====================================

    Image


    Top
    Offline  
     Post subject:Re: Color-masking... shading a surface... whatever you call it.
    PostPosted:Sun Jun 22, 2008 10:18 am 
    Connoisseur of the Godawful
    User avatar
     

    Joined:Tue Mar 01, 2005 9:00 am
    Posts:456
    ICQ:286315965
    Website:http://rabidtinker.mine.nu/
    Yahoo Messenger:alistair_lynn
    AOL:Agent_Vast@mac.com
    Location:127.0.0.1
    Don't do pure SDL graphics, move to OpenGL. Once in OpenGL, set the texture environment to GL_MODULATE (or just leave it if you haven't changed this, since GL_MODULATE is the default) and call glColor* before you draw your image.

    _________________
    Alastair Lynn / Alumnus / Onlink Team


    Top
    Offline  
     Post subject:Re: Color-masking... shading a surface... whatever you call it.
    PostPosted:Mon Jun 23, 2008 7:01 pm 
    User avatar
     

    Joined:Sun Feb 12, 2006 8:56 pm
    Posts:1019
    Website:http://eddieringle.com
    Location:Detroit, MI
    In that case, I need to learn how to do 2D stuff in OpenGL...

    EDIT: Better, found this: http://www.gamedev.net/community/forums ... _id=104791

    Apparently that was suppose to solve my 2D problems, but unfortunately I do not see anything related to images.

    _________________
    -- Eddie Ringle

    Check out Elysian Shadows and consider backing us on Kickstarter!

    ====================================

    Image


    Top
    Offline  
    Display posts from previous: Sort by 
    Post new topic Reply to topic

      All times are UTC-05:00


      Who is online

      Users browsing this forum: No registered users and 11 guests


      You cannot post new topics in this forum
      You cannot reply to topics in this forum
      You cannot edit your posts in this forum
      You cannot delete your posts in this forum
      You cannot post attachments in this forum

      Search for:
      Jump to:  
      cron
      Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
      Theme created by Miah with assistance from hyprnova