cancel
Showing results for 
Search instead for 
Did you mean: 

NemaGFX v1.3.0 M7 (STM32H7RS) - Some limitations being worked on?

Jack3
Senior III

Hello STM32 enthusiasts,

While testing NemaGFX v1.3.0 for the STM32H7RS (M7), I discovered some differences compared to NemaGFX v3.5.0 for the STM32U5x9 (M33).

1. nema_clear(color); Doesn't work, I had to come up with some solution:

  nema_matrix3x3_t m;
  NEMA_VG_PAINT_HANDLE paint;
  uint32_t color = nema_rgba(0xFF, 0xFF, 0x00, 0xFF);

  /* Fill the screen with a color */
#if defined(STM32H7S7xx)
  /* Use this on STM32H7RS */
  paint = nema_vg_paint_create();
  nema_vg_paint_clear(paint);
  nema_mat3x3_load_identity(m);

  nema_vg_set_fill_rule(NEMA_VG_FILL_NON_ZERO);
  nema_vg_paint_set_paint_color(paint, color);
  nema_vg_draw_rect(0, 0, DISPLAY_SIZE_W, DISPLAY_SIZE_H, m, paint);

  nema_vg_paint_destroy(paint);
#else
  /* Does not work on STM32H7RS */
  nema_clear(color);
#endif



2. nema_bind_src_tex / nema_blit Does not work with the NEMA_AL88 format, but luckily it does work with the NEMA_ARGB8888 format.

//  Format = NEMA_AL88 /* Doesn't render any output using AL88 bitmaps */
  Format = NEMA_ARGB8888 /* Works fine using ARGB8888 bitmaps */

  nema_set_const_color(nema_rgba(0xFF, 0xFF, 0x00, 0xFF));
  nema_set_blend_blit(nema_blending_mode(NEMA_BF_SRCALPHA, NEMA_BF_INVSRCALPHA, NEMA_BLOP_MODULATE_RGB | NEMA_BLOP_MODULATE_A));
  nema_bind_src_tex(Data, Width, Height, Format, Stride, NEMA_FILTER_BL);
  nema_blit(x, y)

 

3. Not all types of gradients work, like NEMA_VG_PAINT_GRAD_RADIAL and possible more.

  float w2 = w / 2;
  float h2 = h / 2;

  nema_vg_paint_set_type(paint, NEMA_VG_PAINT_GRAD_RADIAL);
  nema_vg_paint_set_grad_radial(paint, gradient, x + w2, y + h2, w2, 0);

Will these issues be fixed in a later release of NemaGFX?
Or is the GPU2D in the M7 simply not capable of this?
Or am I probably doing it wrong? (Most probably, though!)

Sincerely, Jack.

0 REPLIES 0