⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 callback.c

📁 opengl source code download
💻 C
字号:
#include <windows.h>
#include <GL/gl.h>
#include <GL/glu.h>
#include <GL/glaux.h>

void myInit();
void CALLBACK myReshape(GLsizei w,GLsizei h);
void CALLBACK myDispaly(void);

void myInit()
{
    auxInitDisplayMode (AUX_SINGLE | AUX_RGB);
    auxInitPosition (0, 0, 300, 300);
    auxInitWindow ("Simple OpengGL Sample");
    glClearColor (0.0, 0.0, 0.0, 0.0);
}

void CALLBACK myReshape(GLsizei w,GLsizei h)
{
//	glViewport(0,0,w,h);
}

void CALLBACK myDispaly(void)
{
    glClear(GL_COLOR_BUFFER_BIT);
    glColor3f(1.0, 1.0, 1.0);
//	glRotatef(60.f,1.f,1.f,1.f);
	auxWireSphere(0.5f);
//	auxWireSphere(50.f);
//	auxWireCone(0.5,1.0);
    glFlush();
}


void main()
{
    myInit();
	auxReshapeFunc(myReshape);
	auxMainLoop(myDispaly);
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -