[fpc-pascal] GLPT v0.1.1 released
Ryan Joseph
ryan at thealchemistguild.com
Fri Oct 12 03:35:12 CEST 2018
> On Oct 11, 2018, at 11:39 PM, Anthony Walter <sysrpl at gmail.com> wrote:
>
> Ryan,
>
> 1&2:
>
> Typically what happens is the programmer can enumerate the supported exclusive (full screen and dedicated to a graphics context) resolution modes. The available resolution modes is dependent on their monitor, video driver, and operating system. Each mode defines a width and height in pixels, the color depth, and refresh rate. When the programmer creates a window they need some way to find, or enumerate, these modes, and they also need a way to switch the window and context to fit one of these modes. These are all things that should be supported by the underlying graphics toolkit. That is, the toolkit should allow the programmer to find out what modes exists on the end users computer, and pick one of those modes possibly before creating the window and context.
Got it. Yeah there should be a method to return resolutions for the device. I’m just helping him with the Mac stuff but it’s his project so not sure if this on the list (the API is meant to be small as I understand it). SDL has a pretty comprehensive list of device functions so that leads me to believe its important.
>
> 3:
>
I’m not sure if he wants this to be part of the API. I use SDL and I’ve just used Load_GL_VERSION_XXX calls that the FPC RTL provides which works.
Just looked and I see SDL has some functions that you describe. I think the FPC RTL is cross platform also though so this may not be needed for us.
function SDL_GL_LoadLibrary(path: SDL_Char): LongInt; cdecl; external;
function SDL_GL_GetProcAddress(proc: SDL_Char): Pointer; cdecl; external;
procedure SDL_GL_UnloadLibrary; cdecl; external;
>
> 4:
>
> In your source code for Windows you are using GetTickCount to return the time. See this stack overflow answer to see why that's a bad thing.
>
> https://stackoverflow.com/questions/24009263/why-queryperformancecounter-and-gettickcount-does-not-keep-in-pace
Yeah TickCount is probably too low-res. NSDate is millisecond precision I think.
Regards,
Ryan Joseph
More information about the fpc-pascal
mailing list