Recent

Recent Posts

Pages: [1] 2 3 ... 10
1
General / Re: Parameter passing oddities
« Last post by Nitorami on Today at 09:14:49 pm »
Sorry if I did not bring my point across properly.
This
Code: Pascal  [Select][+][-]
  1. procedure add (const a,b: complex; out c: complex);
is the only version which is both fast (no copies required), and works with variables as well as function results, e.g. as in add (foo(),C1,C3);

Ok and works, BUT the "const" tells the compiler that a and b will not be changed, while when calling add (C1,C2,C1), "a" WILL be changed.

That is all, and this is what I meant with a calling method which works like "const" or "constref" BUT does not imply the "constness" of variables. The other options are "var" (but does not work with function results which have no address), and passing by value (out of the question because it is abysmally slow). And constref is essentially the same as const in this context.
2
Unix / Re: A fairly simple sound solution? [SOLVED]
« Last post by marcov on Today at 09:07:11 pm »
Blender, Da Vinci and Lightworks are cross platform and miles ahead.

But being crossplatform is not the same as being used for the bulk of videoediting. More conclusive evidence please!
3
Graphics / Demo Scene Picture sinwave
« Last post by Gigatron on Today at 09:00:25 pm »
Hi,
Let's continue with the Bitmap.PutImagePart from BGRA component, usefull now to make
flag wave or ... under 70 lines of code running for me at 60 fps, so play with....

Picture from   by TorinoGT;

Code: Pascal  [Select][+][-]
  1. unit Unit1;
  2.  
  3. {$mode objfpc}{$H+}
  4.  
  5. interface
  6.  
  7. uses
  8.   Classes, SysUtils, Forms, Controls, Graphics, Dialogs, ExtCtrls,
  9.   BGRAVirtualScreen,BGRABitmap, BGRABitmapTypes;
  10.  
  11. type
  12.  
  13.   { TForm1 }
  14.  
  15.   TForm1 = class(TForm)
  16.     BGRAVirtualScreen1: TBGRAVirtualScreen;
  17.     Timer1: TTimer;
  18.     procedure BGRAVirtualScreen1Redraw(Sender: TObject; Bitmap: TBGRABitmap);
  19.     procedure FormCreate(Sender: TObject);
  20.     procedure Timer1Timer(Sender: TObject);
  21.   private
  22.  
  23.   public
  24.  
  25.   end;
  26.  
  27. var
  28.   Form1: TForm1;
  29.   Plasma: TBGRABitmap;
  30.   acc : integer;
  31.  
  32. implementation
  33.  
  34. {$R *.lfm}
  35.  
  36. { TForm1 }
  37.  
  38. procedure TForm1.FormCreate(Sender: TObject);
  39. begin
  40.     Plasma := TBGRABitmap.Create('warrior1.png');
  41.     acc := 0;
  42.  
  43. end;
  44. // wobble or sinwave !!
  45. procedure TForm1.BGRAVirtualScreen1Redraw(Sender: TObject; Bitmap: TBGRABitmap);
  46. var
  47.   i : integer;
  48.   w : integer;
  49. begin
  50.      i:=0;
  51.      w:=0;
  52.  
  53.      Bitmap.Fill(BGRAPixelTransparent);
  54.      acc := acc +1;
  55.  
  56.      for i:=0 to 120 do
  57.      begin
  58.      w := round(50 + (10 * sin((i+acc) * 8 * PI / 180)));
  59.      Bitmap.PutImagePart(0, i*5-4 , Plasma,  Rect(w,  i*5-4,  600*w ,i*10+4), dmDrawWithTransparency);
  60.      end;
  61. end;
  62.  
  63. procedure TForm1.Timer1Timer(Sender: TObject);
  64. begin
  65.  
  66.        BGRAVirtualScreen1.RedrawBitmap;
  67. end;
  68.  
  69. end.
  70.  
4
Suggestions / Re: add new targets to make
« Last post by marcov on Today at 08:38:42 pm »
Glad to see you are making progress!
5
Unix / Re: A fairly simple sound solution? [SOLVED]
« Last post by Thaddy on Today at 08:37:08 pm »
Blender, Da Vinci and Lightworks are cross platform and miles ahead.
Blender is even open source. And it laughs at Windows only solutions.
(and yes you can edit video with blender, before you squick)
6
General / Re: how to tweek fpmake to compile RTL?
« Last post by marcov on Today at 08:29:16 pm »
Expanding fpmake to the RTL has been held off for practical reasons (RTL makefiles are more diverse) and fundamental reasons (fpmake, like any FPC program depends on RTL).

7
Unix / Re: A fairly simple sound solution? [SOLVED]
« Last post by VisualLab on Today at 07:46:18 pm »
@Videolab
your statements are simply not true. Most professional video editing is done under unix OS's.

To confirm this, some public and trustworthy reports would be needed. Probably no one keeps such lists (because it won't be of any use to anyone anyway). I agree that Unix computers are used to perform video (and 3D) rendering (and I didn't deny it). However, it works in batch mode (which is obvious because it is a time-consuming process). And this applies mainly to rendering, rather than editing (apart from "raisins" such as DaVinci Resolve Blackmagic Design, which I mentioned earlier).

More in general, we lack a simple sound interface like python has and that is perfectly capable for educational purposes, including synthesizers. It is just that nobody bothers to write that in FPC. But that can be done. Just like the Raspberry Pi community has proven for python, we can do that in FPC. It has simply not been done yet.
But if playng a simple wav is enough? There are better examples on this forum.

Yes. Agreement.

My entry, however, concerned problems (chaos) with multimedia support in Linux. Because no matter what, the emphasis in Linux development is mainly on the network and servers. And multimedia is more the domain of workstations and desktops. In this respect, Linux is a mess and makeshift solutions (DE fragmentation, lack of agreed solutions at the system level). And the root cause is the disagreement between programmers of different DEs, their stubborn stubbornness towards the adopted solutions, ill-considered decisions, reluctance and laziness to develop and maintain stable APIs, etc. (i.e.: the human factor failed, as usual). This translates into quite real problems for end users, including people who are just starting to learn programming. And the fact that Lazarus does not support multimedia (classes, APIs, etc.) well in Linux is largely a secondary problem (because it is platform dependent).
8
General / Re: how to tweek fpmake to compile RTL?
« Last post by Key-Real on Today at 07:45:37 pm »
@paule32:
Hello my Friend :)
no 4k but Play Station 1 Demo.
atm. I'm porting the compiler....
9
General / Re: how to tweek fpmake to compile RTL?
« Last post by paule32 on Today at 07:10:34 pm »
Hello key-real, my friend - long not seeing ...
How are you ?
You already on the 4K Intro Road ?

If so, take a look to my github.com project:
https://github.com/paule32/Qt_FPC

It is optimized for the Microsoft Windows 11 Command Console.
10
Other / Re: Quirky windows
« Last post by ASerge on Today at 07:07:16 pm »
Pages: [1] 2 3 ... 10

TinyPortal © 2005-2018