I haven't tried your package yet since I really don't want to boot into Windows, but I looked at your source code in the git repository.
Off the top of my head here are just a few questions or suggestions you need to implement to make it useful: 1) I don't see any code to enumerate the supported screen resolutions 2) I don't see any code to toggle a window exclusive mode 3) I don't see any code to abstract loading OpenGL or extensions 3a) You should provide a function to return either the OpenGL library name based on the Context requested, or a handle to the library so that GetProcAddress can be called 3b) You should provide a platform independent function to load extensions by name 4) Your get time function is incredibly inaccurate. You should be using QueryPerformanceCounter on Windows and clock_gettime on Linux and Mac. function GetTime should look something like this: var BaseTime: Double = 0; {$ifdef windows} function GetTime: Double; var Resolution, Counter: Int64; begin QueryPerformanceFrequency(Value); Resolution := Resolution div 1000; QueryPerformanceCounter(Counter); Result := Counter / Resolution / 1000; if BaseTime = 0 then BaseTime := Result; Result := Result - BaseTime; end; {$else} function GetTime: Double; const CLOCK_MONOTONIC = 1; Nanosecond = 1 / 1000000000; var T: TTimeSpec; begin clock_gettime(CLOCK_MONOTONIC, @T); Result := T.tv_sec + T.tv_nsec * Nanosecond; if BaseTime = 0 then BaseTime := Result; Result := Result - BaseTime; end; {$endif}
_______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal