From a6e55fad6f5ee2377f4d31e64ef6b5aaa855ac5d Mon Sep 17 00:00:00 2001 From: mattias Date: Sun, 30 Mar 2008 01:28:53 +0000 Subject: [PATCH] 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 - --- examples/openglcontrol/exampleform.pp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/examples/openglcontrol/exampleform.pp b/examples/openglcontrol/exampleform.pp index b87d0c6f71..3013b02834 100644 --- a/examples/openglcontrol/exampleform.pp +++ b/examples/openglcontrol/exampleform.pp @@ -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