diff --git a/simgear/screen/texture.cxx b/simgear/screen/texture.cxx index 91550edb..f306bc76 100644 --- a/simgear/screen/texture.cxx +++ b/simgear/screen/texture.cxx @@ -795,7 +795,7 @@ SGTexture::ConvertUint(unsigned *array, unsigned int length) { void -SGTexture::make_monochrome(GLubyte r, GLubyte g, GLubyte b) { +SGTexture::make_monochrome(float contrast, GLubyte r, GLubyte g, GLubyte b) { if (num_colors >= 3) return; @@ -815,8 +815,32 @@ SGTexture::make_monochrome(GLubyte r, GLubyte g, GLubyte b) { } } + void -SGTexture::make_normalmap(float brightness) { +SGTexture::make_grayscale(float contrast) { + if (num_colors >= 3) + return; + + GLubyte *map = (GLubyte *)malloc (texture_width * texture_height); + for (int y=0; y