opengl怎么画球?#include "windows.h"#define GLUT_DISABLE_ATEXIT_HACK#include #include void display(){glClear(GL_COLOR_BUFFER_BIT);glMatrixMode(GL_MODELVIEW); glLoadIdentity(); glColor3f( 1.0f,1.0f,1.0f );glutSolidSphere( 50.f,15,15 ); glutSwapBuff

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/15 17:59:58
opengl怎么画球?#include
xmkPǿʥIW 6}0RX['ܤMMVe ՉldPwiKM&bWpsswnX#wu f$zn'd AEh6"_o A{ě @FC^2MU4("\Mf\/\Ud0Ȩ֊%_ZOUtIeMdNA5S*xA'ˬFȀl+a)Q}F2E ?@\^5% 'ʸP0󍬢[͉Aaኰ K3F"j+jKnx46h

opengl怎么画球?#include "windows.h"#define GLUT_DISABLE_ATEXIT_HACK#include #include void display(){glClear(GL_COLOR_BUFFER_BIT);glMatrixMode(GL_MODELVIEW); glLoadIdentity(); glColor3f( 1.0f,1.0f,1.0f );glutSolidSphere( 50.f,15,15 ); glutSwapBuff
opengl怎么画球?
#include "windows.h"
#define GLUT_DISABLE_ATEXIT_HACK
#include
#include
void display(){
glClear(GL_COLOR_BUFFER_BIT);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
glColor3f( 1.0f,1.0f,1.0f );
glutSolidSphere( 50.f,15,15 );
glutSwapBuffers();
}
int main(int argc,char* argv[]){
glutInit(&argc,argv);
glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB);
glutCreateWindow("小球");
glClearColor(0.0f,1.0f,1.0f,1.0f);
glutDisplayFunc(display);
glutMainLoop();
return 0;
}
高手给看看什么地方不对了,怎么改,屏幕上是空白的

opengl怎么画球?#include "windows.h"#define GLUT_DISABLE_ATEXIT_HACK#include #include void display(){glClear(GL_COLOR_BUFFER_BIT);glMatrixMode(GL_MODELVIEW); glLoadIdentity(); glColor3f( 1.0f,1.0f,1.0f );glutSolidSphere( 50.f,15,15 ); glutSwapBuff
你的glutSolidSphere中的第一个参数太大,要小于1才能看到