Skip to content
New issue

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

Not working in android 6.0 #3

Open
santhosh153 opened this issue Oct 25, 2017 · 2 comments
Open

Not working in android 6.0 #3

santhosh153 opened this issue Oct 25, 2017 · 2 comments

Comments

@santhosh153
Copy link

App is keep on crashing

@chauthai
Copy link
Owner

chauthai commented Nov 3, 2017

@santhosh153 can you send an error log?

@hanton
Copy link

hanton commented Mar 21, 2019

I fix this problem after changing the DirectVideo.draw() to:

public void draw()
	{
		GLES20.glUseProgram(mProgram);

		mPositionHandle = GLES20.glGetAttribLocation(mProgram, "position");
		mTextureCoordHandle = GLES20.glGetAttribLocation(mProgram, "inputTextureCoordinate");
		mColorHandle = GLES20.glGetUniformLocation(mProgram, "s_texture");

		GLES20.glEnableVertexAttribArray(mPositionHandle);
		GLES20.glVertexAttribPointer(mPositionHandle, COORDS_PER_VERTEX, GLES20.GL_FLOAT, false,vertexStride, vertexBuffer);

		GLES20.glActiveTexture(GLES20.GL_TEXTURE0);
		GLES20.glBindTexture(GLES11Ext.GL_TEXTURE_EXTERNAL_OES, texture);
		GLES20.glUniform1i(mColorHandle, 0);

		GLES20.glEnableVertexAttribArray(mTextureCoordHandle);
		GLES20.glVertexAttribPointer(mTextureCoordHandle, COORDS_PER_VERTEX, GLES20.GL_FLOAT, false,vertexStride, textureVerticesBuffer);

		GLES20.glDrawElements(GLES20.GL_TRIANGLES, drawOrder.length,
				GLES20.GL_UNSIGNED_SHORT, drawListBuffer);

		// Disable vertex array
		GLES20.glDisableVertexAttribArray(mPositionHandle);
		GLES20.glDisableVertexAttribArray(mTextureCoordHandle);
	}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants