瀏覽代碼

morphunits/tinygl: add a variation of GLAInitializeContext() function that supports our FPC-style taglist syntax better

Karoly Balogh 3 天之前
父節點
當前提交
b964a5f5ee
共有 1 個文件被更改,包括 9 次插入0 次删除
  1. 9 0
      packages/morphunits/src/tinygl.pas

+ 9 - 0
packages/morphunits/src/tinygl.pas

@@ -122,6 +122,10 @@ syscall sysvbase TinyGLBase 4498;
 function TGLGetContextVersion(GLContext: PGLContext): DWord;
 syscall sysvbase TinyGLBase 4504;
 
+{ Free Pascal specific function that allows an inline taglist }
+function GLAInitializeContextTags(context: PGLContext; const tags: array of longword): longbool;
+
+
 function InitTinyGLLibrary : boolean;
 
 implementation
@@ -131,6 +135,11 @@ const
   VERSION : string[2] = '50';
   LIBVERSION : longword = 50;
 
+function GLAInitializeContextTags(context: PGLContext; const tags: array of longword): longbool;
+begin
+  GLAInitializeContextTags:=GLAInitializeContext(context, @tags) > 0;
+end;
+
 function InitTinyGLLibrary : boolean;
 begin
   InitTinyGLLibrary := Assigned(tglContext) and Assigned(TinyGLBase);