mirror of
				https://github.com/raysan5/raylib.git
				synced 2025-11-04 01:34:19 +00:00 
			
		
		
		
	Corrected game to run on OpenGL 1.1
This commit is contained in:
		@@ -421,12 +421,14 @@ void DrawGameplayScreen(void)
 | 
				
			|||||||
    DrawTextEx(font, FormatText("%02i%%", (int)((float)warpCounter/395.0f*100.0f)), (Vector2){754 + 390, 600}, font.baseSize, -2, SKYBLUE);
 | 
					    DrawTextEx(font, FormatText("%02i%%", (int)((float)warpCounter/395.0f*100.0f)), (Vector2){754 + 390, 600}, font.baseSize, -2, SKYBLUE);
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    // Draw wave
 | 
					    // Draw wave
 | 
				
			||||||
    // NOTE: Old drawing method, replaced by rendertarget      
 | 
					    if (waveTarget.texture.id <= 0)     // Render target could not be loaded (OpenGL 1.1)
 | 
				
			||||||
    //DrawSamplesMap(samples, totalSamples, currentSample, waveRec, MAROON);
 | 
					    {
 | 
				
			||||||
    //DrawRectangle(waveRec.x + (int)currentSample*1240/totalSamples, waveRec.y, 2, 99, DARKGRAY);
 | 
					        // Draw wave directly on screen
 | 
				
			||||||
    //DrawRectangleLines(20, 20, 1240, 140, DARKGRAY);
 | 
					        DrawSamplesMap(samples, totalSamples, currentSample, waveRec, MAROON);
 | 
				
			||||||
    //DrawRectangle(20, 150, (float)currentSample/totalSamples*1240, 10, GRAY);
 | 
					        DrawRectangle(waveRec.x + (int)currentSample*1215/totalSamples, waveRec.y, 2, 99, DARKGRAY);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    else
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
        // Draw wave using render target
 | 
					        // Draw wave using render target
 | 
				
			||||||
        ClearBackground(BLANK);
 | 
					        ClearBackground(BLANK);
 | 
				
			||||||
        BeginTextureMode(waveTarget);
 | 
					        BeginTextureMode(waveTarget);
 | 
				
			||||||
@@ -434,8 +436,10 @@ void DrawGameplayScreen(void)
 | 
				
			|||||||
        EndTextureMode();
 | 
					        EndTextureMode();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        // TODO: Apply antialiasing shader
 | 
					        // TODO: Apply antialiasing shader
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
        DrawTextureEx(waveTarget.texture, (Vector2){ waveRec.x, waveRec.y }, 0.0f, 1.0f, WHITE);
 | 
					        DrawTextureEx(waveTarget.texture, (Vector2){ waveRec.x, waveRec.y }, 0.0f, 1.0f, WHITE);
 | 
				
			||||||
        DrawRectangle(waveRec.x + (int)currentSample*1215/totalSamples, waveRec.y, 2, 99, DARKGRAY);
 | 
					        DrawRectangle(waveRec.x + (int)currentSample*1215/totalSamples, waveRec.y, 2, 99, DARKGRAY);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// Gameplay Screen Unload logic
 | 
					// Gameplay Screen Unload logic
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user