Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 7 of 7

Thread: Good Teensy GFX and Game Library ???

  1. #1

    Good Teensy GFX and Game Library ???

    Hello, I am having difficulty finding a graphics library for Teensy4 that handles such things as animated sprites, collisions, lines, shapes, fill, text, and optimizations to be rendered to a TFT over SPI.

    I found a great one for ESP32 http://www.fabglib.org/ that does just what I am looking for, but I would not understand how to make this supported on Teensy4, or if it's even possible. I would much prefer to use Teensy than ESP32 for this project.

    Any help would be greatly appreciated. Thanks.

  2. #2
    Senior Member
    Join Date
    May 2018
    Posts
    215
    https://www.google.com/url?sa=t&sour...arvengt/VGA_t4

    There is a basic gfx library with sprites and 2 tiles layers in the T4vga lib above. Gfxengine sample demonstrates it.

  3. #3

  4. #4
    Thanks! Those libs are cool, but still a ways to go, and not specifically relevant for my project given I am not using VGA in any way...

    Guess this project will be a bit more difficult than I thought.

    Maybe there will one day be an amazing Teensy Graphics lib in the same way there is the amazing Teensy Audio lib.

    @Paul do you know anyone else doing interesting (non-emulator) work with gfx/sprites direct from Teensy to display?

    Thanks.

  5. #5
    Doing a test with teensy and a 480x320 tft I was able to achieve a max fps of just 10 when clearing all pixels each loop. This is running HX8357_t3n which KurtE confirmed is about the max fps for that display.

    I am seeing demos online of esp32 + TFT_eSPI achieving 60fps for 480x320, and even running displays of much higher resolution.

    So I guess I am just a bit confused as to why such a performance difference, given t4 is a much faster micro. Maybe I am missing something obvious? This superfast SPI stuff is a bit complex. Just trying to better understand it. Would you say esp32+TFT_eSPI is looking like a better foundation to build a gfx/game library on top of?

    Thanks!

  6. #6
    Senior Member
    Join Date
    May 2018
    Posts
    215
    Quote Originally Posted by Fuzzy View Post
    Doing a test with teensy and a 480x320 tft I was able to achieve a max fps of just 10 when clearing all pixels each loop. This is running HX8357_t3n which KurtE confirmed is about the max fps for that display.

    I am seeing demos online of esp32 + TFT_eSPI achieving 60fps for 480x320, and even running displays of much higher resolution.

    So I guess I am just a bit confused as to why such a performance difference, given t4 is a much faster micro. Maybe I am missing something obvious? This superfast SPI stuff is a bit complex. Just trying to better understand it. Would you say esp32+TFT_eSPI is looking like a better foundation to build a gfx/game library on top of?

    Thanks!
    The demo shows an ILI9341 which is 320x240. That one also runs at about 50/60FPS on Teensys.

  7. #7
    Okay, yes i see the time for fill-screen on 480x320 is ~100000us = 0.1s = 10fps on other demos.

    Thanks for your reply.

    It looks like the HX8357_t3n library is on par with the esp32 ones. Optimizations to achieve 60fps has to be done in how the screen is updated/drawn.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •