• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            Shuffy

            不斷的學習,不斷的思考,才能不斷的進步.Let's do better together!
            posts - 102, comments - 43, trackbacks - 0, articles - 19

            《基于MFC的OpenGL編程》Part 1 A Primer

            Posted on 2010-03-31 20:18 Shuffy 閱讀(274) 評論(0)  編輯 收藏 引用 所屬分類: MFC,OpenGL

            3D圖形學基本概念

            Perspective

            Perspective refers to the angles between the lines that lend the illusion of three dimensions.

            Colors and Shading

            Moving beyond line drawing, we need to add color to create a solid object. Shading refers to the way the color is applied to the polygon. Shading can be of two types in OpenGL - Flat or Smooth.

            Lights and Shadows

            Plain solid color doesn’t offer enough realism. By applying Lighting effects we can make objects appear as they would in reality depending on their material properties and the lighting parameters. Adding a shadow further increases realism.

            Texture Mapping

            With Texture Mapping we can have wood grains, cloth textures, brick like textures etc instead of plain materials. This technique of applying an image to the surface of a polygon is called Texture Mapping. The image we use is called the Texture and the individual elements of the texture are called Texels.

            Fog

            Fog is an atmospheric effect that adds haziness to objects in a scene depending on how far the objects are from the viewer.

            Blending and Transparency

            Blending is the combination of colors of objects on the screen. This effect can be used for a variety of purposes. By varying the amount each object is blended with the scene we can make objects look transparent.

            Anti-Aliasing

            Aliasing is an effect that is visible on screen due to the fact that an image consists of discrete pixels. By carefully blending the lines with the background color we can eliminate jagged edges and give them a smooth appearance. This blending technique is called anti-aliasing.

            第一個OpenGL程序

            //Simple.cpp - First OpenGL Program
            #include <windows.h> //Required for every Windows Program
            #include <gl\glut.h> //Required for using the GLUT library     
            //Perform OpenGL Initialization here 
            void SetupRC()
            {
                
            //Set the background clearing color to blue
                glClearColor(0.0f,0.0f,1.0f,1.0f);//設置背景色為藍色
            }
            //The drawing callback function
            void RenderScene()
            {
                
            //Clear the color buffer 
                glClear(GL_COLOR_BUFFER_BIT);
                
            //Flush the rendering pipeline
                glFlush();
            }
            void main()
            {
                
            //Choose the display mode settings
                glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB);//初始化顯示模式(單緩沖,RGB)
                
            //Create the Window
                glutCreateWindow("Simple");//創建窗口
                
            //Set the RenderScsne function as the display callback
                glutDisplayFunc(RenderScene);//繪制回調函數,當窗口需要繪制時,GLUT會調用此函數
                
            //Initialize OpenGL
                SetupRC();//初始化OpenGL
                
            //Start the GLUT framework
                glutMainLoop();//開始消息循環
            }

             

            作者:洞庭散人

            出處:http://phinecos.cnblogs.com/    

            本文版權歸作者和博客園共有,歡迎轉載,但未經作者同意必須保留此段聲明,且在文章頁面明顯位置給出原文連接,否則保留追究法律責任的權利。
            原文鏈接:http://www.cnblogs.com/phinecos/archive/2008/11/04/1326648.html
            亚洲国产天堂久久综合| 国产精品久久永久免费| 久久人人爽人人爽AV片| 女人高潮久久久叫人喷水| 狠狠色丁香久久婷婷综合五月| 久久久久亚洲AV成人网人人软件| 久久久久亚洲av无码专区导航 | 亚洲人成无码网站久久99热国产| 久久亚洲精品无码播放| 免费无码国产欧美久久18| 国产精品久久久久9999| 2021最新久久久视精品爱| 国产成人久久激情91| 久久久久亚洲精品日久生情 | 7777精品伊人久久久大香线蕉| 久久夜色精品国产| 久久国产精品成人影院| 日韩欧美亚洲综合久久影院Ds| 久久久无码精品亚洲日韩蜜臀浪潮| 久久久国产乱子伦精品作者| 久久国产高清字幕中文| 中文国产成人精品久久不卡| 中文字幕无码av激情不卡久久| 久久99精品久久久久久动态图| 欧美久久久久久午夜精品| 久久久老熟女一区二区三区| 久久婷婷色综合一区二区| 国产精品成人99久久久久 | 国产A级毛片久久久精品毛片| 国产精品伦理久久久久久| 日本强好片久久久久久AAA| 蜜桃麻豆WWW久久囤产精品| 国产精品久久久久乳精品爆| 国产成人综合久久精品尤物| 欧美一区二区精品久久| 久久夜色精品国产亚洲| 久久精品成人免费看| 中文字幕成人精品久久不卡 | 国内精品久久久久久久久| 99久久精品国产高清一区二区| 成人午夜精品无码区久久|