-
Category : OpenGL program
Tags :
- Update : 2012-11-26
- Size : 106kb
- Downloaded :0次
- Author :杨****
- About :
Nobody
- PS : If download it fails, try it again. Download again for free!
Introduction - If you have any usage issues, please Google them yourself
I want to realize the 3d display of 2d images for the sake of image processing, so I have written this code and I hope to share it with interested readers. The image is obtained from the BMP image file, and the second is from the clipboard. This code calls the OpenGL library function in the MFC to realize the three-dimensional display of the two-dimensional image, the width of the image, the height of the image and the brightness of the pixel are respectively the x,z and y coordinates of the three-dimensional space. The program mainly has initialization, mapping, resource release, and operation parts, which are implemented in ogl_mfcview.cpp files. OpenGL library initialization in the file OnCreate, InitScene and DrawScene function implementation, main initialize OpenGL runtime environment variables, illumination of the 3-d objects, materials, etc., due to a lot of document introduces OpenGL library initialization, here I am not much said, interested readers can refer to the relevant documents. Call the global function GLDraw3DBMP to complete the drawing part in the DrawScene function.
When you compile the source code, you must link the opengl32.lib glu32. Lib to the project.
You can change the material through the dialog box. Press the arrow keys to rotate the x axis of the 3d image, and the right and left arrow keys can be used to rotate the z-axis around the z-axis.
Packet file list
(Preview for download)
20052111201507
..............\Bmpfile.cpp
..............\Bmpfile.h
..............\MainFrm.cpp
..............\MainFrm.h
..............\OGL_MFC.clw
..............\OGL_MFC.cpp
..............\OGL_MFC.dsp
..............\OGL_MFC.dsw
..............\OGL_MFC.h
..............\OGL_MFC.opt
..............\OGL_MFC.plg
..............\OGL_MFC.rc
..............\OGL_MFCDoc.cpp
..............\OGL_MFCDoc.h
..............\OGL_MFCView.cpp
..............\OGL_MFCView.h
..............\ReadMe.txt
..............\res
..............\...\OGL_MFC.rc2
..............\...\使用说明.txt
..............\resource.h
..............\SelectColorDlg.cpp
..............\SelectColorDlg.h
..............\StdAfx.cpp
..............\StdAfx.h
..............\ThreeDBMP.exe
..............\UrlLink.cpp
..............\UrlLink.h
..............\使用说明.txt
Related instructions
- We are an exchange download platform that only provides communication channels. The downloaded content comes from the internet. Except for download issues, please Google on your own.
- The downloaded content is provided for members to upload. If it unintentionally infringes on your copyright, please contact us.
- Please use Winrar for decompression tools
- If download fail, Try it againg or Feedback to us.
- If downloaded content did not match the introduction, Feedback to us,Confirm and will be refund.
- Before downloading, you can inquire through the uploaded person information