Alex Szpakowski avatar Alex Szpakowski committed 80195a8

Disabled opengl debug output until it can be improved & made optional

Comments (0)

Files changed (2)

src/modules/graphics/opengl/Font.cpp

 	, mSpacing(1)
 	, filter(filter)
 {
-	// try to find the best texture size match for the font size
-	// default to the largest texture size if no rough match is found
+	// Try to find the best texture size match for the font size. default to the
+	// largest texture size if no rough match is found.
 	textureSizeIndex = NUM_TEXTURE_SIZES - 1;
 	for (int i = 0; i < NUM_TEXTURE_SIZES; i++)
 	{
-		// base our chosen texture width/height on a very rough guess of the total size taken up by the font's used glyphs
-		// the estimate is likely larger than the actual total size taken up, which is good since texture changes are expensive
+		// Make a rough estimate of the total used texture size, based on glyph
+		// height. THe estimated size is likely larger than the actual total
+		// size, which is good because texture changes are expensive.
 		if ((height * 0.8) * height * 95 <= TEXTURE_WIDTHS[i] * TEXTURE_HEIGHTS[i])
 		{
 			textureSizeIndex = i;
 		glPopMatrix();
 		throw love::Exception("%s", e.what());
 	}
-	
+
 	if (quadindex > 0 && glyphinfolist.size() > 0)
 	{
-		// sort glyph draw info list by texture first, and quad position in memory second (using the struct's < operator)
+		// Sort glyph draw info list by texture first, and quad position in
+		// memory second (using the struct's < operator).
 		std::sort(glyphinfolist.begin(), glyphinfolist.end());
 
 		glEnableClientState(GL_VERTEX_ARRAY);
 		glVertexPointer(2, GL_FLOAT, sizeof(vertex), (GLvoid *)&glyphquads[0].vertices[0].x);
 		glTexCoordPointer(2, GL_FLOAT, sizeof(vertex), (GLvoid *)&glyphquads[0].vertices[0].s);
 
-		// we need to draw a new vertex array for every section of the string that uses a different texture than the previous section
+		// We need to draw a new vertex array for every section of the string
+		// which uses a different texture than the previous section.
 		std::vector<GlyphArrayDrawInfo>::const_iterator it;
 		for (it = glyphinfolist.begin(); it != glyphinfolist.end(); ++it)
 		{

src/modules/graphics/opengl/Graphics.cpp

 	glGetIntegerv(GL_MAX_MODELVIEW_STACK_DEPTH, &matrixLimit);
 	matrixLimit -= 5;
 
-	if (GLEE_ARB_debug_output)
+	// Debug output is temporarily disabled until we either improve it and make
+	// it optional or remove it.
+	if (GLEE_KHR_debug && false)
 	{
 		std::cerr << "debug on" << std::endl;
-		glDebugMessageCallbackARB(myErrorCallback, NULL);
+		glDebugMessageCallback(myErrorCallback, NULL);
 		glEnable(GL_DEBUG_OUTPUT);
 	}
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.