Recent

Author Topic: Fast Canvas Library V1.052  (Read 28122 times)

backprop

  • Full Member
  • ***
  • Posts: 195
Re: Fast Canvas Library V1.052
« Reply #90 on: February 08, 2026, 09:24:18 pm »
Yes, after removing code for music and fixing case sensitive directory name with Linux, last project works... Too bad music is just Windows related. I will try previous ones, some demos looks quite nice on your YouTube channel...

One suggestion, though. Instead creating project1.zip, it would be great to create some meaningful name of the zip in order to distinguish all when download.



Gigatron

  • Sr. Member
  • ****
  • Posts: 402
  • Amiga Rulez !!
    • Gigatron Shader Network Demo
Re: Fast Canvas Library V1.052
« Reply #91 on: February 10, 2026, 04:40:04 pm »
Hi

The latest version of Glcanvas with more Amiga like Fx;

Live demo on YT : https://www.youtube.com/watch?v=pGgl3gBavQ4

Regards
« Last Edit: February 10, 2026, 04:58:36 pm by Gigatron »
Coding faster than Light !

backprop

  • Full Member
  • ***
  • Posts: 195
Re: Fast Canvas Library V1.052
« Reply #92 on: February 10, 2026, 11:38:53 pm »
For some older demos which can't compile with older glCanvas, missing glLoadPNGToTexture with right number of parameters when replaced with new glCanvas.

Example, demo which uses this code, for instance:
Code: Pascal  [Select][+][-]
  1.   TexFond     := glLoadPNGToTexture('sotb/fond.png');
  2.   TexMontagne := glLoadPNGToTexture('sotb/montagnes.png');
  3.   TexNuage0   := glLoadPNGToTexture('sotb/nuages0.png');
  4.   TexNuage1   := glLoadPNGToTexture('sotb/nuages1.png');
  5.   TexNuage2   := glLoadPNGToTexture('sotb/nuages2.png');    

Can't be specific which, as older zip files had the same name and I have downloaded many  at once...

EDIT: After adding required variables as dummy code, at least can compile and show something...
« Last Edit: February 11, 2026, 12:02:22 am by backprop »

Gigatron

  • Sr. Member
  • ****
  • Posts: 402
  • Amiga Rulez !!
    • Gigatron Shader Network Demo
Re: Fast Canvas Library V1.052
« Reply #93 on: February 11, 2026, 02:54:41 pm »
Hi,

As I explained earlier in this topic, glCanvas evolves between versions and each version comes with its own demo examples. The new version is not compatible with old demos.

The demos are designed to work with their specific glCanvas version.

Latest glCanvas is now v0.051 ++ added more and more commands;
API changes between versions (like glLoadPNGToTexture now requiring width/height parameters to retrive Texture width and height )
 
Be sure when it's done i will try to adapt required old demo ... (google translate)

In addition the next version demo example glTextureTunnelShader.
 https://www.youtube.com/watch?v=RvLYKVtL-Gw

Regards

Gigatron
« Last Edit: February 11, 2026, 05:42:29 pm by Gigatron »
Coding faster than Light !

backprop

  • Full Member
  • ***
  • Posts: 195
Re: Fast Canvas Library V1.052
« Reply #94 on: February 11, 2026, 08:15:33 pm »
Some old demos are quite nice, but use version which is not supported by Linux. It would be nice if you make it available on you site or here upgraded...

Gigatron

  • Sr. Member
  • ****
  • Posts: 402
  • Amiga Rulez !!
    • Gigatron Shader Network Demo
Re: Fast Canvas Library V1.052
« Reply #95 on: February 12, 2026, 11:24:44 pm »
Some old demos are quite nice, but use version which is not supported by Linux. It would be nice if you make it available on you site or here upgraded...

Hi, is this demo is working for you ?

Regards
Coding faster than Light !

backprop

  • Full Member
  • ***
  • Posts: 195
Re: Fast Canvas Library V1.052
« Reply #96 on: February 13, 2026, 11:36:25 am »
Hi, is this demo is working for you ?
Regards

After removing part for playing audio, fixed some case sensitive filenames and adding missing texture, it can compile and it works on Linux. Thanks. I will do something with audio support for Linux, though. Great retro demo without great retro music is half complete... ;)


