游戏开发论坛

 找回密码
 立即注册
搜索
查看: 1914|回复: 0

为什么不同视区下显示的效果不一样?

[复制链接]

21

主题

109

帖子

109

积分

注册会员

Rank: 2

积分
109
发表于 2003-11-30 00:06:00 | 显示全部楼层 |阅读模式
void display(void)
{
   glClear (GL_COLOR_BUFFER_BIT);
   glColor3f (0.9, 0.8, 0.9);

   

   //glMatrixMode(GL_MODELVIEW);
   glLoadIdentity ();             /* clear the matrix */
           /* viewing transformation  */
   
   gluLookAt (0.0, 0.0, 5.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0);
       /* modeling transformation */
   
   
   //glTranslatef(0.0,0.0,-5.0);
   //glRotatef(45.0,0.0,1.0,0.0);
   glScalef (1.0, 2.0, 1.0);

   
   glMatrixMode (GL_PROJECTION);
   glLoadIdentity ();
   //glFrustum (-1.0, 1.0, -1.0, 1.0, 1.5, 20.0);
   gluPerspective(75.0,1.0,1.5,20.0);
   
   glViewport(0,0,100,100);
   glutWireCube (1.0);
   
   
   glViewport(100,0,200,100);
   glutWireCube(1.0);

   glViewport(200,0,300,100);
   glutWireCube(1.0);
   
   glFlush ();

}
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

作品发布|文章投稿|广告合作|关于本站|游戏开发论坛 ( 闽ICP备17032699号-3 )

GMT+8, 2025-4-21 15:45

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表