mesa(OpenGL)安装
来源:互联网 发布:守望先锋生涯数据分析 编辑:程序博客网 时间:2024/05/22 06:34
Mesa是一个类OpenGL(http://www.opengl.org)的开源实现
环境:
centos 7
安装方法1:
步骤
问题及解决:
在“./configure“时报告以下错误:
Requested ‘libdrm_intel >= 2.4.61’ but version of libdrm_intel is 2.4.60
解决方法:安装libdrm更高版本,找到这个程序的pc文件,在控制台添加其路径:
export PKG_CONFIG_PATH=/usr/lib/pkgconfig
安装方法2:
yum install mesa*
yum install glut
安装测试:
查看是否支持3D渲染:
glxinfo |grep rendering
查看glx的安装信息:
glxinfo |grep “OpenGL vendor”
glxinfo |grep “OpenGL version”
/* * As a first example of using OpenGL in C, this program draws the * classic red/green/blue triangle. It uses the default OpenGL * coordinate system, in which x, y, and z are limited to the range * -1 to 1, and the positive z-axis points into the screen. Note * that this coordinate system is hardly ever used in practice. * * When compiling this program, you must link it to the OpenGL library * and to the glut library. For example, in Linux using the gcc compiler, * it can be compiled with the command: * * gcc -o first-triangle first-triangle.c -lGL -lglut */#include <GL/gl.h>#include <GL/glut.h> // freeglut.h might be a better alternative, if available.void display() { // Display function will draw the image. glClearColor( 0, 0, 0, 1 ); // (In fact, this is the default.) glClear( GL_COLOR_BUFFER_BIT ); glBegin(GL_TRIANGLES); glColor3f( 1, 0, 0 ); // red glVertex2f( -0.8, -0.8 ); glColor3f( 0, 1, 0 ); // green glVertex2f( 0.8, -0.8 ); glColor3f( 0, 0, 1 ); // blue glVertex2f( 0, 0.9 ); glEnd(); glutSwapBuffers(); // Required to copy color buffer onto the screen.}int main( int argc, char** argv ) { // Initialize GLUT and glutInit(&argc, argv); glutInitDisplayMode(GLUT_SINGLE); // Use single color buffer and no depth buffer. glutInitWindowSize(500,500); // Size of display area, in pixels. glutInitWindowPosition(100,100); // Location of window in screen coordinates. glutCreateWindow("GL RGB Triangle Setup Test"); // Parameter is window title. glutDisplayFunc(display); // Called when the window needs to be redrawn. glutMainLoop(); // Run the event loop! This function does not return. // Program ends when user closes the window. return 0;}
0 0
- mesa opengl 安装
- 编译安装 Mesa (OpenGL)
- mesa(OpenGL)安装
- [OpenGL] CentOS7 安装 mesa
- [OpenGL] CentOS7 安装 mesa
- [OpenGL] CentOS7 安装 mesa
- [OpenGL] CentOS7 安装 mesa
- [OpenGL] CentOS7 安装 mesa
- linux下安装openGL(mesa)
- linux下OpenGL开发:(一)Mesa的安装和问题解决
- Mesa, OpenGL and VMware
- 【OpenGL】MIPS平台上Linux系统中安装OpenGL 2.0库(Mesa库)
- 用mesa模拟OpenGL 2.0
- opengl(mesa) for ubuntu14.04
- OpenGL和Mesa的关系
- ubuntu 安装mesa
- ubuntu 上安装mesa
- Ubuntu10.04安装Mesa及使用OpenGL超级宝典第五版demo程序
- Android中string.xml,动态改变数据方法
- Mybatis事务管理-jdbc事务
- 自定义dialog
- 特征值与特征向量2
- android推送解决方案
- mesa(OpenGL)安装
- 杭电1102Constructing Roads(kruskal)(最小生成树)
- 树莓派安装wiringPi开发库
- 例题5-2 UVA 101 The Blocks Problems 木块问题
- JSONP
- 《算法导论》实验六:红黑树插入算法(C++)——控制台树型显示
- 02 Counting Elements
- android的armeabi和armeabi-v7a
- Swift - 告警提示框(UIAlertController)的用法