Gigatron

  • Sr. Member
  • ****
  • Posts: 402
  • Amiga Rulez !!
    • Gigatron Shader Network Demo
Re: Fast Canvas Library V1.052
« Reply #97 on: February 13, 2026, 07:07:43 pm »
Good

Missing 1 or 2 shader and i will release glCanvas V1.0 ... glScreenPixelate & ??? a crazy shader :)

Latest live demo ; glRaserBarShader, glFloorShader, glScreenQuantizeShader and so on  ...
 https://www.youtube.com/watch?v=oBK2G3-jyKs
Coding faster than Light !

backprop

  • Full Member
  • ***
  • Posts: 195
Re: Fast Canvas Library V1.052
« Reply #98 on: February 13, 2026, 07:16:49 pm »
Better demo with fast color changing... But music is a bit slow. ;)

Great demo!
« Last Edit: February 13, 2026, 07:19:56 pm by backprop »

Gigatron

  • Sr. Member
  • ****
  • Posts: 402
  • Amiga Rulez !!
    • Gigatron Shader Network Demo
Re: Fast Canvas Library V1.052
« Reply #99 on: February 14, 2026, 01:14:05 am »
Better demo with fast color changing... But music is a bit slow. ;)

Great demo!

For the release 1.0 of glCanvas i have added some nice shader from my old Construct Fx shader;
Screen Palettes from C64, CPC , ZX  ... screen Resolution ... Screen3D, ScreenCube .... and so ..


Code: Pascal  [Select][+][-]
  1. procedure TForm1.OpenGLControl1Paint(Sender: TObject);
  2. var
  3.    cx, cy,i: Integer;
  4.    col1, col2,col3 : TglColor;
  5. begin
  6.   glFillScreen(OpenGLControl1, 0.1, 0.1, 0.1, 1.0)  ;
  7.   cx := OpenGLControl1.Width div 2;
  8.   cy := OpenGLControl1.Height div 2;
  9.  
  10.  
  11.   glStarFieldShader(0,0,1980,700,tmr*2.0,1.0,0.0,8,1.0,1.0,1.0,1.0);
  12.  
  13.  
  14.   glBitmapFontText(fnt32,106,36,'GIGATRON 2026',32, 32, 10, 1.0, 0.0, bmAlpha, 4.0, 4.0);
  15.  
  16.   glRasterShader(tmr*0.2, 1980, 300, 180, 4, 256.0, 1.0, 1.0, 0.0, 1.0, 0.0, 0.0);
  17.   glRasterShader(-tmr*0.2, 1980, 300, 10, 4, 256.0, 1.0, 1.0, 0.0, 1.0, 0.0, 0.0);
  18.  
  19.   glTextureFloorShader(0,300,1980,750,tex,-tmr*0.1,0.45,0.4,6.0,0.5,0.5,0.5);
  20.  
  21.   col1.r:= 0.0;     // black
  22.   col1.g:= 0.0;
  23.   col1.b:= 0.0;
  24.   col1.a:= 1.0;
  25.  
  26.   col2.r := 0.5 + abs(sin(tmr*0.3)) * 0.5;
  27.   col2.g := 0.5 + abs(sin(tmr*0.2)) * 0.5;
  28.   col2.b := 0.5 + abs(cos(tmr*0.1)) * 0.5;
  29.   col2.a := 1.0;
  30.  
  31.   col3.r:= 0.0;   // black
  32.   col3.g:= 0.0;
  33.   col3.b:= 0.0;
  34.   col3.a:= 1.0;
  35.  
  36.   for i := 0 to 7 do  // 8 copper bars
  37.   begin
  38.        glCopperBar(0,300+i*8+80*sin(ct/20+(i/2)),1980, 300+i*8+80*sin(ct/20+(i/2))+64 , col1,col2,col3,0.0,false,1.0);
  39.   end;
  40.  
  41.  
  42.  
  43.   glBitmapFontText(fntx,
  44.                  2200 - txtPosx,
  45.                  620,
  46.                  ' ... WELCOME GIGATRON PRESENTS - FLOOR AND SCREEN COLOR REDUCTION FX - GLCANVAS REACH SOON V1.0 OVER 100 ++ AMIGA STYLE FX GL COMMAND FOR LAZARUS PASCAL MAKE OLD CRACKTROS BECOME EASY ! SEE YOU BYE !!! ',
  47.                  32, 32, 10, 1.0, 0.0, bmAlpha, 3.0, 3.0);
  48.  
  49.  // Before glBitmapFontFx command , Threshold is target color of bitmap font near white;
  50.  // After this Shader All Bitmap Fonts are affected by this FX
  51.   glFontCopperShader(-tmr*0.05, 320, 256, 16.0, 0.95, 1.0,0,
  52.                    1.0, 0.0, 0.0,  // Bleu
  53.                    0.0, 0.0, 1.0,
  54.                    0.5 + abs(sin(tmr*0.3)) * 0.5,
  55.                    0.5 + abs(sin(tmr*0.2)) * 0.5,
  56.                    0.5 + abs(cos(tmr*0.1)) * 0.5,
  57.                    0.0, 1.0, 1.0);
  58.  
  59.    glBitmapFontText(fnt32,
  60.                  100,30,'GIGATRON 2026',32, 32, 10, 1.0, 0.0, bmAlpha, 4.0, 4.0);
  61.  
  62.  // glScreenResolutionShader(OpenGLControl1,256.0);
  63.  // glScreenQuantizeShader(OpenGLControl1,sq);
  64.  
  65.   //glScreen3DShader(OpenGLControl1,tmr*0.0,tmr*0.1,0.0,0.0,0.0,0.0,0.0,
  66.                                     // 2.0,1.5,0,0,1024.0);
  67.   // glScreenTVShader(OpenGLControl1, 1.0 - (tmr / 50.0));  TO do !!
  68.  
  69.    glScreen3DCubeShader(OpenGLControl1,0,0,tmr*0.2,tmr*0.1,tmr*0.3,-3.0,1.5);
  70.    glScreen8bitShader(OpenGLControl1, 256.0, PALETTE_C64);
  71.    glScreenShaderCRT(OpenGLControl1, 0.95, 1.0, 1.0, 1.0,1.0, 1.0, 1.0, 1.0);
  72.  
  73.  OpenGLControl1.SwapBuffers;
  74. end;

