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. RedHat Server Enterprise 6安装G++

    RedHat 6默认是安装有GCC,而没有安装G++编译 要安装G++前最好先查看下GCC的版本号,通常GCC的版本和G++的版本是相同的,知道GCC的版本再去找G++的安装文件就容易些,版本号有在安 ...

  2. 【LeetCode】129. Sum Root to Leaf Numbers

    Given a binary tree containing digits from 0-9 only, each root-to-leaf path could represent a number ...

  3. 系列文章--SQLite文章

    SQLite 随机取n行的方法   SQLite多线程写锁文件解决方案   sqlite和sql server语法上的一些区别   sqlite编程插入标示字段,获得新id   C# SQLiteHe ...

  4. 避免Android内存泄露

    摘自:http://blog.csdn.net/xyz_lmn/article/details/7108011 Android的应用被限制为最多占用16m的内存,至少在T-Mobile G1上是这样的 ...

  5. Python3中的http.client模块

    http 模块简介 Python3 中的 http 包中含有几个用来开发 HTTP 协议的模块. http.client 是一个底层的 HTTP 协议客户端,被更高层的 urllib.request ...

  6. CAN总线扩展数据帧介绍

    在扩展CAN 数据帧中,紧随SOF 位的是32 位的仲裁字段.仲裁字段的前11 位为29 位标识符的最高有效位(Most Significant bit,MSb)(基本lD) .紧随这11 位的是替代 ...

  7. mysql实战优化之五: 更新/插入优化 sql优化

    通常情况下,当访问某张表的时候,读取者首先必须获取该表的锁,如果有写入操作到达,那么写入者一直等待读取者完成操作(查询开始之后就不能中断,因此允许读取者完成操作).当读取者完成对表的操作的时候,锁就会 ...

  8. Java-Maven-Runoob:Maven 项目模板

    ylbtech-Java-Maven-Runoob:Maven 项目模板 1.返回顶部 1. Maven 项目模板 Maven 使用 archetype(原型) 来创建自定义的项目结构,形成 Mave ...

  9. An internal error occurred during: "Map/Reducelocation status updater".java.lang.NullPointerException

    当我们运行wordcount代码时,出现报错,如下所示: An internal error occurred during: "Map/Reducelocation status upda ...

  10. Vue源码学习(一):调试环境搭建

    最近开始学习Vue源码,第一步就是要把调试环境搭好,这个过程遇到小坑着实费了点功夫,在这里记下来 一.调试环境搭建过程 1.安装node.js,具体不展开 2.下载vue项目源码,git或svn等均可 ...