diff --git "a/nb15033\347\216\213\345\233\275\345\206\233/mySecondHomework/OpenGLHomeWork02/RGBpixmap.cpp" "b/nb15033\347\216\213\345\233\275\345\206\233/mySecondHomework/OpenGLHomeWork02/RGBpixmap.cpp" new file mode 100755 index 0000000..50aa760 --- /dev/null +++ "b/nb15033\347\216\213\345\233\275\345\206\233/mySecondHomework/OpenGLHomeWork02/RGBpixmap.cpp" @@ -0,0 +1,110 @@ + + + + +#include "RGBpixmap.h" + +typedef unsigned short ushort; +typedef unsigned long ulong; +fstream inf; + + +ushort getShort() +{ + char ic; + ushort ip; + inf.get(ic); ip = ic; + inf.get(ic); ip |= ((ushort)ic << 8); + return ip; +} + +ulong getLong() +{ + + ulong ip = 0; + char ic = 0; + unsigned char uc = ic; + inf.get(ic); uc = ic; ip = uc; + inf.get(ic); uc = ic; ip |=((ulong)uc << 8); + inf.get(ic); uc = ic; ip |=((ulong)uc << 16); + inf.get(ic); uc = ic; ip |=((ulong)uc << 24); + return ip; + } + +int RGBpixmap:: readBMPFile(string fname, bool hasAlpha) +{ + inf.open(fname.c_str(), ios::in|ios::binary); + if(!inf) { + cout << " can't open file: " << fname << endl; + return 0; + } + int k, row, col, numPadBytes, nBytesInRow; + + + char ch1, ch2; + inf.get(ch1); + inf.get(ch2); + ulong fileSize = getLong(); + ushort reserved1 = getShort(); + ushort reserved2 = getShort(); + ulong offBits = getLong(); + ulong headerSize = getLong(); + ulong numCols = getLong(); + ulong numRows = getLong(); + ushort planes = getShort(); + ushort bitsPerPixel = getShort(); + ulong compression = getLong(); + ulong imageSize = getLong(); + ulong xPels = getLong(); + ulong yPels = getLong(); + ulong numLUTentries = getLong(); + ulong impColors = getLong(); + + if(bitsPerPixel != 24) + { + cout << "not a 24 bit/pixelimage, or is compressed!\n"; + inf.close(); + return 0; + } + + nBytesInRow = ((3 * numCols + 3)/4) * 4; + numPadBytes = nBytesInRow - 3 * numCols; + nRows = numRows; + nCols = numCols; + pixel = new mRGB[nRows * nCols]; + if (!pixel) + return 0; + + long count = 0; + char dum; + for(row = 0; row < nRows; row++) + { + for(col = 0; col < nCols; col++) + { + char r,g,b; + inf.get(b); + inf.get(g); + inf.get(r); + pixel[count].r = r; + pixel[count].g = g; + pixel[count].b = b; + if ( (hasAlpha) && (r==-1) && (g==-1) && (b==-1) ) + pixel[count++].a = 0; + else + pixel[count++].a = 255; + } + for(k = 0; k < numPadBytes ; k++) + inf >> dum; + } + inf.close(); + return 1; +} + +void RGBpixmap :: setTexture(GLuint textureName) +{ + glBindTexture(GL_TEXTURE_2D,textureName); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER,GL_LINEAR); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER,GL_NEAREST); + glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, nCols, nRows,0, GL_RGBA, GL_UNSIGNED_BYTE, pixel); +} + diff --git "a/nb15033\347\216\213\345\233\275\345\206\233/mySecondHomework/OpenGLHomeWork02/RGBpixmap.h" "b/nb15033\347\216\213\345\233\275\345\206\233/mySecondHomework/OpenGLHomeWork02/RGBpixmap.h" new file mode 100755 index 0000000..1b6e4fb --- /dev/null +++ "b/nb15033\347\216\213\345\233\275\345\206\233/mySecondHomework/OpenGLHomeWork02/RGBpixmap.h" @@ -0,0 +1,163 @@ + + + + + +#ifndef _RGBPIXMAP +#define _RGBPIXMAP +#if defined(_WIN32) +#include +#else +#include +#endif +#include +#include +#include +#include + +using namespace std; + + +class IntPoint +{ +public: + int x,y; + void set(int dx, int dy){x = dx; y = dy;} + void set(IntPoint& p){ x = p.x; y = p.y;} + IntPoint(int xx, int yy){x = xx; y = yy;} + IntPoint(){ x = y = 0;} +}; + + +class Point2 +{ +public: + float x,y; + void set(float dx, float dy){x = dx; y = dy;} + void set(Point2& p){ x = p.x; y = p.y;} + Point2(float xx, float yy){x = xx; y = yy;} + Point2(){x = y = 0;} +}; + + +class PolyLine +{ +public: + int num; + Point2 pt[80]; + PolyLine(){num = 0;} +}; + + +class IntRect +{ +public: + int left, top, right, bott; + IntRect(){left = top = right = bott = 0;} + IntRect(int l, int t, int r, int b) + {left = l; top = t; right = r; bott = b;} + void set(int l, int t, int r, int b) + {left = l; top = t; right = r; bott = b;} + void set(IntRect& r) + {left = r.left; top = r.top; right = r.right; bott = r.bott;} +}; + + +typedef unsigned char uchar; + +class mRGB +{ + +public: uchar r,g,b,a; + mRGB(){r = g = b = 0; a = 255;} + mRGB(mRGB& p){r = p.r; g = p.g; b = p.b; a = p.a;} + mRGB(uchar rr, uchar gg, uchar bb){r = rr; g = gg; b = bb; + if ( (r==255) && (g==255) && (b==255)) a = 0; else a = 255;} + mRGB(uchar rr, uchar gg, uchar bb, uchar aa){r = rr; g = gg; b = bb; a = aa;} + void set(uchar rr, uchar gg, uchar bb){r = rr; g = gg; b = bb; + if ( (r==255) && (g==255) && (b==255)) a = 0; else a = 255;} + void set(uchar rr, uchar gg, uchar bb, uchar aa){r = rr; g = gg; b = bb; a = aa;} +}; + + +class RGBpixmap +{ +private: + mRGB* pixel; + +public: + int nRows, nCols; + RGBpixmap() {nRows = nCols = 0; pixel = 0;} + RGBpixmap(int rows, int cols) + { + nRows = rows; + nCols = cols; + pixel = new mRGB[rows*cols]; + } + + int readBMPFile(string fname, bool hasAlpha); + void setTexture(GLuint textureName); + + void freeIt() + { + delete []pixel; nRows = nCols = 0; + } + + + void copy(IntPoint from, IntPoint to, int x, int y, int width, int height) + { + + if(nRows == 0 || nCols == 0) return; + glCopyPixels(x, y, width, height,GL_COLOR); + } + + void draw() + { + + if(nRows == 0 || nCols == 0) return; + + glPixelStorei(GL_UNPACK_ALIGNMENT,1); + glDrawPixels(nCols, nRows,GL_RGBA, GL_UNSIGNED_BYTE,pixel); + } + + int read(int x, int y, int wid, int ht) + { + nRows = ht; + nCols = wid; + pixel = new mRGB[nRows *nCols]; + if(!pixel) return -1; + glPixelStorei(GL_PACK_ALIGNMENT,1); + glReadPixels(x, y, nCols, nRows, GL_RGBA,GL_UNSIGNED_BYTE,pixel); + return 0; + } + + int read(IntRect r) + { + nRows = r.top - r.bott; + nCols = r.right - r.left; + pixel = new mRGB[nRows *nCols]; + if(!pixel) return -1; + + glPixelStorei(GL_PACK_ALIGNMENT,1); + glReadPixels(r.left,r.bott, nCols, nRows, GL_RGBA, GL_UNSIGNED_BYTE, pixel); + return 0; + } + + void setPixel(int x, int y, mRGB color) + { + if(x>=0 && x =0 && y < nRows) + pixel[nCols * y + x] = color; + } + + mRGB getPixel(int x, int y) + { + mRGB bad(255,255,255); + assert(x >= 0 && x < nCols); + assert(y >= 0 && y < nRows); + return pixel[nCols * y + x]; + } +}; +#endif + + + diff --git "a/nb15033\347\216\213\345\233\275\345\206\233/mySecondHomework/OpenGLHomeWork02/SolarSystemGlobals.h" "b/nb15033\347\216\213\345\233\275\345\206\233/mySecondHomework/OpenGLHomeWork02/SolarSystemGlobals.h" new file mode 100755 index 0000000..c5cff1c --- /dev/null +++ "b/nb15033\347\216\213\345\233\275\345\206\233/mySecondHomework/OpenGLHomeWork02/SolarSystemGlobals.h" @@ -0,0 +1,63 @@ + + + + + +#ifndef __SOLAR_SYSTEM_GLOBALS_H__ + +const GLfloat PI = 3.1415926535; +const GLfloat TO_RADIANS = PI/180.0; + + +const GLint INIT_WINDOW_POSITION[2] = { 150, 150 }; +const GLfloat ASPECT_RATIO = 1.5; + + +const GLfloat LIGHT_0_POSITION[] = { 0.0, 0.0, 0.0, 1.0}; +const GLfloat LIGHT_1_POSITION[] = { 0.0, 0.0, 1.0, 0.0}; +const GLfloat LIGHT_AMBIENT[] = { 0.8, 0.8, 0.8, 1.0}; +const GLfloat LIGHT_DIFFUSE[] = { 0.9, 0.9, 0.9, 1.0}; +const GLfloat LIGHT_SPECULAR[] = { 1.0, 1.0, 1.0, 1.0}; +const GLfloat LIGHT_MODEL_AMBIENT[] = { 0.2, 0.2, 0.2, 1.0}; + + +const char EARTH_BMP_FILENAME[] = "earthmap.bmp"; +const char MOON_BMP_FILENAME[] = "moonmap.bmp"; +const GLfloat EARTH_RADIUS = 0.54; +const GLfloat MOON_RADIUS = 0.14; +const GLfloat MOON_ORBIT_RADIUS = 0.90; +const GLfloat EARTH_ROTATION = 1.00; +const GLfloat LUNAR_CYCLE = 5.0; + + +const GLfloat MAXIMUM_VIEWER_DISTANCE = 20; +const GLfloat MINIMUM_VIEWER_DISTANCE = 2; +const GLfloat INITIAL_VIEWER_DISTANCE = 5; +const GLfloat VIEWER_DISTANCE_INCREMENT = 0.1; +const GLfloat INITIAL_VIEWER_AZIMUTH = 0.0; +const GLfloat INITIAL_VIEWER_ZENITH = PI / 2.0; +const GLfloat VIEWER_ANGLE_INCREMENT = PI / 1.0; +const GLfloat LOOK_AT_POSITION[] = { 0.0, 0.0, 1.0 }; + +const char SUN_BMP_FILENAME[] = "sunmap.bmp"; + +/* + 设置太阳的半径大小为1.5 + */ +const GLfloat SUN_RADIUS = 1.5; + +/* + 设置地球公转半径大小为3.0 + */ +const GLfloat EARTH_ORBIT_RADIUS = 3.0; + +/* + 设置地球自转周期为12 + */ +const GLfloat EARTH_ORBIT_DUR = 12; + +const GLfloat EARTH_INCLINATION = 7; + + +#define __SOLAR_SYSTEM_H__ +#endif \ No newline at end of file diff --git "a/nb15033\347\216\213\345\233\275\345\206\233/mySecondHomework/OpenGLHomeWork02/earthmap.bmp" "b/nb15033\347\216\213\345\233\275\345\206\233/mySecondHomework/OpenGLHomeWork02/earthmap.bmp" new file mode 100755 index 0000000..1c889b7 Binary files /dev/null and "b/nb15033\347\216\213\345\233\275\345\206\233/mySecondHomework/OpenGLHomeWork02/earthmap.bmp" differ diff --git "a/nb15033\347\216\213\345\233\275\345\206\233/mySecondHomework/OpenGLHomeWork02/main.cpp" "b/nb15033\347\216\213\345\233\275\345\206\233/mySecondHomework/OpenGLHomeWork02/main.cpp" new file mode 100644 index 0000000..53c2612 --- /dev/null +++ "b/nb15033\347\216\213\345\233\275\345\206\233/mySecondHomework/OpenGLHomeWork02/main.cpp" @@ -0,0 +1,276 @@ +// +// main.cpp +// OpenGL_wgj +// +// Created by 王国军 on 16/1/7. +// Copyright © 2016年 王国军. All rights reserved. +// + +#if defined(_WIN32) +#include "glut.h" +#include +#else +#include +#endif + +#include +#include "RGBpixmap.h" +#include "SolarSystemGlobals.h" + + +GLfloat viewerAzimuth = INITIAL_VIEWER_AZIMUTH; +GLfloat viewerZenith = INITIAL_VIEWER_ZENITH; + + +GLuint EarthTextureName = 3; +GLuint MoonTextureName = 4; +GLuint SunTextureName = 0; + + +GLfloat CurrentEarthRotation = 0.00; +GLfloat EarthDaysTranspired = 0.00; +GLfloat EarthDayIncrement = 0.04; + + +GLint currWindowSize[2] = { 1200, 800 }; +GLint currViewportSize[2] = { 1200, 800 }; + +GLfloat ViewerDistance = INITIAL_VIEWER_DISTANCE; + + +bool blendFlag = true; + + +void TimerFunction(int value); +void Display(); + +void MakeAllImages(); +void MakeImage(const char bitmapFilename[], GLuint &textureName, bool hasAlpha); + +void SetLights(); +void UpdateLight(); + +void ResizeWindow(GLsizei w, GLsizei h); + +void drawEarthAndMoon(); +void drawSun(); + +void drawAllPlanets(); +void drawGenericPlanet(GLfloat inclination, GLfloat orbitDuration, + GLfloat orbitRadius, GLfloat rotationDuration, GLuint texturename, GLfloat radius); + +int main(int argc, char** argv) +{ + cout << argv[0] < w/h) + { + currViewportSize[0] = w; + currViewportSize[1] = w / ASPECT_RATIO; + } + else + { + currViewportSize[1] = h; + currViewportSize[0] = h * ASPECT_RATIO; + } + + glViewport(0.5*(w-currViewportSize[0]), 0.5*(h-currViewportSize[1]), currViewportSize[0], currViewportSize[1]); + + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + gluPerspective(60.0, (GLfloat)w / (GLfloat)h, 0.1, 100.0); + glMatrixMode(GL_MODELVIEW); + glLoadIdentity(); +} + + + +void drawEarthAndMoon() +{ + glDisable(GL_LIGHT1); + + GLfloat MoonRevolution = EarthDaysTranspired / LUNAR_CYCLE; + GLUquadricObj* quadro = gluNewQuadric(); + gluQuadricNormals(quadro, GLU_SMOOTH); + gluQuadricTexture(quadro, GL_TRUE); + glEnable(GL_TEXTURE_2D); + glPushMatrix(); + glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); + glPushMatrix(); + glRotatef(EARTH_INCLINATION, 0.0, 0.0, 0.0); + glRotatef( 360.0 * (EarthDaysTranspired/EARTH_ORBIT_DUR), 0.0, 1.0, 0.0); + glTranslatef(EARTH_ORBIT_RADIUS, 0.0, 0.0 ); + glRotatef( 360.0 * CurrentEarthRotation, 0.0, 1.0, 0.0 ); + glRotatef( -90.0, 1.0, 0.0, 0.0 ); + glBindTexture(GL_TEXTURE_2D, EarthTextureName); + gluSphere(quadro, EARTH_RADIUS, 48, 48); + glPopMatrix(); + glRotatef(EARTH_INCLINATION, 0.0, 0.0, 0.0); + glRotatef( 360.0 * (EarthDaysTranspired/EARTH_ORBIT_DUR), 0.0, 1.0, 0.0); + glTranslatef(EARTH_ORBIT_RADIUS, 0.0, 0.0 ); + glRotatef( 360.0 * MoonRevolution, 0.0, 1.0, 0.0 ); + glTranslatef( MOON_ORBIT_RADIUS , 0.0, 0.0 ); + glBindTexture(GL_TEXTURE_2D, MoonTextureName); + gluSphere(quadro, MOON_RADIUS, 48, 48); + glPopMatrix(); + glDisable(GL_TEXTURE_2D); + gluDeleteQuadric(quadro); + + glEnable(GL_LIGHT1); +} + + +void drawSun() +{ + glDisable(GL_LIGHT0); + + GLUquadricObj* quadro = gluNewQuadric(); + gluQuadricNormals(quadro, GLU_SMOOTH); + gluQuadricTexture(quadro, GL_TRUE); + glEnable(GL_TEXTURE_2D); + glPushMatrix(); + glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); + glPushMatrix(); + glBindTexture(GL_TEXTURE_2D, SunTextureName); + gluSphere(quadro, SUN_RADIUS, 48, 48); + glPopMatrix(); + glPopMatrix(); + glDisable(GL_TEXTURE_2D); + gluDeleteQuadric(quadro); + + glEnable(GL_LIGHT0); +} diff --git "a/nb15033\347\216\213\345\233\275\345\206\233/mySecondHomework/OpenGLHomeWork02/moonmap.bmp" "b/nb15033\347\216\213\345\233\275\345\206\233/mySecondHomework/OpenGLHomeWork02/moonmap.bmp" new file mode 100755 index 0000000..12c31b4 Binary files /dev/null and "b/nb15033\347\216\213\345\233\275\345\206\233/mySecondHomework/OpenGLHomeWork02/moonmap.bmp" differ diff --git "a/nb15033\347\216\213\345\233\275\345\206\233/mySecondHomework/OpenGLHomeWork02/sunmap.bmp" "b/nb15033\347\216\213\345\233\275\345\206\233/mySecondHomework/OpenGLHomeWork02/sunmap.bmp" new file mode 100755 index 0000000..d9b87db Binary files /dev/null and "b/nb15033\347\216\213\345\233\275\345\206\233/mySecondHomework/OpenGLHomeWork02/sunmap.bmp" differ diff --git "a/nb15033\347\216\213\345\233\275\345\206\233/mySecondHomework/mySecondHomework.xcodeproj/project.pbxproj" "b/nb15033\347\216\213\345\233\275\345\206\233/mySecondHomework/mySecondHomework.xcodeproj/project.pbxproj" new file mode 100644 index 0000000..e996293 --- /dev/null +++ "b/nb15033\347\216\213\345\233\275\345\206\233/mySecondHomework/mySecondHomework.xcodeproj/project.pbxproj" @@ -0,0 +1,266 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 0EEDB0C81C3C1A3600EC9C6C /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0EEDB0C71C3C1A3600EC9C6C /* main.cpp */; }; + 0EEDB0CF1C3C1A9300EC9C6C /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0EEDB0CE1C3C1A9300EC9C6C /* OpenGL.framework */; }; + 0EEDB0D11C3C1A9A00EC9C6C /* GLUT.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0EEDB0D01C3C1A9A00EC9C6C /* GLUT.framework */; }; + 0EEDB0D91C3C1D5200EC9C6C /* RGBpixmap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0EEDB0D61C3C1D5200EC9C6C /* RGBpixmap.cpp */; }; +/* End PBXBuildFile section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 0EEDB0C21C3C1A3600EC9C6C /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = usr/share/man/man1; + dstSubfolderSpec = 7; + files = ( + ); + runOnlyForDeploymentPostprocessing = 1; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 0EEDB0C41C3C1A3600EC9C6C /* mySecondHomework */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = mySecondHomework; sourceTree = BUILT_PRODUCTS_DIR; }; + 0EEDB0C71C3C1A3600EC9C6C /* main.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = ""; }; + 0EEDB0CE1C3C1A9300EC9C6C /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = System/Library/Frameworks/OpenGL.framework; sourceTree = SDKROOT; }; + 0EEDB0D01C3C1A9A00EC9C6C /* GLUT.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GLUT.framework; path = System/Library/Frameworks/GLUT.framework; sourceTree = SDKROOT; }; + 0EEDB0D61C3C1D5200EC9C6C /* RGBpixmap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RGBpixmap.cpp; sourceTree = ""; }; + 0EEDB0D71C3C1D5200EC9C6C /* RGBpixmap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RGBpixmap.h; sourceTree = ""; }; + 0EEDB0D81C3C1D5200EC9C6C /* SolarSystemGlobals.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SolarSystemGlobals.h; sourceTree = ""; }; + 19E63B701C3C2290005EADD3 /* earthmap.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; path = earthmap.bmp; sourceTree = ""; }; + 19E63B711C3C2290005EADD3 /* moonmap.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; path = moonmap.bmp; sourceTree = ""; }; + 19E63B721C3C2290005EADD3 /* sunmap.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; path = sunmap.bmp; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 0EEDB0C11C3C1A3600EC9C6C /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 0EEDB0D11C3C1A9A00EC9C6C /* GLUT.framework in Frameworks */, + 0EEDB0CF1C3C1A9300EC9C6C /* OpenGL.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 0EEDB0BB1C3C1A3600EC9C6C = { + isa = PBXGroup; + children = ( + 0EEDB0D01C3C1A9A00EC9C6C /* GLUT.framework */, + 0EEDB0CE1C3C1A9300EC9C6C /* OpenGL.framework */, + 0EEDB0C61C3C1A3600EC9C6C /* OpenGL_wgj */, + 0EEDB0C51C3C1A3600EC9C6C /* Products */, + ); + sourceTree = ""; + }; + 0EEDB0C51C3C1A3600EC9C6C /* Products */ = { + isa = PBXGroup; + children = ( + 0EEDB0C41C3C1A3600EC9C6C /* mySecondHomework */, + ); + name = Products; + sourceTree = ""; + }; + 0EEDB0C61C3C1A3600EC9C6C /* OpenGL_wgj */ = { + isa = PBXGroup; + children = ( + 19E63B701C3C2290005EADD3 /* earthmap.bmp */, + 19E63B711C3C2290005EADD3 /* moonmap.bmp */, + 19E63B721C3C2290005EADD3 /* sunmap.bmp */, + 0EEDB0D61C3C1D5200EC9C6C /* RGBpixmap.cpp */, + 0EEDB0D71C3C1D5200EC9C6C /* RGBpixmap.h */, + 0EEDB0D81C3C1D5200EC9C6C /* SolarSystemGlobals.h */, + 0EEDB0C71C3C1A3600EC9C6C /* main.cpp */, + ); + name = OpenGL_wgj; + path = OpenGLHomeWork02; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 0EEDB0C31C3C1A3600EC9C6C /* mySecondHomework */ = { + isa = PBXNativeTarget; + buildConfigurationList = 0EEDB0CB1C3C1A3600EC9C6C /* Build configuration list for PBXNativeTarget "mySecondHomework" */; + buildPhases = ( + 0EEDB0C01C3C1A3600EC9C6C /* Sources */, + 0EEDB0C11C3C1A3600EC9C6C /* Frameworks */, + 0EEDB0C21C3C1A3600EC9C6C /* CopyFiles */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = mySecondHomework; + productName = OpenGLHomeWork02; + productReference = 0EEDB0C41C3C1A3600EC9C6C /* mySecondHomework */; + productType = "com.apple.product-type.tool"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 0EEDB0BC1C3C1A3600EC9C6C /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0700; + ORGANIZATIONNAME = Bing; + TargetAttributes = { + 0EEDB0C31C3C1A3600EC9C6C = { + CreatedOnToolsVersion = 7.0; + }; + }; + }; + buildConfigurationList = 0EEDB0BF1C3C1A3600EC9C6C /* Build configuration list for PBXProject "mySecondHomework" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = 0EEDB0BB1C3C1A3600EC9C6C; + productRefGroup = 0EEDB0C51C3C1A3600EC9C6C /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 0EEDB0C31C3C1A3600EC9C6C /* mySecondHomework */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXSourcesBuildPhase section */ + 0EEDB0C01C3C1A3600EC9C6C /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 0EEDB0D91C3C1D5200EC9C6C /* RGBpixmap.cpp in Sources */, + 0EEDB0C81C3C1A3600EC9C6C /* main.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 0EEDB0C91C3C1A3600EC9C6C /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.8; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = macosx; + }; + name = Debug; + }; + 0EEDB0CA1C3C1A3600EC9C6C /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.8; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = macosx; + }; + name = Release; + }; + 0EEDB0CC1C3C1A3600EC9C6C /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + PRODUCT_NAME = mySecondHomework; + }; + name = Debug; + }; + 0EEDB0CD1C3C1A3600EC9C6C /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + PRODUCT_NAME = mySecondHomework; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 0EEDB0BF1C3C1A3600EC9C6C /* Build configuration list for PBXProject "mySecondHomework" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 0EEDB0C91C3C1A3600EC9C6C /* Debug */, + 0EEDB0CA1C3C1A3600EC9C6C /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 0EEDB0CB1C3C1A3600EC9C6C /* Build configuration list for PBXNativeTarget "mySecondHomework" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 0EEDB0CC1C3C1A3600EC9C6C /* Debug */, + 0EEDB0CD1C3C1A3600EC9C6C /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 0EEDB0BC1C3C1A3600EC9C6C /* Project object */; +} diff --git "a/nb15033\347\216\213\345\233\275\345\206\233/mySecondHomework/mySecondHomework.xcodeproj/project.xcworkspace/contents.xcworkspacedata" "b/nb15033\347\216\213\345\233\275\345\206\233/mySecondHomework/mySecondHomework.xcodeproj/project.xcworkspace/contents.xcworkspacedata" new file mode 100644 index 0000000..7b9bb42 --- /dev/null +++ "b/nb15033\347\216\213\345\233\275\345\206\233/mySecondHomework/mySecondHomework.xcodeproj/project.xcworkspace/contents.xcworkspacedata" @@ -0,0 +1,7 @@ + + + + + diff --git "a/nb15033\347\216\213\345\233\275\345\206\233/mySecondHomework/mySecondHomework.xcodeproj/project.xcworkspace/xcuserdata/huangbingjie.xcuserdatad/UserInterfaceState.xcuserstate" "b/nb15033\347\216\213\345\233\275\345\206\233/mySecondHomework/mySecondHomework.xcodeproj/project.xcworkspace/xcuserdata/huangbingjie.xcuserdatad/UserInterfaceState.xcuserstate" new file mode 100644 index 0000000..d78fe6c Binary files /dev/null and "b/nb15033\347\216\213\345\233\275\345\206\233/mySecondHomework/mySecondHomework.xcodeproj/project.xcworkspace/xcuserdata/huangbingjie.xcuserdatad/UserInterfaceState.xcuserstate" differ diff --git "a/nb15033\347\216\213\345\233\275\345\206\233/mySecondHomework/mySecondHomework.xcodeproj/project.xcworkspace/xcuserdata/lumiajohn.xcuserdatad/UserInterfaceState.xcuserstate" "b/nb15033\347\216\213\345\233\275\345\206\233/mySecondHomework/mySecondHomework.xcodeproj/project.xcworkspace/xcuserdata/lumiajohn.xcuserdatad/UserInterfaceState.xcuserstate" new file mode 100644 index 0000000..d95499d Binary files /dev/null and "b/nb15033\347\216\213\345\233\275\345\206\233/mySecondHomework/mySecondHomework.xcodeproj/project.xcworkspace/xcuserdata/lumiajohn.xcuserdatad/UserInterfaceState.xcuserstate" differ diff --git "a/nb15033\347\216\213\345\233\275\345\206\233/mySecondHomework/mySecondHomework.xcodeproj/project.xcworkspace/xcuserdata/wangguojun.xcuserdatad/UserInterfaceState.xcuserstate" "b/nb15033\347\216\213\345\233\275\345\206\233/mySecondHomework/mySecondHomework.xcodeproj/project.xcworkspace/xcuserdata/wangguojun.xcuserdatad/UserInterfaceState.xcuserstate" new file mode 100644 index 0000000..4e2b53f Binary files /dev/null and "b/nb15033\347\216\213\345\233\275\345\206\233/mySecondHomework/mySecondHomework.xcodeproj/project.xcworkspace/xcuserdata/wangguojun.xcuserdatad/UserInterfaceState.xcuserstate" differ diff --git "a/nb15033\347\216\213\345\233\275\345\206\233/mySecondHomework/mySecondHomework.xcodeproj/xcuserdata/huangbingjie.xcuserdatad/xcschemes/OpenGLHomeWork02.xcscheme" "b/nb15033\347\216\213\345\233\275\345\206\233/mySecondHomework/mySecondHomework.xcodeproj/xcuserdata/huangbingjie.xcuserdatad/xcschemes/OpenGLHomeWork02.xcscheme" new file mode 100644 index 0000000..abbbf5a --- /dev/null +++ "b/nb15033\347\216\213\345\233\275\345\206\233/mySecondHomework/mySecondHomework.xcodeproj/xcuserdata/huangbingjie.xcuserdatad/xcschemes/OpenGLHomeWork02.xcscheme" @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git "a/nb15033\347\216\213\345\233\275\345\206\233/mySecondHomework/mySecondHomework.xcodeproj/xcuserdata/huangbingjie.xcuserdatad/xcschemes/xcschememanagement.plist" "b/nb15033\347\216\213\345\233\275\345\206\233/mySecondHomework/mySecondHomework.xcodeproj/xcuserdata/huangbingjie.xcuserdatad/xcschemes/xcschememanagement.plist" new file mode 100644 index 0000000..3206fcf --- /dev/null +++ "b/nb15033\347\216\213\345\233\275\345\206\233/mySecondHomework/mySecondHomework.xcodeproj/xcuserdata/huangbingjie.xcuserdatad/xcschemes/xcschememanagement.plist" @@ -0,0 +1,22 @@ + + + + + SchemeUserState + + OpenGLHomeWork02.xcscheme + + orderHint + 0 + + + SuppressBuildableAutocreation + + 0EEDB0C31C3C1A3600EC9C6C + + primary + + + + + diff --git "a/nb15033\347\216\213\345\233\275\345\206\233/mySecondHomework/mySecondHomework.xcodeproj/xcuserdata/lumiajohn.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist" "b/nb15033\347\216\213\345\233\275\345\206\233/mySecondHomework/mySecondHomework.xcodeproj/xcuserdata/lumiajohn.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist" new file mode 100644 index 0000000..fe2b454 --- /dev/null +++ "b/nb15033\347\216\213\345\233\275\345\206\233/mySecondHomework/mySecondHomework.xcodeproj/xcuserdata/lumiajohn.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist" @@ -0,0 +1,5 @@ + + + diff --git "a/nb15033\347\216\213\345\233\275\345\206\233/mySecondHomework/mySecondHomework.xcodeproj/xcuserdata/lumiajohn.xcuserdatad/xcschemes/OpenGLHomeWork02.xcscheme" "b/nb15033\347\216\213\345\233\275\345\206\233/mySecondHomework/mySecondHomework.xcodeproj/xcuserdata/lumiajohn.xcuserdatad/xcschemes/OpenGLHomeWork02.xcscheme" new file mode 100644 index 0000000..432e346 --- /dev/null +++ "b/nb15033\347\216\213\345\233\275\345\206\233/mySecondHomework/mySecondHomework.xcodeproj/xcuserdata/lumiajohn.xcuserdatad/xcschemes/OpenGLHomeWork02.xcscheme" @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git "a/nb15033\347\216\213\345\233\275\345\206\233/mySecondHomework/mySecondHomework.xcodeproj/xcuserdata/lumiajohn.xcuserdatad/xcschemes/xcschememanagement.plist" "b/nb15033\347\216\213\345\233\275\345\206\233/mySecondHomework/mySecondHomework.xcodeproj/xcuserdata/lumiajohn.xcuserdatad/xcschemes/xcschememanagement.plist" new file mode 100644 index 0000000..3206fcf --- /dev/null +++ "b/nb15033\347\216\213\345\233\275\345\206\233/mySecondHomework/mySecondHomework.xcodeproj/xcuserdata/lumiajohn.xcuserdatad/xcschemes/xcschememanagement.plist" @@ -0,0 +1,22 @@ + + + + + SchemeUserState + + OpenGLHomeWork02.xcscheme + + orderHint + 0 + + + SuppressBuildableAutocreation + + 0EEDB0C31C3C1A3600EC9C6C + + primary + + + + + diff --git "a/nb15033\347\216\213\345\233\275\345\206\233/mySecondHomework/mySecondHomework.xcodeproj/xcuserdata/wangguojun.xcuserdatad/xcschemes/OpenGLHomeWork02.xcscheme" "b/nb15033\347\216\213\345\233\275\345\206\233/mySecondHomework/mySecondHomework.xcodeproj/xcuserdata/wangguojun.xcuserdatad/xcschemes/OpenGLHomeWork02.xcscheme" new file mode 100644 index 0000000..7ec1b95 --- /dev/null +++ "b/nb15033\347\216\213\345\233\275\345\206\233/mySecondHomework/mySecondHomework.xcodeproj/xcuserdata/wangguojun.xcuserdatad/xcschemes/OpenGLHomeWork02.xcscheme" @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git "a/nb15033\347\216\213\345\233\275\345\206\233/mySecondHomework/mySecondHomework.xcodeproj/xcuserdata/wangguojun.xcuserdatad/xcschemes/xcschememanagement.plist" "b/nb15033\347\216\213\345\233\275\345\206\233/mySecondHomework/mySecondHomework.xcodeproj/xcuserdata/wangguojun.xcuserdatad/xcschemes/xcschememanagement.plist" new file mode 100644 index 0000000..3206fcf --- /dev/null +++ "b/nb15033\347\216\213\345\233\275\345\206\233/mySecondHomework/mySecondHomework.xcodeproj/xcuserdata/wangguojun.xcuserdatad/xcschemes/xcschememanagement.plist" @@ -0,0 +1,22 @@ + + + + + SchemeUserState + + OpenGLHomeWork02.xcscheme + + orderHint + 0 + + + SuppressBuildableAutocreation + + 0EEDB0C31C3C1A3600EC9C6C + + primary + + + + +