Results 1 to 2 of 2

Thread: Cheb's project will be here.

  1. #1

    Cheb's project will be here.

    Tired of waiting, I just created this thread beforehand.

    My game engine will be here as soon as I finish with the last, delayed, rehaul.

    Done:
    - hacks for fpc 2.6.4 to support unicode paths and file names (the mother module works from a folder named "/人◕‿‿◕人\" regardless of the compiler used)
    - hacks for fpc 3.x to work with paths in Windows in utf-8

    ToDo:
    - rehaul my font rendering
    - rehaul my GUI library finally CRUSHING the remaining glBegin() ickies so that my module DLL could run on GLES too.
    - finish creating the virtual resolution layer
    - finish the support for hardware surface on RPi 2/3 with hardware scaling (mostly done but requires virtual resolution layer for finishing touches) (needed because RPi glitches if you try creating frame buffer sized for FullHD)
    - finally start coding physics and terrain render, dammit!


  2. #2
    Yet another !surprise! from this newfangled string encoding auto-management.

    I launched my engine compiled in fpc 3.0.4 on the mammoth coprolite I call my file server:
    Code:
    Chentrah version 0.21.3847 for Win32-i386, 
      compiled at 12:21:52 on 2018/01/28 using Free Pascal 3.0.4.
      (developer mode on)
    Operating System: Wine 1.3.28 / Ubuntu 11.10
    User name: cheb
    CPU Phenom II X2 550
      x2 logical cores
      level 2 cache: 512 Kbytes, line size 64 bytes
      TSC invariancy: yes
      TSC frequency: 3.11 GHz)
    Lo and behold it crashed with "Failed to load "GL_ARB_framebuffer_object"".
    Scratching the bone between my ears, I checked the extension string. Nope, the extension was there. So why?

    Unearthed an old function naively assuming that String = AnsiString:
    Code:
    function glext_ExtensionSupported(const extension: String; const searchIn: String): Boolean;
    var
      extensions: PAnsiChar;
      start: PAnsiChar;
      where, terminator: PAnsiChar;
    begin
    
      if (Pos(' ', extension) <> 0) or (extension = '') then
      begin
        Result := FALSE;
        Exit;
      end;
    
      if searchIn = '' then extensions := PAnsiChar(glGetString(GL_EXTENSIONS))
      else extensions := PAnsiChar(searchIn);
      start := extensions;
      while TRUE do
      begin
        where := StrPos(start, PAnsiChar(extension));
        if where = nil then Break;
        terminator := Pointer(PtrUInt(where) + Length(extension));
        if (where = start) or (PAnsiChar(PtrUInt(where) - 1)^ = ' ') then
        begin
          if (terminator^ = ' ') or (terminator^ = #0) then
          begin
            Result := TRUE;
            Exit;
          end;
        end;
        start := terminator;
      end;
      Result := FALSE;
    
    end;
    Corrected it to AnsiString and my engine started up, proving there is life on GeForce 7025.

    But!
    The wrong version was working fine in real Windows.
    I can only assume that that fossilized wine did not have some mechanism the auto-recoding of the FPC RTL relies on.
    That's another thing to watch out for, I suppose.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Comodo SSL