• <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

            不斷的學(xué)習(xí),不斷的思考,才能不斷的進(jìn)步.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 閱讀(264) 評論(0)  編輯 收藏 引用 所屬分類: MFC,OpenGL

            3D圖形學(xué)基本概念

            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);//設(shè)置背景色為藍(lán)色
            }
            //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");//創(chuàng)建窗口
                
            //Set the RenderScsne function as the display callback
                glutDisplayFunc(RenderScene);//繪制回調(diào)函數(shù),當(dāng)窗口需要繪制時,GLUT會調(diào)用此函數(shù)
                
            //Initialize OpenGL
                SetupRC();//初始化OpenGL
                
            //Start the GLUT framework
                glutMainLoop();//開始消息循環(huán)
            }

             

            作者:洞庭散人

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

            本文版權(quán)歸作者和博客園共有,歡迎轉(zhuǎn)載,但未經(jīng)作者同意必須保留此段聲明,且在文章頁面明顯位置給出原文連接,否則保留追究法律責(zé)任的權(quán)利。
            原文鏈接:http://www.cnblogs.com/phinecos/archive/2008/11/04/1326648.html
            久久久这里只有精品加勒比| 国产韩国精品一区二区三区久久| 国产高潮国产高潮久久久91 | 久久91精品国产91久久麻豆| 国产亚洲精品自在久久| 日本精品久久久久中文字幕8| 国产99久久久久久免费看| 亚洲中文字幕伊人久久无码| 国产精品美女久久久久| 人妻系列无码专区久久五月天| 精品无码久久久久国产动漫3d| 久久香蕉一级毛片| 久久人妻AV中文字幕| 91精品无码久久久久久五月天| 亚洲国产日韩欧美久久| AAA级久久久精品无码区| 午夜欧美精品久久久久久久| 久久久久久A亚洲欧洲AV冫 | 久久综合丁香激情久久| 久久人妻少妇嫩草AV蜜桃| 人妻无码久久精品| 久久精品国产99国产精品澳门 | 久久久久人妻精品一区 | 777米奇久久最新地址| 久久精品国产色蜜蜜麻豆| 久久青青国产| 久久人人爽人爽人人爽av| 久久99中文字幕久久| 国产成人久久激情91| 精品无码久久久久国产| 性色欲网站人妻丰满中文久久不卡 | 久久乐国产综合亚洲精品| 久久久久久无码国产精品中文字幕 | 久久人人爽人人澡人人高潮AV| 精品国产综合区久久久久久 | 美女久久久久久| 人人狠狠综合久久亚洲| 精品久久久久久无码国产| 久久久WWW免费人成精品| 久久久国产精品| 7777精品伊人久久久大香线蕉|