project_files/Android-build/gles11.pp
branchhedgeroid
changeset 5344 893e49c53c41
parent 5301 690e88ef6ee7
child 5621 ea796c83ea47
equal deleted inserted replaced
5341:479b4108789a 5344:893e49c53c41
   775      GL_OES_point_sprite = 1;     
   775      GL_OES_point_sprite = 1;     
   776 
   776 
   777 implementation
   777 implementation
   778 
   778 
   779   uses
   779   uses
   780     SysUtils, dynlibs, uConsole;
   780     SysUtils, dynlibs;
   781 
   781 
   782   var
   782   var
   783     hlib : tlibhandle;
   783     hlib : tlibhandle;
   784 
   784 
   785 
   785 
   935 
   935 
   936 
   936 
   937   procedure Loadgles11(lib : pchar);
   937   procedure Loadgles11(lib : pchar);
   938     begin
   938     begin
   939       Freegles11;
   939       Freegles11;
   940       WriteToConsole('loading lib');
       
   941       hlib:=LoadLibrary(lib);
   940       hlib:=LoadLibrary(lib);
   942       if hlib=0 then
   941       if hlib=0 then
   943 	begin
   942 	begin
   944          WriteToConsole('crash');
       
   945          raise Exception.Create(format('Could not load library: %s',[lib]));
   943          raise Exception.Create(format('Could not load library: %s',[lib]));
   946 	end;
   944 	end;
   947       WriteToConsole('succeeded');
       
   948       pointer(glAlphaFunc):=GetProcAddress(hlib,'glAlphaFunc');
   945       pointer(glAlphaFunc):=GetProcAddress(hlib,'glAlphaFunc');
   949       pointer(glClearColor):=GetProcAddress(hlib,'glClearColor');
   946       pointer(glClearColor):=GetProcAddress(hlib,'glClearColor');
   950       pointer(glClearDepthf):=GetProcAddress(hlib,'glClearDepthf');
   947       pointer(glClearDepthf):=GetProcAddress(hlib,'glClearDepthf');
   951       pointer(glClipPlanef):=GetProcAddress(hlib,'glClipPlanef');
   948       pointer(glClipPlanef):=GetProcAddress(hlib,'glClipPlanef');
   952       pointer(glColor4f):=GetProcAddress(hlib,'glColor4f');
   949       pointer(glColor4f):=GetProcAddress(hlib,'glColor4f');
  1092       pointer(glPointSizePointerOES):=GetProcAddress(hlib,'glPointSizePointerOES');
  1089       pointer(glPointSizePointerOES):=GetProcAddress(hlib,'glPointSizePointerOES');
  1093     end;
  1090     end;
  1094 
  1091 
  1095 procedure init;
  1092 procedure init;
  1096 begin
  1093 begin
  1097   WriteToConsole('init');
       
  1098     Loadgles11('libGLESv1_CM.so');
  1094     Loadgles11('libGLESv1_CM.so');
  1099 end;
  1095 end;
  1100 
  1096 
  1101 
  1097 
  1102 initialization
  1098 initialization