Giter VIP home page Giter VIP logo

Comments (3)

viniciusfbb avatar viniciusfbb commented on June 9, 2024 1

Skia4Delphi is a graphics library that can be seen in 3 main parts: api, controls and fmx renderer. "Enable Skia" will set binaries and configure deployment in your project (as we are still a shared library), and is a fundamental step towards using the library. The fmx renderer is an extra and optional feature, being enabled by adding ::Fmx::Skia::GlobalUseSkia = true; at program startup (in Delphi, this line is automatically added to the .dpr when clicking "Enable Skia"). After that, skia4delphi will register its own TCanvas for forms, bitmaps and printers. Skia does not support 3D drawings, so it does not replace the rendering of 3D forms (TContext3D), but this is changing in newer versions and perhaps we will have a 3D rendering based on Skia in the future.

In addition, there are some backends of Skia that can be chosen, in special, the Vulkan (that is still disabled by default).

from skia4delphi.

paulocesarbot avatar paulocesarbot commented on June 9, 2024 1

The fmx renderer is an extra and optional feature, being enabled by adding ::Fmx::Skia::GlobalUseSkia = true; at program startup

  1. Click on your project, then Ctrl + V (to open the source;
  2. Add the code to enable Skia Vulkan render:
//---------------------------------------------------------------------------

#include <fmx.h>
#ifdef _WIN32
#include <tchar.h>
#endif
#pragma hdrstop
#include <System.StartUpCopy.hpp>
#include <FMX.Skia.hpp>
//---------------------------------------------------------------------------
USEFORM("Unit1.cpp", Form1);
//---------------------------------------------------------------------------
extern "C" int FMXmain()
{
	try
	{
		// Allowing Skia to replace the app render by Skia Vulkan
		::Fmx::Types::GlobalUseVulkan = true;
		::Fmx::Skia::GlobalUseSkiaRasterWhenAvailable = false;
		::Fmx::Skia::GlobalUseSkia = true;

		Application->Initialize();
                ...

from skia4delphi.

yimmasabi avatar yimmasabi commented on June 9, 2024

Thank you. Just a recommendation, a schematic graphical pipeline presentation (one side old FMX app, other side skia enabled FMX app) would be nice to explain all, thank you. i.e. https://vulkan-tutorial.com/Drawing_a_triangle/Graphics_pipeline_basics/Introduction

from skia4delphi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.