#include "stdafx.h"
#include <GL/glut.h>
#include <stdlib.h>
#include <math.h>
#include <stdio.h> void myDisplay(void) {
glClear(GL_COLOR_BUFFER_BIT);
glPointSize(5.0f); //修改点的尺寸,默认大小为1.0f
glBegin(GL_POINTS);
glVertex2f(0.0f, 0.0f);
glVertex2f(0.5f, 0.5f);
glVertex2f(-0.5f, 0.0f);
glEnd();
glFlush();
} int main(int argc, char *argv[]){
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_RGB | GLUT_SINGLE);
glutInitWindowPosition(, );
glutInitWindowSize(, );
glutCreateWindow("OpenGL画圆程序");
glutDisplayFunc(&myDisplay);
glutMainLoop();
return ;
}

运行结果:

【openGL】关于画点的更多相关文章

  1. 【openGL】画五角星

    #include "stdafx.h" #include <GL/glut.h> #include <stdlib.h> #include <math ...

  2. 【openGL】画圆

    #include "stdafx.h" #include <GL/glut.h> #include <stdlib.h> #include <math ...

  3. 【OpenGL】画立方体

    编写一个程序,该程序运行时可以用鼠标的一个按键调整立方体的方向,用另一个按键平移立方体,用第三个按键缩放立方体. 这是题目,我的程序不一定完全按照这个来.初学OpenGL,对那一堆坐标系表示十分混乱, ...

  4. openGL笔记-画基本图形

    #include "iostream" #include <GL/glut.h> #include<cmath> #include<vector> ...

  5. Android OpenGL ES 画球体

    近期由于兴趣所向.開始学习OpenGL绘图. 本文以"画球体"为点,小结一下近期所学. > 初识OpenGL ES 接触OpenGL是从Android開始的.众所周知,And ...

  6. 【openGL】画正弦函数图像

    #include "stdafx.h" #include <GL/glut.h> #include <stdlib.h> #include <math ...

  7. 【openGL】画直线

    #include "stdafx.h" #include <GL/glut.h> #include <stdlib.h> #include <math ...

  8. OpenGL ES 画直线代码实例

    http://blog.csdn.net/yexiaozi_007/article/details/7978620 以画xyz坐标轴为例,很多人会遇到用glcolor设置了颜色,但是直线画出来还是黑色 ...

  9. CSharpGL(31)[译]OpenGL渲染管道那些事

    CSharpGL(31)[译]OpenGL渲染管道那些事 +BIT祝威+悄悄在此留下版了个权的信息说: 开始 自认为对OpenGL的掌握到了一个小瓶颈,现在回头细细地捋一遍OpenGL渲染管道应当是一 ...

  10. OpenGL快问快答

    OpenGL快问快答 本文内容主要来自对(http://www.opengl.org/wiki/FAQ)的翻译,随机加入了本人的观点.与原文相比,章节未必完整,含义未必雷同,顺序未必一致.仅供参考. ...

随机推荐

  1. 11.5---含有空字符串的字符串查找(CC150)

    注意,1,"" 和 " ".是不同的,空字符串指的是"": 2,注意String的compareTo.小于是指<0.并不是==-1: ...

  2. thinkphp的各种内部函数 D()、F()、S()、C()、L()、A()、I()

    D() 加载Model类 M() 加载Model类 A() 加载Action类 L() 获取语言定义 C() 获取配置值    用法就是   C("这里填写在配置文件里数组的下标" ...

  3. 【leetcode】Longest Valid Parentheses

    Longest Valid Parentheses Given a string containing just the characters '(' and ')', find the length ...

  4. mybatis Result Maps collection already contains value for com.ebways.dictionary.dao.impl.PtInfoDaoImpl.beanMap

    java.lang.IllegalStateException: Failed to load ApplicationContext at org.springframework.test.conte ...

  5. 【转】Nginx服务器的反向代理proxy_pass配置方法讲解

    [转]Nginx服务器的反向代理proxy_pass配置方法讲解 转自:http://www.jb51.net/article/78746.htm 就普通的反向代理来讲Nginx的配置还是比较简单的, ...

  6. 20. javacript高级程序设计-JSON

    1. JSON JSON是一种数据格式,存在以下三种类型的值: l 简单值:使用与JavaScript相同的语法,可以在JSON中表示字符串.数值.布尔值和null,不支持 undefined,例如: ...

  7. UIWebView内嵌网页 Xcode7.0以后的用法

    UIWebView* webPage=[[UIWebView alloc]initWithFrame:CGRectMake(0, 0, screenWidth, screenHeight-64)]; ...

  8. 2078 Problem H Secret Message 中石油-未提交-->已提交

    题目描述 Jack and Jill developed a special encryption method, so they can enjoy conversations without wo ...

  9. linux查看系统版本和系统位数

    1. uname -a you will view  kernel name.network node hostname.kernel release.kernel version.machine h ...

  10. IOS- 自定义 UIButton

    #pragma mark init方法内部默认会调用initWithFrame: - (id)initWithFrame:(CGRect)frame { self = [super initWithF ...