1.opening terminal window and entering the apt-get command for the packages:

  • sudo apt-get install mesa-common-dev
  • sudo apt-get install freeglut3-dev

2.Testing 

#include "GL/freeglut.h"
#include "GL/gl.h" /* display function - code from:
http://fly.cc.fer.hr/~unreal/theredbook/chapter01.html
This is the actual usage of the OpenGL library.
The following code is the same for any platform */
void renderFunction()
{
glClearColor(0.0, 0.0, 0.0, 0.0);
glClear(GL_COLOR_BUFFER_BIT);
glColor3f(1.0, 1.0, 1.0);
glOrtho(-1.0, 1.0, -1.0, 1.0, -1.0, 1.0);
glBegin(GL_POLYGON);
glVertex2f(-0.5, -0.5);
glVertex2f(-0.5, 0.5);
glVertex2f(0.5, 0.5);
glVertex2f(0.5, -0.5);
glEnd();
glFlush();
} /* Main method - main entry point of application
the freeglut library does the window creation work for us,
regardless of the platform. */
int main(int argc, char** argv)
{
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_SINGLE);
glutInitWindowSize(,);
glutInitWindowPosition(,);
glutCreateWindow("OpenGL - First window demo");
glutDisplayFunc(renderFunction);
glutMainLoop();
return ;
}

Setting up an OpenGL development environment in ubuntu的更多相关文章

  1. Establish the LAMP (Linux+Apache+MySQL+PHP) Development Environment on Ubuntu 14.04 Operating System

    ######################################################## Step One: Update the software package in yo ...

  2. [Django] Setting up Django Development Environment in Ubuntu 14.04

    1. Python Of course you will need Python. Still Python 2.7 is preferred, however if you would like t ...

  3. Programming in Go (Golang) – Setting up a Mac OS X Development Environment

    http://www.distilnetworks.com/setup-go-golang-ide-for-mac-os-x/#.V1Byrf50yM8 Programming in Go (Gola ...

  4. storm环境搭建(前言)—— 翻译 Setting Up a Development Environment

    Setting Up a Development Environment 搭建storm开发环境所需步骤: Download a Storm release , unpack it, and put ...

  5. Storm(1) - Setting Up Development Environment

    Setting up your development environment 1. download j2se 6 SDK from http://www.oracle.com/technetwor ...

  6. Install Qualcomm Development Environment

    安裝 Android Development Environment http://www.cnblogs.com/youchihwang/p/6645880.html 除了上述還得安裝, sudo ...

  7. Create A .NET Core Development Environment Using Visual Studio Code

    https://www.c-sharpcorner.com/article/create-a-net-core-development-environment-using-visual-studio- ...

  8. The IBM Blockchain Platform:Installing the development environment

    Follow these instructions to obtain the IBM Blockchain Platform: Develop development tools (primaril ...

  9. 1.3 PROGRAM DEVELOPMENT ENVIRONMENT

    1.3 PROGRAM DEVELOPMENT ENVIRONMENT 1.4 WIN32 EXECUTEABLE FILE FORMAT We should also know that compl ...

随机推荐

  1. 演示使用Metasploit入侵Android

    文本演示怎么使用Kali Linux入侵Android手机. Kali Linux IP地址:192.168.0.112:接收连接的端口:443. 同一局域网内android手机一部(android ...

  2. Kali Linux安装SSH Server

    Kali Linux默认并没有安装SSH服务,为了实现远程登录Kali Linux,我们需要安装SSH服务. 安装 OpenSSH Server # apt-get install openssh-s ...

  3. MpVue开发之框架的搭建

    npm install --global  vue-cli vue脚手架 vue init mpvue/mpvue-quickstart  my-project 创建一个基于mpvue-quickst ...

  4. [emwin]关于渐变色使用须知

    由于需要用到渐变色,且出现问题,所以对渐变色有了解. 相关函数 GUI_DrawGradientV GUI_DrawGradientH 须知: 1.渐变色在565色和888色下的显示完全不一样.在模拟 ...

  5. [转载]Lwip之IP/MAC地址冲突检测

    from: http://blog.csdn.net/tianjueyiyi/article/details/51097447 LWIP是个轻量级的TCP/IP协议栈,之所以说轻量级,是因为作者将主体 ...

  6. Redis设计与实现 (二): 链表

    Redis实现为双链表结构, 列表键的底层实现之一就是链表,  发布与订阅, 慢查询, 监视器等功能都用到了链表. Redis本身也使用链表维持多个客户端. 节点定义, 位于 adlist.h/lis ...

  7. 转载关于Qsys的 指令总线 和 数据总线

    1.关于Qsys的 指令总线 和 数据总线 连接的问题(data_master和instruction_master)   关于数据和指令端口的连接的疑问,这是初用Qsys的童鞋们很困惑的问题,之前使 ...

  8. BZOJ3507 [Cqoi2014]通配符匹配

    题意 几乎所有操作系统的命令行界面(CLI)中都支持文件名的通配符匹配以方便用户.最常见的通配符有两个,一个是星号("*"),可以匹配0个及以上的任意字符:另一个是问号(" ...

  9. 学大伟业DAY2模拟赛

    T1忍者钩爪 题目描述 小Q是一名酷爱钩爪的忍者,最喜欢飞檐走壁的感觉,有一天小Q发现一个练习使用钩爪的好地方,决定在这里大显身手. 场景的天花板可以被描述为一个无穷长的数轴,初始小Q挂在原点上.数轴 ...

  10. gatsbyjs 使用

    1. 安装 npm install --global gatsby-cli 2. 使用 // 创建项目 gatsby new dalong cd dalong // 启动 gatsby develop ...