Regards
 
Coding faster than Light !

backprop

  • Full Member
  • ***
  • Posts: 195
Re: Fast Canvas Library V1.052
« Reply #100 on: February 14, 2026, 01:32:51 am »
I have moved code for audio and now it is much clearer main unit. I have also added definition MUSIC at the beginning of the main unit which should be enough to easily remove music until working on Linux support.

When enable MUSIC definition, can you confirm it can compile and run on Windows with music?

EDIT: I have removed some things in Object inspector, project.lpr and changed few things in sidmon_lib.pas and new file sid_player.pas, thus now all should be much more clearer and independent. BTW, I have also  removed DLL file from the ZIP, which should be present to compile and run on Windows and audio support.
« Last Edit: February 14, 2026, 09:41:25 am by backprop »

Gigatron

  • Sr. Member
  • ****
  • Posts: 402
  • Amiga Rulez !!
    • Gigatron Shader Network Demo
Re: Fast Canvas Library V1.052
« Reply #101 on: February 14, 2026, 01:54:59 pm »
Hi

Can compile when $DEFINE MUSIC is disabled , otherwise no.

I will try to split code too; But before, i must finishing some works ;
https://www.youtube.com/watch?v=9J3D96h_Wk8

PreRelease Demo; Screen x,y,z Rotations , pixelate , scanline, colormode ....
Code: Pascal  [Select][+][-]
  1. procedure glScreen3DShader(glc: TOpenGLControl;
  2.                            rot_x: Single = 0.0;
  3.                            rot_y: Single = 0.0;
  4.                            rot_z: Single = 0.0;
  5.                            trx: Single = 0.0;
  6.                            try_: Single = 0.0;
  7.                            rlx: Single = 0.0;
  8.                            rly: Single = 0.0;
  9.                            zoom: Single = 2.0;
  10.                            intensity: Single = 1.0;
  11.                            colormode: Integer = 0;
  12.                            scanlinemode: Integer = 0;
  13.                            rezpixel: Single = 256.0);

https://www.youtube.com/watch?v=lm0wZQccXf0


Regards
« Last Edit: February 14, 2026, 11:49:36 pm by Gigatron »
Coding faster than Light !

backprop

  • Full Member
  • ***
  • Posts: 195
