summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlmindor <Almindor@3ad0048d-3df7-0310-abae-a5850022a9f2>2008-08-01 18:27:03 +0000
committerAlmindor <Almindor@3ad0048d-3df7-0310-abae-a5850022a9f2>2008-08-01 18:27:03 +0000
commit654f85dc809a39384152eab664a68abd901bca74 (patch)
tree29d9949e84e054aaf37509dd86098602b4537286
parentb033ada7dc4f4ea28c3c737fac3b1f55ab056e3c (diff)
downloadfpc-654f85dc809a39384152eab664a68abd901bca74.tar.gz
* don't load GL_ARB_IMAGING extension functions in Load_GL_Version_1_2() They don't exist on most cards
git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@11499 3ad0048d-3df7-0310-abae-a5850022a9f2
-rw-r--r--packages/opengl/src/glext.pp43
1 files changed, 20 insertions, 23 deletions
diff --git a/packages/opengl/src/glext.pp b/packages/opengl/src/glext.pp
index d8cee3be4c..11bf4d82b2 100644
--- a/packages/opengl/src/glext.pp
+++ b/packages/opengl/src/glext.pp
@@ -4285,12 +4285,9 @@ begin
end;
function Load_GL_version_1_2: Boolean;
-var
- extstring: String;
begin
Result := FALSE;
- extstring := String(PChar(glGetString(GL_EXTENSIONS)));
glBlendColor := wglGetProcAddress('glBlendColor');
if not Assigned(glBlendColor) then Exit;
@@ -4298,6 +4295,26 @@ begin
if not Assigned(glBlendEquation) then Exit;
glDrawRangeElements := wglGetProcAddress('glDrawRangeElements');
if not Assigned(glDrawRangeElements) then Exit;
+ glTexImage3D := wglGetProcAddress('glTexImage3D');
+ if not Assigned(glTexImage3D) then Exit;
+ glTexSubImage3D := wglGetProcAddress('glTexSubImage3D');
+ if not Assigned(glTexSubImage3D) then Exit;
+ glCopyTexSubImage3D := wglGetProcAddress('glCopyTexSubImage3D');
+ if not Assigned(glCopyTexSubImage3D) then Exit;
+ Result := TRUE;
+
+end;
+
+function Load_GL_ARB_imaging: Boolean;
+var
+ extstring: String;
+begin
+
+ Result := FALSE;
+ extstring := String(PChar(glGetString(GL_EXTENSIONS)));
+
+ if glext_ExtensionSupported('GL_ARB_imaging', extstring) then
+ begin
glColorTable := wglGetProcAddress('glColorTable');
if not Assigned(glColorTable) then Exit;
glColorTableParameterfv := wglGetProcAddress('glColorTableParameterfv');
@@ -4362,26 +4379,6 @@ begin
if not Assigned(glResetHistogram) then Exit;
glResetMinmax := wglGetProcAddress('glResetMinmax');
if not Assigned(glResetMinmax) then Exit;
- glTexImage3D := wglGetProcAddress('glTexImage3D');
- if not Assigned(glTexImage3D) then Exit;
- glTexSubImage3D := wglGetProcAddress('glTexSubImage3D');
- if not Assigned(glTexSubImage3D) then Exit;
- glCopyTexSubImage3D := wglGetProcAddress('glCopyTexSubImage3D');
- if not Assigned(glCopyTexSubImage3D) then Exit;
- Result := TRUE;
-
-end;
-
-function Load_GL_ARB_imaging: Boolean;
-var
- extstring: String;
-begin
-
- Result := FALSE;
- extstring := String(PChar(glGetString(GL_EXTENSIONS)));
-
- if glext_ExtensionSupported('GL_ARB_imaging', extstring) then
- begin
Result := TRUE;
end;