SDL 1.3 Colour Overlay

Hi guys,

In OpenGL I used to be able to set glColour and it would modulate any
textures I drew to the screen. For a monochrome texture (regardless of
texture format) it essentially meant I could change the colour of the image
on the fly.

Is a feature like this supported in SDL 1.3?

It’s a really helpful feature for things like bit-mapped fonts etc

Many thanks–
View this message in context: http://www.nabble.com/SDL-1.3-Colour-Overlay-tp25322946p25322946.html
Sent from the SDL mailing list archive at Nabble.com.

Yep, see SDL_SetTextureColorMod()On Sun, Sep 6, 2009 at 3:52 PM, GMScribe <ali_lowe at sky.com> wrote:

Hi guys,

In OpenGL I used to be able to set glColour and it would modulate any
textures I drew to the screen. For a monochrome texture (regardless of
texture format) it essentially meant I could change the colour of the image
on the fly.

Is a feature like this supported in SDL 1.3?

It’s a really helpful feature for things like bit-mapped fonts etc

Many thanks

View this message in context:
http://www.nabble.com/SDL-1.3-Colour-Overlay-tp25322946p25322946.html
Sent from the SDL mailing list archive at Nabble.com.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


-Sam Lantinga, Founder and President, Galaxy Gameworks LLC

