小编Har*_*ari的帖子

打开gl窗口没有显示?

#include <iostream>
#include <stdio.h>
#include <GL/glut.h>
#include <windows.h>
#include <math.h>

using namespace std;
void display(void) {
    float cx = 200, cy = 200, rad = 50;
    float startx = cx - rad;
    float starty = cy;
    int x = startx, y = starty;

    glColor3f(1.0f, 0.0f, 0.0f);
    glBegin(GL_POINTS);
    glVertex2f((x - 250.f) / 250.f, (250.f - y) / 250.f);

    while (x < cx + rad) {    
        x++;
        y = cy - sqrt(rad * rad - (x - cx) * (x - cx)); …
Run Code Online (Sandbox Code Playgroud)

c c++ opengl graphics

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

标签 统计

c ×1

c++ ×1

graphics ×1

opengl ×1