Post date: Apr 27, 2017 2:27:45 AM
Goals
be able to write an interactive graphics program using OpenGL with custom modeled 3D objects or imagery lighting texture mapping
develop 2D Solar System
develop 3D Shooting Game
Steps are shown in the slides as follow
ステップは以下のようにスライドに表示されます
Download the OpenGL packages in the attached file below and extract the folder in the place where you want ( in this tutorial, I will place it on my Desktop)
下記の添付ファイルでopenGLパッケージをダウンロードし、必要な場所にフォルダを展開します(このチュートリアルでは、デスクトップに配置します)
Compile using the command below
gcc -o test1 test1.c -framework Carbon -framework OpenGL -framework GLUT
Steps are shown in the slides as follow
ステップは以下のようにスライドに表示されます
Download the OpenGL packages in the attached file below and extract the folder in the place where you want ( in this tutorial, I will place it on my Desktop)
下記の添付ファイルでopenGLパッケージをダウンロードし、任意の場所にフォルダを展開します(このチュートリアルでは、デスクトップに配置します)
Create a new empty Visual C++ project in Visual Studio and create new source (.cpp) file
Visual Studioで新しい空のVisual C ++プロジェクトを作成し、新しいソース(.cpp)ファイルを作成する
Go to project properties > C/C++ > General > Additional Include Directories ,
add ~\openGL\freegult\include
add ~\openGL\glew\include
プロジェクトのプロパティ> C / C ++>全般>追加のインクルードディレクトリに移動し、
〜\openGL\freegult\includeをしてください。
〜\openGL\glew\includeをしてください。
Go to project properties > Linker > Input > Additional Dependencies ,
add freeglut.lib
add glew32.lib
プロジェクトのプロパティ>リンカー>入力>追加の依存ファイルに移動し、
freeglut.libを追加してください。
glew32.libを追加してください。
Go to project properties > Linker > General > Additional Library Directories ,
add ~\openGL\freegult\lib
add ~\openGL\glew\lib
プロジェクトプロパティ>リンカー > 全般 > 追加のライブラリディレクトリに移動し、
〜\openGL\freegult\libを追加してください
〜\openGL\glew\libを追加してください
Copy freeglut.dll and glew32.dll from OpenGL folder to your project folder
OpenGLフォルダのfreeglut.dllとglew32.dllをプロジェクトフォルダにコピーします。
Copy freeglut.dll and glew32.dll from OpenGL folder to Windows/System32
Windows/System32にOpenGLフォルダからfreeglut.dllとglew32.dllをコピーします。
Create new .cpp file and try a code below
新しい.cppファイルを作成し、以下のコードを試してください
#include <GL\glew.h>
#include <GL\freeglut.h>
void display(void) {}
int main(int argc, char **argv)
{
glutInit(&argc, argv);
glutCreateWindow ( "test1");
glutDisplayFunc(display);
glutMainLoop ();
return 0;
}
I have tested with VS2013 and VS2015 and it worked
VS2013とVS2015でテストして、うまく行きました。