- function Int_GetExtensionString: AnsiString;
- var extensionCount : Integer;
- I : Integer;
- begin
- // general extension string
- if GL_VERSION_3_0
- then
- begin
- if not Assigned(@glGetIntegerv) then glGetIntegerv := dglGetProcAddress('glGetIntegerv');
- if not Assigned(@glGetStringi) then glGetStringi := dglGetProcAddress('glGetStringi');
- if Assigned(@glGetIntegerv) and Assigned(@glGetStringi)
- then
- begin
- glGetIntegerv(GL_NUM_EXTENSIONS, @extensionCount);
- for I := 0 to extensionCount - 1 do
- result := result + #32 + PAnsiChar(glGetStringi(GL_EXTENSIONS, I)) + #32;
- end
- else result := '';
- end
- else
- begin
- if not Assigned(@glGetString) then glGetString := dglGetProcAddress('glGetString');
- if Assigned(@glGetString)
- then Result := glGetString(GL_EXTENSIONS)
- else Result := '';
- end;
- ...