mirror of
				https://gitlab.com/freepascal.org/lazarus/lazarus.git
				synced 2025-11-04 15:49:32 +01:00 
			
		
		
		
	examples: openglcontrol: using GL_CLAMP_TO_EDGE instead of GL_CLAMP - it is not longer the same on newer cards
git-svn-id: trunk@14686 -
This commit is contained in:
		
							parent
							
								
									824ad7af42
								
							
						
					
					
						commit
						a6e55fad6f
					
				@ -31,6 +31,9 @@ uses
 | 
			
		||||
  Classes, SysUtils, Forms, LResources, Buttons,
 | 
			
		||||
  StdCtrls, Dialogs, GL, OpenGLContext;
 | 
			
		||||
 | 
			
		||||
const
 | 
			
		||||
 GL_CLAMP_TO_EDGE = $812F;
 | 
			
		||||
 | 
			
		||||
type
 | 
			
		||||
  TglTexture = class
 | 
			
		||||
  public
 | 
			
		||||
@ -602,8 +605,8 @@ begin
 | 
			
		||||
  glGenTextures(3, @textures[0]);
 | 
			
		||||
  for i:=0 to 2 do begin
 | 
			
		||||
    glBindTexture(GL_TEXTURE_2D, Textures[i]);
 | 
			
		||||
    glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_WRAP_S,GL_CLAMP);
 | 
			
		||||
    glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_WRAP_T,GL_CLAMP);
 | 
			
		||||
    glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_WRAP_S,GL_CLAMP_TO_EDGE);
 | 
			
		||||
    glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_WRAP_T,GL_CLAMP_TO_EDGE);
 | 
			
		||||
    glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR);
 | 
			
		||||
    glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR);
 | 
			
		||||
    glTexImage2D(GL_TEXTURE_2D,0,3,MyglTextures[i].Width,MyglTextures[i].Height,0
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user