Commits

Bill Meltsner committed 66c2910

changed LUMINOSITY_ALPHA to LUMINANCE_ALPHA (more consistent with opengl's phrasing)

Comments (0)

Files changed (3)

src/modules/font/GlyphData.cpp

 	{
 		if (metrics.width && metrics.height) {
 			switch (f) {
-				case GlyphData::FORMAT_LUMINOSITY_ALPHA:
+				case GlyphData::FORMAT_LUMINANCE_ALPHA:
 					data = new unsigned char[metrics.width * metrics.height * 2];
 					break;
 				case GlyphData::FORMAT_RGBA:
 	int GlyphData::getSize() const
 	{
 		switch(format) {
-			case GlyphData::FORMAT_LUMINOSITY_ALPHA:
+			case GlyphData::FORMAT_LUMINANCE_ALPHA:
 				return getWidth() * getHeight() * 2;
 				break;
 			case GlyphData::FORMAT_RGBA:
 		int h = getHeight();
 		int pw = next_p2(w);
 		int ph = next_p2(h);
-		unsigned char * d = new unsigned char[pw * ph * (format == GlyphData::FORMAT_LUMINOSITY_ALPHA ? 2 : 4)];
+		unsigned char * d = new unsigned char[pw * ph * (format == GlyphData::FORMAT_LUMINANCE_ALPHA ? 2 : 4)];
 		for (int j = 0; j < ph; j++) {
 			for (int i = 0; i < pw; i++) {
 				int n = i+j*w;
 				int p = i+j*pw;
 				if (i < w && j < h) {
-					if (format == GlyphData::FORMAT_LUMINOSITY_ALPHA) {
+					if (format == GlyphData::FORMAT_LUMINANCE_ALPHA) {
 						p *= 2;
 						n *= 2;
 						d[p] = data[n];
 						d[p+3] = data[n+3];
 					}
 				} else {
-					if (format == GlyphData::FORMAT_LUMINOSITY_ALPHA) {
+					if (format == GlyphData::FORMAT_LUMINANCE_ALPHA) {
 						p *= 2;
 						d[p] = d[p+1] = 0;
 					} else {

src/modules/font/GlyphData.h

 	public:
 		enum Format
 		{
-			FORMAT_LUMINOSITY_ALPHA,
+			FORMAT_LUMINANCE_ALPHA,
 			FORMAT_RGBA
 		};
 		

src/modules/graphics/opengl/Glyph.cpp

 	bool Glyph::loadVolatile()
 	{
 		GLint format = GL_RGBA;
-		if (data->getFormat() == love::font::GlyphData::FORMAT_LUMINOSITY_ALPHA) format = GL_LUMINANCE_ALPHA;
+		if (data->getFormat() == love::font::GlyphData::FORMAT_LUMINANCE_ALPHA) format = GL_LUMINANCE_ALPHA;
 		
 		glGenTextures(1,&texture);
 		glBindTexture(GL_TEXTURE_2D, texture);