freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

基于mfc的opengl編程-文庫(kù)吧資料

2024-08-23 17:35本頁(yè)面
  

【正文】 be//DrawglTranslatef(,)。IdentitymatrixtheglEnd()。glVertex2f(,)。glVertex2f(,)。glBegin(GL_POLYGON)。{if(m_bPolygon==TRUE)}glVertex2f(,)。glVertex2f(,)。glEnd()。glVertex2f(,)。glEnd()。glVertex2f(,)。glBegin(GL_POINTS)。CCY457OpenGLView::RenderScene}3,由于開(kāi)始繪制3維圖形,因此使用第一篇文章的OnSize()函數(shù)。TRUE。FALSE。m_bIcosahedron=FALSE。m_bTorus=CCY457OpenGLView::OnObjectsSimplecube()InvalidateRect(NULL,FALSE)。=m_bSimpleCube=FALSE。m_bTeapot=FALSE。m_bCube{//畫(huà)環(huán)面}voidFALSE。TRUE。m_bIcosahedron=FALSE。m_bTorus=CCY457OpenGLView::OnObjectsIcosahedron()InvalidateRect(NULL,FALSE)。=m_bSimpleCube=FALSE。m_bTeapot=TRUE。m_bCube{//畫(huà)立方體}voidFALSE。FALSE。m_bIcosahedron=FALSE。m_bTorus=CCY457OpenGLView::OnObjectsTeapot()}2,加入五個(gè)菜單項(xiàng)及其對(duì)應(yīng)的事件處理程序。=m_bSimpleCube=FALSE。m_bTeapot=FALSE。m_bCube=FALSE。FALSE。FALSE。ofm_bTriangle。ofm_bPolygon。ofm_bLine。ofm_bPoint。}}glVertex2f(,)。glVertex2f(,)。glVertex2f(,)。else}glVertex2f(,)。glVertex2f(,)。else}glVertex2f(,)。glBegin(GL_LINES)。{if(m_bLine==TRUE)glEnd()。glVertex2f(,)。glBegin(GL_POINTS)。CCY457OpenGLView::RenderScene::glLoadIdentity()。clearmatrixtheback//,::gluOrtho2D(,.01f,//::gluPerspective(,volumethe//::glMatrixMode(GL_PROJECTION)。itandprojectionselect(GLdouble)cx/(GLdouble)cy。aspect_ratioequaldimensionkeepthisaspectputecy)。0,clientthe//}cy0cx0ifratio//aspect_ratio。cy)。CView::OnSize(nType,{intintCCY457OpenGLView::OnSize(UINTInvalidateRect(NULL,FALSE)。=FALSE。m_bPolygon=FALSE。m_bPoint{//畫(huà)三角形}voidFALSE。m_bTriangle=FALSE。m_bLine=CCY457OpenGLView::OnShapesPolygon()InvalidateRect(NULL,FALSE)。=FALSE。m_bPolygon=FALSE。m_bPoint{//畫(huà)線}voidFALSE。m_bTriangle=FALSE。m_bLine=CCY457OpenGLView::OnShapesPoint()Triangle2,并且加入四個(gè)菜單項(xiàng)及其對(duì)應(yīng)的事件處理程序。//StatusBOOLPolygon//StatusBOOLLine//StatusBOOLPoint//Status頂點(diǎn)和基本圖元A vertex is nothing more than a coordinate in 2D or 3D space. In both 2D and 3D, when we draw an object we pose it with several smaller shapes called primitives which as 1 or 2 dimensional entities such as points, lines, and polygons. Each corner of an object posed of primitives is a vertex基本圖形繪制程序1,:BOOL視口The clipping area height and width will rarely match the width and height of the window in pixels. The coordinate system must therefore be mapped from logical Cartesian coordinates to physical screen coordinates. This mapping is specified by a setting known as the viewport, which is the region within the window39。}光榮在于平淡,艱巨因?yàn)槁L(zhǎng)《基于MFC的OpenGL編程》Part 3 Drawing Simple 2D Shapes 剪裁區(qū)域=to//Set}delete{if(m_pDC)DC//Delete}deleteMessageBox(Could{(m_hRC)==FALSE)rendering//Delete}RCnot==if(::wglMakeCurrentnoncurrenttheCView::OnDestroy()。{void}returnbackgrounderasenot//Tell{CCY457OpenGLView::OnEraseBkgnd(CDC*(){//第一個(gè)玩具嘛,先空著,后面慢慢填}8,試試改變窗口的大小,你會(huì)看到很?chē)?yán)重的閃爍,并且關(guān)閉程序后會(huì)報(bào)告內(nèi)存泄露,因此我們這就來(lái)解決這兩個(gè)問(wèn)題吧。}voidm_pDCGetSafeHdc()theNow::glFinish()。pipelineflushOpenGL//)。|::glClear(bufferscolorout//GetDocument()。pDocCCY457OpenGLView::OnDraw(CDC*4)若設(shè)置了雙緩沖,則交換前后臺(tái)緩沖區(qū)。2)繪制場(chǎng)景。::glLoadIdentity()。clearmatrixtheback//.01f,::gluPerspective(,volumethe//::glMatrixMode(GL_PROJECTION)。itandprojectionselect(GLdouble)cx/(GLdouble)cy。aspect_ratioequaldimensionkeepthisaspectputecy)。0,clientthe//}cy0cx0ifratio//aspect_ratio。cy)。CView::OnSize(nType,{intintCCY457OpenGLView::OnSize(UINT基本操作包括設(shè)置視口,選擇投影矩陣,設(shè)置模型視圖矩陣。}6,return}return==amp。::SetPixelFormat(m_pDCGetSafeHdc(),if}return0m_nPixelFormatifamp。=intmasks//0,//0,layer//auxiliary//0,bufferno16bit16,ignoredaccum0,0,accumulation//0,ignoredshiftalpha//0,ignoredcolor0,0,0,color//RGBAdoublesupportPFD_SUPPORT_OPENGLwindow//|versionthissize=PIXELFORMATDESCRIPTORFormat/////////////////////////////////////////////////////////////////////////////BOOL}//SetupreturnDepth::glClearDepth()。depthastheback//Specifyclearas//Specify}returnRCMessageBox(Error{m_hRC)==FALSE)(m_pDCGetSafeHdcRC//Make}returnCreating==Renderingto())。::wglCreateContextm_hRCContext//Create}return{if(!SetupPixelFormat())formatthetoFALSE。DC)。MessageBox(Error{NULL)if(m_pDCDCtoCClientDC(this)。=Clientfora}BOOLreturnOpenGL1。==if{CCY457OpenGLView::OnCreate(LPCREATESTRUCT在OnCreate中我們將通過(guò)建立像素格式和繪制上下文來(lái)初始化OpenGL. 在InitializeOpenGL()中會(huì)創(chuàng)建一個(gè)設(shè)備上下文(DC),為這個(gè)DC選擇一個(gè)像素格式,創(chuàng)建和這個(gè)DC相關(guān)的繪制上下文(RC),()來(lái)建立像素格式。theRenderScene()。PixelupSetupPixelFormat()。//InitializeBOOLContextm_pDC。//RenderingHGLRC:CView::PreCreateWindow(cs)。WS_CLIPCHILDREN。WS_CLIPSIBLINGSflagsthecreatedmustOpenGLCREATESTRUCTbystylesclasstheTODO:BOOLgl/2, 打開(kāi)ClassWizard,選擇CCY457OpenGLView類(lèi),為下述消息加入消息處理函數(shù):WM_CREATE (for OnCreate), WM_DESTROY (for OnDestroy), WM_SIZE (for OnSize), WM_ERASEBACKGROUND (for OnEraseBkground).3,在窗口創(chuàng)建之前我們必須設(shè)置窗口風(fēng)格包含WS_CLIPCHILDREN和 WS_CLIPSIBLINGS,從而避免OpenGL繪制到其他窗口中去。gl/includeHeadersinclud
點(diǎn)擊復(fù)制文檔內(nèi)容
環(huán)評(píng)公示相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1