Reputation: 13158
Android has support for stylus low latency. The example app is here: https://developer.android.com/codelabs/large-screens/advanced-stylus-support#5
I want to have a button to clear the drawing screen but i do not know how. I have tried to add this method into FastRenderer and call it when a clear button is click but it doesn't do anything. It only update on the next stroke. Can you help?
fun clear(){
Log.i("FAST_RENDER", "clear fast render")
viewModel.openGlLines.clear()
GLES20.glClearColor(1.0f, 1.0f, 1.0f, 0.0f)
GLES20.glClear(GLES20.GL_COLOR_BUFFER_BIT)
release()
}
Upvotes: 0
Views: 70