• <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
            亚洲?V乱码久久精品蜜桃| 中文成人久久久久影院免费观看| 久久精品亚洲一区二区三区浴池| 色婷婷综合久久久久中文一区二区| av无码久久久久不卡免费网站| 久久精品黄AA片一区二区三区| 99热成人精品热久久669| 国产2021久久精品| 亚洲国产成人精品久久久国产成人一区二区三区综 | 久久久久久久精品成人热色戒| 狠狠色丁香久久婷婷综合蜜芽五月| 一本久久免费视频| 久久久久人妻一区精品| 久久精品aⅴ无码中文字字幕重口 久久精品a亚洲国产v高清不卡 | 国内精品久久久久久久久电影网 | 色天使久久综合网天天| 久久www免费人成看片| 久久精品国产99国产电影网| 亚洲国产成人久久笫一页| 久久久久久久人妻无码中文字幕爆| 国产福利电影一区二区三区久久久久成人精品综合 | 色综合色天天久久婷婷基地| 亚洲天堂久久久| 久久精品一区二区影院 | 热久久视久久精品18| 亚洲午夜精品久久久久久人妖| 伊人久久大香线蕉av一区| 久久精品综合一区二区三区| 久久国产亚洲高清观看| 欧美大战日韩91综合一区婷婷久久青草 | 国产精品VIDEOSSEX久久发布| 久久影院综合精品| 久久青青草视频| 综合久久精品色| 久久一区二区免费播放| 久久99久久无码毛片一区二区| 成人久久综合网| 久久精品国产91久久麻豆自制| 99精品久久精品| 欧美久久精品一级c片片| 狠狠色丁香婷婷综合久久来|