Re: [fpc-pascal] String error on Windows

2021-10-31 Thread Jonas Maebe via fpc-pascal

On 31/10/2021 05:35, Ryan Joseph via fpc-pascal wrote:

I thought they were behind a mode switch called "c operators" or something but 
either way I don't see why Windows would disable them.


The compiler itself does enable them by the default on any platform. 
However, the fpc.cfg file that gets installed with FPC on all platforms 
does enable them by default (it contains -Sgic). Compile with -vt and 
check where the compiler is getting its configuration file from.



Jonas
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] String error on Windows

2021-10-31 Thread Sven Barth via fpc-pascal
Jonas Maebe via fpc-pascal  schrieb am
So., 31. Okt. 2021, 08:54:

> On 31/10/2021 05:35, Ryan Joseph via fpc-pascal wrote:
> > I thought they were behind a mode switch called "c operators" or
> something but either way I don't see why Windows would disable them.
>
> The compiler itself does enable them by the default on any platform.


Jonas means "does NOT enable" here.


> However, the fpc.cfg file that gets installed with FPC on all platforms
> does enable them by default (it contains -Sgic). Compile with -vt and
> check where the compiler is getting its configuration file from.
>

Regards,
Sven

>
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] First Version Vector Toolkit in OpenGL

2021-10-31 Thread Anthony Walter via fpc-pascal
You might have read in my prior message to this group my announcement of a
vector graphics and physics library I've been writing for FPC.

In this first release, I am taking a stab at designing a new user interface
toolkit from scratch based on the vector graphics library rendered purely
in OpenGL. Below is a video of my first test of this toolkit and I thought
I'd share. Perhaps some of you may have some suggestions.

https://streamable.com/n42kll

Please bear in mind, this is meant to be a VERY minimal toolkit for the
purpose of configuring or inputting settings in either game like programs
or physics simulation programs. It includes a limited set of controls:
windows, panels, sliders, push buttons, glyph buttons, check boxes, text
entry, labels, image, and one custom paint control where you can draw
whatever you want.

That said, everything is fully themeable and you can write or switch to
different themes. The theme system manages the size of each control
element, their visual representation, and the fonts and colors. It operates
completely independent of the controls.

Layout is handled for you automatically by the container controls, window
or panel, where children can be tiled horizontally, or vertically and
placed near, center or far. Each control can have custom margins and
containers can have custom size borders (space between controls and their
four edges).

As mentioned before, this library will be released to a git repository soon
with a FOSS license. It will be able to run on Windows, Mac, Linux, and Pi
including the new Pi Zero 2 W.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] String error on Windows

2021-10-31 Thread Ryan Joseph via fpc-pascal


> On Oct 31, 2021, at 2:53 PM, Jonas Maebe via fpc-pascal 
>  wrote:
> 
> The compiler itself does enable them by the default on any platform. However, 
> the fpc.cfg file that gets installed with FPC on all platforms does enable 
> them by default (it contains -Sgic). Compile with -vt and check where the 
> compiler is getting its configuration file from.

Thanks, I see -Sc now but I've always taken for granted it was always there. 
What confused me is that it's a command line option instead of a mode switch 
like other language features.

Regards,
Ryan Joseph

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] First Version Vector Toolkit in OpenGL

2021-10-31 Thread Ryan Joseph via fpc-pascal


> On Oct 31, 2021, at 4:57 PM, Anthony Walter via fpc-pascal 
>  wrote:
> 
> As mentioned before, this library will be released to a git repository soon 
> with a FOSS license. It will be able to run on Windows, Mac, Linux, and Pi 
> including the new Pi Zero 2 W. 
> 

Thanks, please post when it's up.

An open question I have with OpenGL based UI libraries is how (or if) 
composting happens. For example, are you rendering an entire window to a frame 
buffer and then updating that when one of the controls requests changes, or are 
you just drawing the entire window and controls every frame?

I made a similar UI library which is loosely based on Cocoa but I didn't use 
any compositing so the entire window needs to redraw itself each frame. This is 
good enough for basic UI's in games but it's terribly inefficient so I wanted 
to tackle the problem of a composition layer (frame buffer) which updates only 
when controls request it and update only that portion of the window.

Regards,
Ryan Joseph

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] First Version Vector Toolkit in OpenGL

2021-10-31 Thread Anthony Walter via fpc-pascal
That's a very good question Ryan.

The short answer is this library draws everything each frame. It's meant
for writing, games, physics simulations, or drawing animated demos. It runs
as fast as you let it go, much like a game program.

BUT

It includes the ability to easily create and manage render buffers objects.
These render buffers allow you to draw to a buffer, then just display the
same buffer repeatedly, where you can change it only when needed. This is
like the composting system you mention, but it's an opt in feature. The
curtains demo linked in my OP is using a render buffer. If I didn't slow it
down it would render instantly and there would be no fun watching it draw
updates.

Additionally, there is a fixed step logic method meant for game or
simulation logic that is always invoked at every 1/120 of a second. This
ensures simulation logic returns the same results regardless of computing
or video render speed.

And finally, regarding compositing, the Canvas interface has a set of modes
determining how pixels are combined when new pixels are added. These modes
can do things like produce a negative image, lighten or darken,
multiply pixels, apply masks, and other things. They are like layer modes
in Gimp or Photoshop.

Oh and I almost forget. You can adjust the vsync or turn it on/off in my
library, allowing you more control over CPU / GPU resource usage.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Trying to update to: Xcode 12.5, FPC 3.2.2

2021-10-31 Thread Jonas Maebe via fpc-pascal

On 21/09/2021 06:59, Ng Pheng Siong via fpc-pascal wrote:

/Users/ngps/src/fpc_source/compiler/ppcrossx64 -Tiphonesim -Ur -Xs -O2 -n -Fux86_64 
-Fusystems -Fu/Users/ngps/src/fpc_source/rtl/units/x86_64-iphonesim -Fix86_64 
-FEx86_64/bin/x86_64-iphonesim -FUx86_64/units/x86_64-iphonesim -dRELEASE -ap 
-XR/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk
 
-ao-isysroot/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk
 -k"-syslibroot 
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk"
-DD2021/09/20 -dx86_64 -dGDB -Fux86 -Fix86 -Sew 
-o/Users/ngps/src/fpc_source/compiler/ppcx64 pp.pas
ld: building for iOS, but linking in object file built for iOS Simulator, file 
'x86_64/units/x86_64-iphonesim/pp.o'
pp.pas(288,36) Error: Error while linking
pp.pas(288,36) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted
make[3]: *** [ppcx64] Error 1
make[2]: *** [cycle] Error 2
make[1]: *** [compiler_cycle] Error 2
make: *** [build-stamp.x86_64-iphonesim] Error 2

Here's the error:

   ld: building for iOS, but linking in object file built for iOS Simulator, 
file 'x86_64/units/x86_64-iphonesim/pp.o'


I've finally looked into this and found the error: the compiler has to 
specify -ios_simulator_version_min rather than -iphoneos_version_min to 
the linker when targeting the simulator. This is fixed in latest trunk 
and in the fixes_3_2 branch.


You might be able to also work around it on 3.2.2 by adding 
CROSSOPT="-k-ios_simulator_version_min -9.0" to the make command line, 
and also add those parameters when compiling a program for the iphonesim 
target.



Jonas
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal