#include <stdlib.h>
#include <stdio.h>
#include <GL/glut.h>
#include <GL/glu.h>
using namespace std;
GLdouble wx,wy,wz;/*returned world x,y,z coords */
void init(void)
{
glClearColor(0,0,0,0);
glShadeModel(GL_FLAT);
}
void display(void)
{
//printf("use display\n");
glClear(GL_COLOR_BUFFER_BIT);
// float mat[16];
// glGetFloatv(GL_MODELVIEW_MATRIX, mat);
// glColor3f(1,1,0);
// glPointSize(10);
// glVertex2f(0.1,0.1);
// for(int i=0;i<16;++i)
// {
// printf("%f ",mat[i]);
// }
// printf("\n");
//glGetFloatv(GL_PROJECTION_MATRIX, mat);
// for(int i=0;i<16;++i)
// {
// printf("%f ",mat[i]);
// }
// printf("\n");
//glTranslatef(-0.5f,-0.5f,-1.0f);
glColor3f(0,1,0);
glPointSize(5);
glBegin(GL_POINTS);
glVertex3f(0,1.1,0);//任意一个>1的分量都不会被显示
glEnd();
glutSwapBuffers();
}
void reshape(int w,int h)
{
//printf("use reshap
小白学opengl之gluLookAt函数例子
最新推荐文章于 2023-02-05 21:44:08 发布