最简单的OpenGL播放视频的例子(OpenGL播放RGB/YUV)
Simplest Video Play OpenGL (OpenGL play RGB/YUV)
雷霄骅 Lei Xiaohua
leixiaohua1020@126.com
中国传媒大学/数字电视技术
Communication University of China / Digital TV Technology
http://blog.csdn.net/leixiaohua1020
本程序使用OpenGL播放RGB/YUV视频像素数据。本程序实际上只能
播放RGB(RGB24,BGR24,BGRA)数据。如果输入数据为YUV420P
数据的话,需要先转换为RGB数据之后再进行播放。
本程序是最简单的使用OpenGL播放像素数据的例子,适合OpenGL新手学习。
函数调用步骤如下:
[初始化]
glutInit():初始化glut库。
glutInitDisplayMode():设置显示模式。
glutCreateWindow():创建一个窗口。
glutDisplayFunc():设置绘图函数(重绘的时候调用)。
glutTimerFunc():设置定时器。
glutMainLoop():进入消息循环。
[循环渲染数据]
glRasterPos3f(),glPixelZoom():调整显示位置,图像大小。
glDrawPixels():绘制。
glutSwapBuffers():显示。
This software plays RGB/YUV raw video data using OpenGL. This
software support show RGB (RGB24, BGR24, BGRA) data on the screen.
If the input data is YUV420P, it need to be convert to RGB first.
This program is the simplest example about play raw video data
using OpenGL, Suitable for the beginner of OpenGL.
The process is shown as follows:
[Init]
glutInit():Init glut library.
glutInitDisplayMode(): Set display mode.
glutCreateWindow(): Create a window.
glutDisplayFunc(): Set the display callback.
glutTimerFunc(): Set timer.
glutMainLoop(): Start message loop.
[Loop to Render data]
glRasterPos3f(),glPixelZoom(): Change picture's size and position.
glDrawPixels(): draw.
glutSwapBuffers(): show.
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
opengl 渲染,可旋转+水印+显示文字 (321个子文件)
cmake_install.cmake 1KB
DependInfo.cmake 712B
CMakeDirectoryInformation.cmake 618B
cmake_clean.cmake 304B
CTestTestfile.cmake 263B
simplest_video_play_opengl.cpp 31KB
glm.cpp 8KB
dummy.cpp 5KB
glew32.dll 330KB
glut32.dll 166KB
glu32.dll 162KB
simplest_video_play_opengl.vcxproj.filters 1KB
.gitignore 25B
glew.h 904KB
GL.h 67KB
glxew.h 67KB
wglew.h 61KB
matrix.h 39KB
glut.h 21KB
GLU.h 18KB
platform.h 13KB
common.h 7KB
geometric.h 4KB
integer.h 4KB
exponential.h 365B
vector_relational.h 139B
trigonometric.h 136B
packing.h 129B
fwd.hpp 79KB
vec_swizzle.hpp 74KB
_swizzle.hpp 48KB
matrix_transform.hpp 45KB
type_mat.hpp 40KB
packing.hpp 35KB
_swizzle_func.hpp 34KB
type_aligned.hpp 33KB
setup.hpp 28KB
type_aligned.hpp 27KB
common.hpp 27KB
type_vec.hpp 26KB
type_precision.hpp 24KB
type_vec4.hpp 17KB
compatibility.hpp 15KB
type_vec3.hpp 14KB
matrix_integer.hpp 14KB
quaternion.hpp 13KB
type_vec2.hpp 13KB
vec1.hpp 12KB
_features.hpp 11KB
packing.hpp 11KB
trigonometric.hpp 10KB
integer.hpp 10KB
dual_quaternion.hpp 9KB
type_int.hpp 9KB
bitfield.hpp 8KB
extended_min_max.hpp 8KB
associated_min_max.hpp 7KB
io.hpp 7KB
type_ptr.hpp 7KB
round.hpp 7KB
type_mat4x4.hpp 7KB
type_mat3x3.hpp 6KB
vector_relational.hpp 6KB
quaternion.hpp 6KB
type_mat2x2.hpp 6KB
matrix.hpp 6KB
type_mat4x3.hpp 6KB
exponential.hpp 5KB
type_mat3x4.hpp 5KB
type_mat4x2.hpp 5KB
geometric.hpp 5KB
type_mat3x2.hpp 5KB
type_mat2x4.hpp 5KB
type_mat2x3.hpp 5KB
type_gentype.hpp 5KB
euler_angles.hpp 5KB
vector_relational.hpp 4KB
type_trait.hpp 4KB
constants.hpp 4KB
glm.hpp 4KB
matrix_major_storage.hpp 4KB
rotate_vector.hpp 3KB
reciprocal.hpp 3KB
transform2.hpp 3KB
_vectorize.hpp 3KB
intersect.hpp 3KB
hash.hpp 3KB
fast_exponential.hpp 3KB
bit.hpp 3KB
ext.hpp 3KB
fast_square_root.hpp 3KB
mat3x3.hpp 3KB
mat4x4.hpp 3KB
mat2x2.hpp 3KB
matrix_factorisation.hpp 3KB
type_float.hpp 3KB
matrix_query.hpp 3KB
random.hpp 3KB
matrix_transform_2d.hpp 2KB
matrix_operation.hpp 2KB
共 321 条
- 1
- 2
- 3
- 4
资源评论
- 天舒2018-11-06不咋地,不值
悟空悟静
- 粉丝: 9
- 资源: 9
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 基于 Java的扫雷程序毕业设计
- axure9 里面有码 axure9 里面有码
- 551-2404242311-1.amr
- 自己搭建的关于springboot整合mybatis的框架.zip
- 这是一个保存Springboot+MyBaits项目的仓库.zip
- tensorflow-gpu-2.7.2-cp39-cp39-manylinux2010-x86-64.whl
- tensorflow-2.7.4-cp38-cp38-manylinux2010-x86-64.whl
- tensorflow-gpu-2.7.4-cp38-cp38-manylinux2010-x86-64.whl
- 詹佳 陈敏 口语2.mp3
- 图书管理系统毕业设计Java语言实现
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功