=( Sadly it seems that Colour Mod isn’t supported by the SDL GDI
implementation.

Sam Lantinga-4 wrote:>

Yep, see SDL_SetTextureColorMod()

On Sun, Sep 6, 2009 at 3:52 PM, GMScribe <@GMScribe> wrote:

Hi guys,

In OpenGL I used to be able to set glColour and it would modulate any
textures I drew to the screen. For a monochrome texture (regardless of
texture format) it essentially meant I could change the colour of the
image
on the fly.

Is a feature like this supported in SDL 1.3?

It’s a really helpful feature for things like bit-mapped fonts etc

Many thanks

View this message in context:
http://www.nabble.com/SDL-1.3-Colour-Overlay-tp25322946p25322946.html
Sent from the SDL mailing list archive at Nabble.com.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


-Sam Lantinga, Founder and President, Galaxy Gameworks LLC


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


View this message in context: http://www.nabble.com/SDL-1.3-Colour-Overlay-tp25322946p25329819.html
Sent from the SDL mailing list archive at Nabble.com.

Well, you can always use the software renderer and if you really want
GDI underneath, you can choose that as the backend renderer.On Mon, Sep 7, 2009 at 5:34 AM, GMScribe<ali_lowe at sky.com> wrote:

=( Sadly it seems that Colour Mod isn’t supported by the SDL GDI
implementation.

Sam Lantinga-4 wrote:

Yep, see SDL_SetTextureColorMod()

On Sun, Sep 6, 2009 at 3:52 PM, GMScribe <ali_lowe at sky.com> wrote:

Hi guys,

In OpenGL I used to be able to set glColour and it would modulate any
textures I drew to the screen. For a monochrome texture (regardless of
texture format) it essentially meant I could change the colour of the
image
on the fly.

Is a feature like this supported in SDL 1.3?

It’s a really helpful feature for things like bit-mapped fonts etc

Many thanks

View this message in context:
http://www.nabble.com/SDL-1.3-Colour-Overlay-tp25322946p25322946.html
Sent from the SDL mailing list archive at Nabble.com.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


-Sam Lantinga, Founder and President, Galaxy Gameworks LLC


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


View this message in context: http://www.nabble.com/SDL-1.3-Colour-Overlay-tp25322946p25329819.html
Sent from the SDL mailing list archive at Nabble.com.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


-Sam Lantinga, Founder and President, Galaxy Gameworks LLC

Hi Sam,

I’m afraid that the software render doesn’t work for me, in fact only the
GDI and OGL renderers seem to handle the most basic tasks (d3d will draw a
background but no textures, software renderer is black screen). The OGL
renderer is also successfully handling blending with my code. The two video
drivers im offered are Win32 and Dummy, of course I’m using Win32.

For now I guess I’ll have to look at using a hidden OGL window and blitting
to a GDI one.

Many thanks.

Sam Lantinga-4 wrote:>

Well, you can always use the software renderer and if you really want
GDI underneath, you can choose that as the backend renderer.

On Mon, Sep 7, 2009 at 5:34 AM, GMScribe<@GMScribe> wrote:

=( Sadly it seems that Colour Mod isn’t supported by the SDL GDI
implementation.

Sam Lantinga-4 wrote:

Yep, see SDL_SetTextureColorMod()

On Sun, Sep 6, 2009 at 3:52 PM, GMScribe <@GMScribe> wrote:

Hi guys,

In OpenGL I used to be able to set glColour and it would modulate any
textures I drew to the screen. For a monochrome texture (regardless of
texture format) it essentially meant I could change the colour of the
image
on the fly.

Is a feature like this supported in SDL 1.3?

It’s a really helpful feature for things like bit-mapped fonts etc

Many thanks

View this message in context:
http://www.nabble.com/SDL-1.3-Colour-Overlay-tp25322946p25322946.html
Sent from the SDL mailing list archive at Nabble.com.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


-Sam Lantinga, Founder and President, Galaxy Gameworks LLC


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


View this message in context:
http://www.nabble.com/SDL-1.3-Colour-Overlay-tp25322946p25329819.html
Sent from the SDL mailing list archive at Nabble.com.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


-Sam Lantinga, Founder and President, Galaxy Gameworks LLC


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


View this message in context: http://www.nabble.com/SDL-1.3-Colour-Overlay-tp25322946p25406466.html
Sent from the SDL mailing list archive at Nabble.com.

OK… I see the function to read pixels from the renderer was never actually
implemented. Is there a special way to setup the software renderer? How do I
ask it to use GDI or an SDL_Surface as a backend?

Many thanks.

GMScribe wrote:>

Hi Sam,

I’m afraid that the software render doesn’t work for me, in fact only the
GDI and OGL renderers seem to handle the most basic tasks (d3d will draw a
background but no textures, software renderer is black screen). The OGL
renderer is also successfully handling blending with my code. The two
video drivers im offered are Win32 and Dummy, of course I’m using Win32.

For now I guess I’ll have to look at using a hidden OGL window and
blitting to a GDI one.

Many thanks.

Sam Lantinga-4 wrote:

Well, you can always use the software renderer and if you really want
GDI underneath, you can choose that as the backend renderer.

On Mon, Sep 7, 2009 at 5:34 AM, GMScribe<@GMScribe> wrote:

=( Sadly it seems that Colour Mod isn’t supported by the SDL GDI
implementation.

Sam Lantinga-4 wrote:

Yep, see SDL_SetTextureColorMod()

On Sun, Sep 6, 2009 at 3:52 PM, GMScribe <@GMScribe> wrote:

Hi guys,

In OpenGL I used to be able to set glColour and it would modulate any
textures I drew to the screen. For a monochrome texture (regardless of
texture format) it essentially meant I could change the colour of the
image
on the fly.

Is a feature like this supported in SDL 1.3?

It’s a really helpful feature for things like bit-mapped fonts etc

Many thanks

View this message in context:
http://www.nabble.com/SDL-1.3-Colour-Overlay-tp25322946p25322946.html
Sent from the SDL mailing list archive at Nabble.com.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


-Sam Lantinga, Founder and President, Galaxy Gameworks LLC


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


View this message in context:
http://www.nabble.com/SDL-1.3-Colour-Overlay-tp25322946p25329819.html
Sent from the SDL mailing list archive at Nabble.com.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


-Sam Lantinga, Founder and President, Galaxy Gameworks LLC


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


View this message in context: http://www.nabble.com/SDL-1.3-Colour-Overlay-tp25322946p25406986.html
Sent from the SDL mailing list archive at Nabble.com.