2026-05-22 6:45 PM
I am currently using TouchGFX to develop a project. How can I independently control GPU2D to draw graphics on a dynamic bitmap without affecting the TouchGFX display? I have already obtained the NeoChromSDK, but the examples in the NeoChromSDK all use GPU2D independently as well. I can draw with GPU2D if touchgfx not in use,But once I display them both, screen got glitched.
Solved! Go to Solution.
2026-05-23 6:43 AM
I kind of know what is wrong.
At the begaining of render,I enabled nema_enable_gradient(1); So the nema_clear can not work.
If I put nema_enable_gradient(1) after nema_clear, the nema_clear become normal.
2026-05-22 11:28 PM
Use TouchGFX dynamic bitmaps. Render into them via TouchGFX APIs.
2026-05-23 12:34 AM
This is what I have achieved:
This is a 3D terrain display. Using nemagfx I can draw 1000 triangles per frame.
The triangles are rendered fine,but the backGround is not.
This is how I am doing it:
In tick call of screenView.cpp:
drawGL(dynamicBitMapAdress);In drawGL function:
nema_cmdlist_t *tempList=nema_cl_get_bound();
nema_cl_wait(tempList);
nema_bind_dst_tex((uintptr_t)dynamicBitMapAdress, 460, 460, NEMA_RGB565, -1);
nema_set_clip(0, 0, 460, 460);
nema_clear(nema_rgba(255, 255, 255, 0xff));
for(){
caculateTriangles();
nema_interpolate_tri_colors(x0, y0, x1, y1, x2, y2,
&col0, &col1, &col2);
nema_raster_triangle_f(x0, y0, x1, y1, x2, y2);
}
nema_cl_wait(tempList);I called nema_clear,But it have no effect.
Can I get some help from @st gusys?
2026-05-23 3:14 AM
This is what I have done:
This terrain is rendered by lots of triangles. The terrain itself is fine,but the background is not.
I cleared the dynamic bitmap and draw like this :
nema_bind_dst_tex((uintptr_t)pbuf, 460, 460, NEMA_RGB565, -1);
nema_set_clip(0, 0, 460, 460);
nema_clear(nema_rgba(0, 0, 255, 0xff));
for(){
drawTriangles();
}But the nema_clear seems not working.
Can I get some help from some @st guys?
2026-05-23 6:43 AM
I kind of know what is wrong.
At the begaining of render,I enabled nema_enable_gradient(1); So the nema_clear can not work.
If I put nema_enable_gradient(1) after nema_clear, the nema_clear become normal.
We’re moving the ST Community to a new platform to give you a better and more reliable community experience.