Re: Fast Canvas Library V1.052
« Reply #102 on: February 14, 2026, 05:46:10 pm »
I will try to split code too; But before, i must finishing some works ;
https://www.youtube.com/watch?v=9J3D96h_Wk8

Oh, great! I can feel dizziness... ;)

Gigatron

  • Sr. Member
  • ****
  • Posts: 402
  • Amiga Rulez !!
    • Gigatron Shader Network Demo
Re: Fast Canvas Library V1.052
« Reply #103 on: February 16, 2026, 09:07:20 pm »
Nice Again;

Before releasing V1.0 of glCanvas (bug corrections on the way)
I would like to share the pre release demo with lot of
many nice fx; all demo under 500kb zip file with module and gfx !
Please play with parameters of some functions to make your own demo.

Today RGBA screen shift fx and more.

Have fun
Gigatron

For example if you want A500 ECS or A1200 AGA style copy & paste this code.

Code: Pascal  [Select][+][-]
  1. procedure TForm1.OpenGLControl1Paint(Sender: TObject);
  2. var
  3.   col1, col2, col3 : TglColor;
  4.   page          : Integer;
  5. begin
  6.   glFillScreen(OpenGLControl1, 0.1, 0.1, 0.1, 1.0);
  7.   glStarFieldShader(0, 0, 1980, 700, tmr*2.0, 1.0, 0.0, 8, 1.0, 1.0, 1.0, 1.0);
  8.   glTextured3DCube(OpenGLControl1, 0.0, 5.0, 0.0, 100.0, laztex,
  9.                    tmr*2.0, tmr*3.0, 0.0, 1.0, 1.0, 1.0);
  10.  
  11.   glRasterShader( tmr*0.2, 1980, 300, 180, 4, 256.0, 1.0, 1.0, 1.0, 0.0, 0.0, 1.0);
  12.   glRasterShader(-tmr*0.2, 1980, 300,  10, 4, 256.0, 1.0, 1.0, 1.0, 0.0, 0.0, 1.0);
  13.   glTextureFloorShader(0, 300, 1980, 750, tex, -tmr*0.02, 0.45, 0.4, 6.0, 0.5, 0.5, 0.5);
  14.   col1 := glMakeColor(0.0, 0.0, 0.0, 1.0);
  15.   col2 := glMakeColor(0.5 + abs(sin(tmr*0.3)) * 0.5,
  16.                       0.5 + abs(sin(tmr*0.2)) * 0.5,
  17.                       0.5 + abs(cos(tmr*0.1)) * 0.5, 1.0);
  18.   col3 := glMakeColor(0.0, 0.0, 0.0, 1.0);
  19.   glBitmapFontText(fntx,
  20.     2200 - txtPosX, 620,
  21.     ' *** WELCOME GIGATRON PRESENTS -  GLCANVAS PRE RELASE VERSION DEMO 2 - GLCANVAS REACH SOON V1.0 OVER 100 ++ AMIGA STYLE FX GL COMMAND FOR LAZARUS PASCAL MAKE OLD CRACKTROS BECOME EASY ! SEE YOU BYE *** ',
  22.     32, 32, 10, 1.0, 0.0, bmAlpha, 3.0, 3.0);
  23.   glFontCopperShader(-tmr*0.05, 320, 256, 16.0, 0.95, 1.0, 0,
  24.     0.0, 0.0, 1.0,
  25.     1.0, 1.0, 1.0,
  26.     0.5 + abs(sin(tmr*0.3)) * 0.5,
  27.     0.5 + abs(sin(tmr*0.2)) * 0.5,
  28.     0.5 + abs(cos(tmr*0.1)) * 0.5,
  29.     0.0, 0.0, 1.0);
  30.   glBitmapFontText(fnt32, 100, 30, 'GIGATRON 2026',
  31.     32, 32, 10, 1.0, 0.0, bmAlpha, 4.0, 4.0);
  32.  
  33.   page := Trunc(tmr / 62.0) mod 8;
  34.  
  35.   //glScreen3DShader(OpenGLControl1,tmr*0.02,0.0, 0.0, 0.0, 0.0, 0.0, 0.0, -2.0, 2.0, 0, 0, 256.0);
  36.  
  37.   case page of
  38.     0:
  39.       glScreenRGBA(OpenGLControl1,
  40.         1.0, 1.0, 1.0, 1.0,
  41.         sin(tmr*0.05) * 0.008, 0.0,
  42.         0.0, 0.0,
  43.         -sin(tmr*0.05) * 0.008, 0.0);
  44.     1:
  45.       glScreenRGBA(OpenGLControl1,
  46.         0.8, 0.9, 1.2, 1.0,
  47.         0.0, sin(tmr*0.06) * 0.006,
  48.         0.0, 0.0,
  49.         0.0, -sin(tmr*0.06) * 0.006);
  50.     2:
  51.       glScreenRGBA(OpenGLControl1,
  52.         1.2, 1.0, 0.7, 1.0,
  53.         0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
  54.     3:
  55.       glScreenRGBA(OpenGLControl1,
  56.         1.0, 1.0, 1.0, 1.0,
  57.         sin(tmr*0.07) * 0.01,  sin(tmr*0.07) * 0.01,
  58.         0.0, 0.0,
  59.         -sin(tmr*0.07) * 0.01, -sin(tmr*0.07) * 0.01);
  60.     4:
  61.       glScreenRGBA(OpenGLControl1,
  62.         0.6, 1.2, 0.6, 1.0,
  63.         0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
  64.     5:
  65.       glScreenRGBA(OpenGLControl1,
  66.         1.0, 1.0, 1.0, 1.0,
  67.         0.015, 0.0,
  68.         0.0,   0.0,
  69.         -0.015, 0.0);
  70.     6:
  71.       glScreenRGBA(OpenGLControl1,
  72.         0.8 + abs(sin(tmr*0.1)) * 0.4,
  73.         0.7, 0.7, 1.0,
  74.         0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
  75.     7:
  76.       glScreenRGBA(OpenGLControl1,
  77.         0.9 + abs(sin(tmr*0.08)) * 0.3,
  78.         0.9 + abs(sin(tmr*0.06)) * 0.3,
  79.         0.9 + abs(cos(tmr*0.04)) * 0.3,
  80.         1.0,
  81.         sin(tmr*0.07) * 0.012,  sin(tmr*0.05) * 0.006,
  82.         0.0, 0.0,
  83.         -sin(tmr*0.07) * 0.012, -sin(tmr*0.05) * 0.006);
  84.   end;
  85.  
  86.   // Amiga 1200 AGA Style
  87.   //  glScreenResolutionShader(OpenGLControl1,256.0);
  88.  
  89.   // Amiga 500 ECS Style
  90.   glScreenResolutionShader(OpenGLControl1,128.0);
  91.  
  92.   OpenGLControl1.SwapBuffers;
  93. end;
  94.  
« Last Edit: February 16, 2026, 09:38:11 pm by Gigatron »
Coding faster than Light !

backprop

  • Full Member
  • ***
  • Posts: 195
Re: Fast Canvas Library V1.052
« Reply #104 on: February 17, 2026, 03:19:31 am »
This can't compile on Linux, unless I remove extra units in project1.lpr.

Code: Pascal  [Select][+][-]
  1. program project1;
  2. ...
  3.   Forms, lazopenglcontext, Unit1, glCanvas; //, soundtracker_lib, SoundtrackerAudio;
  4.  

The thing is that compiler other way is forced to include these files, even they are not in use by declarations in main file and result is this:
Code: [Select]
Compile Project, Target: ./Glcanvas0051Demo/project1: Exit code 1, Errors: 1, Warnings: 1
Warning: linker: /usr/bin/ld: cannot find -lSoundtracker.dll: No such file or directory
project1.lpr(23,1) Error: Error while linking

And also notice that glCanvas is also not needed to be added here, nor lazopenglcontext, just this:

Code: Pascal  [Select][+][-]
  1.   Forms, Unit1; //lazopenglcontext, glCanvas, soundtracker_lib, SoundtrackerAudio;
  2.  

Notice that every file you include in project inspector will be added here and if they are not essencial for functioning (as components, for instance), they will make problems.

And one more thing... Linux as any UNIX system is case sensitive, meaning your file and path names need to be exact as they are wrote. In this case, you need to change "Font" name of directory to "font", or to replaces filenames in the code in order to use it. Otherwise, "Font" and "font" directories are not the same as in Windows. The same for files,  "echoing.mod" and "Echoing.mod" are not the same files.
« Last Edit: February 17, 2026, 04:02:36 am by backprop »

 

TinyPortal © 2005-2018