| Ferrous Moon http://www.ferrousmoon.com:80/forums/ |
|
| Color-masking... shading a surface... whatever you call it. http://www.ferrousmoon.com:80/forums/viewtopic.php?f=45&t=1412 |
Page 1 of 1 |
| Author: | eddieringle [Sat Jun 21, 2008 2:28 am ] |
| Post subject: | Color-masking... shading a surface... whatever you call it. |
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 [12.02KiB |Viewed 6711 times ] |
|
| Author: | prophile [Sun Jun 22, 2008 7:34 am ] |
| Post subject: | Re: Color-masking... shading a surface... whatever you call it. |
SDL + OpenGL or pure SDL? |
|
| Author: | eddieringle [Sun Jun 22, 2008 8:19 am ] |
| Post subject: | Re: Color-masking... shading a surface... whatever you call it. |
Both if you can, because I'll eventually need both. But I'm learning pure SDL right now. |
|
| Author: | prophile [Sun Jun 22, 2008 10:18 am ] |
| Post subject: | Re: Color-masking... shading a surface... whatever you call it. |
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. |
|
| Author: | eddieringle [Mon Jun 23, 2008 7:01 pm ] |
| Post subject: | Re: Color-masking... shading a surface... whatever you call it. |
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. |
|
| Page 1 of 1 | All times are UTC-05:00 |
| Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |
|