2019年4月11日 星期四

uh-oh~可恩的上課筆記 Week08


         Week08                                                                    


ʕ•ᴥ•ʔ 初心 (⺣◡⺣)*

                                                                                                                  

*****段考必考*****

                                                                                                                  

Week3.載 1.windows.zip  2. data.zip 3.glut32.dll 
然後開啟Texture(貼圖)

貼圖座標glTexCoord2f(tx,ty);

貼圖x座標,y座標的意思 亂改圖會變畸形

                                                                                                                  

OpenCV+Texture(貼圖)開啟圖片地球

下載:OpenCV
*注意載2008的&選擇圖下畫框處


week1.一樣開啟GLUT 切記下載完OpenCV才能開啟CdeBlocks

#include <GL/glut.h>
#include <opencv/highgui.h>
void display()
{
    glClear(GL_COLOR_BUFFER_BIT||GL_COLOR_BUFFER_BIT);
    glutSolidTeapot( 0.3 );
    glutSwapBuffers();
}
int main(int argc, char**argv)
{
    IplImage * img=cvLoadImage("earth.jpg");
    cvShowImage("opencv Window",img);
    cvWaitKey(0);
    glutInit(&argc,argv);
    glutInitDisplayMode(GLUT_DOUBLE|GLUT_DEPTH);
    glutCreateWindow("06161110_Week08!!");
    glutDisplayFunc(display);
    glutMainLoop();

}





圖檔放這裡↓↓
完成  ღゝ◡╹)ノ


沒有留言:

張貼留言