We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I don't really know how to work with GLES yet
But I downloaded Grafika project https://github.com/google/grafika and tried some samples
I've added some code to onDrawFrame (GLSurfaceView) method of CameraCaptureActivity.java https://github.com/google/grafika/blob/master/app/src/main/java/com/android/grafika/CameraCaptureActivity.java#L678
onDrawFrame
GLSurfaceView
CameraCaptureActivity.java
It's supposed to draw bitmap but nothing changes on the frame
public void onDrawFrame(GL10 gl) { ... Bitmap bitmap = Bitmap.createBitmap(256, 256, Bitmap.Config.ARGB_8888); Canvas canvas = new Canvas(bitmap); bitmap.eraseColor(0); Paint paint = new Paint(); paint.setTextSize(18); paint.setAntiAlias(true); paint.setARGB(0xff, 0xff, 0xff, 0xff); paint.setTextAlign(Paint.Align.LEFT); paint.setTextScaleX(0.5f); canvas.drawText("TEST TEXT", 0, 0, paint); GLUtils.texImage2D(GLES20.GL_TEXTURE_2D, 0, bitmap, 0); bitmap.recycle(); }
their drawBox function works fine:
drawBox
GLES20.glEnable(GLES20.GL_SCISSOR_TEST); GLES20.glScissor(0, 0, 100, 100); GLES20.glClearColor(1.0f, 0.0f, 0.0f, 1.0f); GLES20.glClear(GLES20.GL_COLOR_BUFFER_BIT); GLES20.glDisable(GLES20.GL_SCISSOR_TEST);
it draws small rectangle at left bottom corner
So how can I create bitmap, edit it (Canvas) and then convert to GL texture and draw on frame?
The text was updated successfully, but these errors were encountered:
Have a look here.
Sorry, something went wrong.
@crearo I tried next #74 (comment)
but it didn't work
@crearo do you know what could be a problem?
No branches or pull requests
I don't really know how to work with GLES yet
But I downloaded Grafika project https://github.com/google/grafika and tried some samples
I've added some code to
onDrawFrame
(GLSurfaceView
) method ofCameraCaptureActivity.java
https://github.com/google/grafika/blob/master/app/src/main/java/com/android/grafika/CameraCaptureActivity.java#L678It's supposed to draw bitmap but nothing changes on the frame
their
drawBox
function works fine:it draws small rectangle at left bottom corner
So how can I create bitmap, edit it (Canvas) and then convert to GL texture and draw on frame?
The text was updated successfully, but these errors were encountered: