Android OpenGL Play Video Learning

Source: Internet
Author: User

1. Initial contact with open GL:
Http://www.cnblogs.com/TerryBlog/archive/2010/07/09/1774475.html
Use Glsurfaceview and render to implement a simple triangle and a square. Where Glsurfaceview is used to display the view, render is used for 3D rendering. The Code of this blog, run-time will be reported:
Java.lang.IllegalArgumentException:Must use a native order direct Buffer
is because vertex buffer needs to be initialized in the following way:
  

Private Static Final intFloat_size_bytes = 4;PrivateFloatbuffer mtrianglevertices;Private Final float[] Mtriangleverticesdata = {            //X, Y, Z, U, V-1.0f, -1.0f, 0, 0.F, 0. F,1.0f, -1.0f, 0, 1.f, 0. F,-1.0f, 1.0f, 0, 0.F, 1. F,1.0f, 1.0f, 0, 1.F, 1. F,}; Public voidinit () {mtrianglevertices=Bytebuffer.allocatedirect (Mtriangleverticesdata.length*float_size_bytes). Order (Byteorder.nativeorder ()). Asfloatbuffer (); Mtrianglevertices.put (Mtriangleverticesdata). Position (0);}


2,android OpenGL ES Tutorial
Http://blog.csdn.net/column/details/apidemoopengl.html?&page=3
--mainly includes some simple uses of OpenGL ES 1.0 and 2.0.


http://www.jayway.com/2009/12/03/opengl-es-tutorial-for-android-part-i/

--a foreign friend's Android OpenGL es Tutorial.


3, Android about Surfaceview, Glsurfaceview, surfacetexture, texture several view usage and differences (display the video interface).
Http://www.wfuyu.com/technology/22762.html


4, GLSL Tutorial (Shading language)
http://blog.csdn.net/racehorse/article/details/6593719


5, use Textureview, Surfacetexture,opengl es to play a video tutorial:
Http://www.jianshu.com/p/d3d3186eefcb
Http://www.jianshu.com/p/b2d949ab1a1a
http://www.jianshu.com/p/291ff6ddc164

Android OpenGL Play Video Learning

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.