小编Did*_*min的帖子

使用OpenGL绘制随机点/星星?

我试图在窗口中绘制一些随机点作为星星,但点数没有显示.但其他对象正确显示.

我的源代码:

#include<windows.h>
#include <GL\glut.h>
#include <math.h>      // For math routines (such as sqrt & trig).
GLfloat xRotated, yRotated, zRotated;
GLdouble  radius=3;

GLfloat qaBlack[] = {0.0, 0.0, 0.0, 1.0}; //Black Color
GLfloat qaGreen[] = {0.0, 1.0, 0.0, 1.0}; //Green Color
GLfloat qaWhite[] = {1.0, 1.0, 1.0, 1.0}; //White Color
GLfloat qaRed[] = {1.0, 0.0, 0.0, 1.0}; //Red Color

// Set lighting intensity and color

GLfloat qaSpecularLight[]    = {1.0, 1.0, 1.0, 1.0};
GLfloat emitLight[] = {0.9, 0.9, 0.9, 0.9};
GLfloat Noemit[] …
Run Code Online (Sandbox Code Playgroud)

c c++ opengl glut

3
推荐指数
1
解决办法
840
查看次数

标签 统计

c ×1

c++ ×1

glut ×1

opengl ×1