Giter Site home page Giter Site logo

lvgl-opengl's Introduction

lvgl-opengl

This is an example SDL application for OpenGL ES 2.0 implementation for LVGL aimed for to run on PinePhone.

OpenGL ES 2.0 fork of the LVGL can be found here.

SDL Driver can be found here.

Screenshot

screenshot

Quick Start

Requirements

  • OpenGL ES >= 2.0
  • cmake
  • SDL2
  • libepoxy

Cloning the repository

$ git clone https://github.com/rainlab-inc/lvgl-opengl
$ cd lvgl-opengl
$ git submodule update --init --remote --recursive

Building

CMake

$ mkdir build
$ cd build
$ cmake ..
$ make -j4
$ ./lvgl-opengl

Draw Functions

Rectangle

  • draw_shadow
  • draw_bg
    • plain rect ✅
    • radius mask ✅
      • TODO: more efficient corner rendering (Use same buffer for all 9 pieces per rectangle.)
      • TODO: do antialiasing with respect to radius, not with an arbitrary constant,
    • TODO: other masks? gradients?
  • draw_bg_img
    • maybe call draw_img with rect borders?
  • draw_border
  • draw_outline

Image

  • Hash textures with LRU cache ✅
  • draw_img ✅
    • TODO: hash textures, avoid creating same textures if they are used more than once. ✅
    • TODO: handle recolor operation more wisely
    • TODO: handle masks

Letter

  • Hash glyphs with LRU cache ✅
  • TODO: Look for pixel perfect alignment for glitches.
  • TODO: Test for CJK characters.
  • TODO: Pack glyphs to efficient rendering.

Arc

TODO: Look for how to draw efficient arcs with GL.

Line

TODO: It will be probably easy - efficient if we draw with shaders.

Polygon

TODO: Look which components use draw polygon.

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.