資源簡介
基于C語言,結合OpenGL實現的動態北斗衛星系統,輸出動態2D,3D圖和各衛星參數。
代碼片段和文件信息
/*
?* This?Code?Was?Created?By?Jeff?Molofee?2000
?* A?HUGE?Thanks?To?Fredric?Echols?For?Cleaning?Up
?* And?Optimizing?This?Code?Making?It?More?Flexible!
?* If?You‘ve?Found?This?Code?Useful?Please?Let?Me?Know.
?* Visit?My?Site?At?nehe.gamedev.net
?*??????The?Code?was?reformed?by?Zike?for?the?software?design
?*/
#include? //?Header?File?For?Windows
#include? //?Header?File?For?Standard?Input/Output
#include?????????//?Header?File?For?The?Glew?Libarary
#include? //?Header?File?For?The?OpenGL32?Library
#include? //?Header?File?For?The?GLu32?Library
#include?
#include?“satellite.h“
#define?N?80
HDC hDC=NULL; //?Private?GDI?Device?Context
HGLRC hRC=NULL; //?Permanent?Rendering?Context
HWND hWnd=NULL; //?Holds?Our?Window?Handle
HINSTANCE hInstance; //?Holds?The?Instance?Of?The?Application
bool keys[256]; //?Array?Used?For?The?Keyboard?Routine
bool active=TRUE; //?Window?Active?Flag?Set?To?TRUE?By?Default
bool fullscreen=TRUE; //?Fullscreen?Flag?Set?To?Fullscreen?Mode?By?Default
GLfloat?angle;
int?i;
int?m=0n=0p[9]={000000000}q[9]={000000000}x[9]={000000000}y[3]{000};
int?sat[4][2]={02020202};????????????????????//loop?drawing?the?track?by?lines
bool?stopl;
bool?p_s=0;
int?K=4;
int?M_31=0M_32=0M_33=0M_34=0M_35=0M_36=0M_37=0M_38=0M_39=0;
GLuint texture[1]; //?Storage?For?One?Texture?(?NEW?)
LRESULT CALLBACK?WndProc(HWND?UINT?WPARAM?LPARAM); //?Declaration?For?WndProc
bool?LoadGlTextures(LPCSTR?Filename?GLuint?&texture)?//?Creates?Texture?From?A?Bitmap?File
?{
??HBITMAP?hBMP;?//?Handle?Of?The?Bitmap
??BITMAP?BMP;?//?Bitmap?Structure
??glGenTextures(1?&texture);?//?Create?The?Texture
??hBMP=(HBITMAP)LoadImage(GetModuleHandle(NULL)?Filename?IMAGE_BITMAP?0?0?LR_CREATEDIBSECTION?|?LR_LOADFROMFILE?);
??if?(!hBMP)?//?Does?The?Bitmap?Exist?
??return?FALSE;?//?If?Not?Return?False
??Getobject(hBMP?sizeof(BMP)?&BMP);?//?Get?The?object
??//?hBMP:?Handle?To?Graphics?object
??//?sizeof(BMP):?Size?Of?Buffer?For?object?Information
??//?&BMP:?Buffer?For?object?Information
??glPixelStorei(GL_UNPACK_ALIGNMENT?4);?//?Pixel?Storage?Mode?(Word?Alignment?/?4?Bytes)
??//?Typical?Texture?Generation?Using?Data?From?The?Bitmap
??glBindTexture(GL_TEXTURE_2D?texture);?//?Bind?To?The?Texture?ID
??glTexParameteri(GL_TEXTURE_2D?GL_TEXTURE_MIN_FILTER?GL_LINEAR);?//?Linear?Min?Filter
??glTexParameteri(GL_TEXTURE_2D?GL_TEXTURE_MAG_FILTER?GL_LINEAR);?//?Linear?Mag?Filter
??glTexImage2D(GL_TEXTURE_2D?0?3?BMP.bmWidth?BMP.bmHeight?0?GL_BGR_EXT?GL_UNSIGNED_BYTE???BMP.bmBits);
??Deleteobject(hBMP);?//?Delete?The?object
??return?TRUE;?//?Loading?Was?Successful
}
/*
?*I?change?something?of?itfor?the?GLvoid?cannot?be?identitef?by?the?complier
?*use?void?to?replace?the?formal?GLvoid??in?the?declaration?of?function.
?*/
void?ReSizeGLScene(GLsizei?wi
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件?????140154??2017-01-11?22:32??beidou\2D\Debug\main.o
?????文件??????24596??2016-12-27?14:09??beidou\2D\Debug\test\tt\main.o
?????文件?????400726??2017-01-11?22:32??beidou\2D\Debug\tt.exe
?????文件??????24705??2017-01-11?22:32??beidou\2D\main.cpp
?????文件?????312689??2016-12-28?23:03??beidou\2D\satellite.h
?????文件???????1639??2016-12-27?23:18??beidou\2D\tt.cbp
?????文件???????6602??2017-01-11?22:29??beidou\2D\tt.depend
?????文件????????512??2017-02-25?23:19??beidou\2D\tt.layout
?????文件??????69010??2017-01-11?22:50??beidou\3D\Debug\main.o
?????文件?????330031??2017-01-11?22:50??beidou\3D\Debug\woshishabi.exe
?????文件??????30402??2017-01-11?22:50??beidou\3D\main.cpp
?????文件?????133788??2017-01-11?20:52??beidou\3D\satellite.h
?????文件???????1594??2017-01-11?22:06??beidou\3D\woshishabi.cbp
?????文件???????6636??2017-01-11?22:43??beidou\3D\woshishabi.depend
?????文件????????584??2017-02-25?23:18??beidou\3D\woshishabi.layout
?????文件??????14525??2017-01-11?22:36??beidou\guide.docx
?????文件??????43854??2017-01-12?02:34??beidou\parameter\bin\Debug\G1_2D.txt
?????文件?????130003??2017-01-12?02:34??beidou\parameter\bin\Debug\G1_3D.txt
?????文件??????43854??2017-01-12?02:34??beidou\parameter\bin\Debug\G2_2D.txt
?????文件?????129986??2017-01-12?02:34??beidou\parameter\bin\Debug\G2_3D.txt
?????文件??????45295??2017-01-12?02:34??beidou\parameter\bin\Debug\G3_2D.txt
?????文件?????130010??2017-01-12?02:34??beidou\parameter\bin\Debug\G3_3D.txt
?????文件??????45295??2017-01-12?02:34??beidou\parameter\bin\Debug\G4_2D.txt
?????文件?????130001??2017-01-12?02:34??beidou\parameter\bin\Debug\G4_3D.txt
?????文件??????45295??2017-01-12?02:34??beidou\parameter\bin\Debug\G5_2D.txt
?????文件?????129988??2017-01-12?02:34??beidou\parameter\bin\Debug\G5_3D.txt
?????文件??????46537??2017-01-12?02:34??beidou\parameter\bin\Debug\I1_2D.txt
?????文件?????143408??2017-01-12?02:34??beidou\parameter\bin\Debug\I1_3D.txt
?????文件??????46540??2017-01-12?02:34??beidou\parameter\bin\Debug\I2_2D.txt
?????文件?????143263??2017-01-12?02:34??beidou\parameter\bin\Debug\I2_3D.txt
............此處省略387個文件信息
- 上一篇:明美工業相機開發資料
- 下一篇:c++程序設計譚浩強課后習題答案(完整版)
評論
共有 條評論