Skip to content

Commit

Permalink
Merge pull request #7 from vovan4ik123/br
Browse files Browse the repository at this point in the history
edit lib
  • Loading branch information
vova authored Oct 7, 2017
2 parents 81afb03 + e649d8f commit 793467c
Show file tree
Hide file tree
Showing 37 changed files with 16 additions and 64 deletions.
1 change: 0 additions & 1 deletion Load_3D_model_2/Camera.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#pragma once

#include "GL\glew.h"
#include "GL\freeglut.h"
#include "glm\glm.hpp"
#include "glm\gtc\matrix_transform.hpp"
#include "InputHandler.h"
Expand Down
1 change: 0 additions & 1 deletion Load_3D_model_2/ForShader.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "ForShader.h"



ForShader::ForShader()
{
}
Expand Down
4 changes: 2 additions & 2 deletions Load_3D_model_2/ForShader.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#pragma once

#include <iostream>
#include "GL\glew.h"
#include "GL\freeglut.h"
#include "SDL\SDL_opengl.h"

#include <iostream>

class ForShader
{
public:
Expand Down
36 changes: 9 additions & 27 deletions Load_3D_model_2/Game.cpp
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
#include "Game.h"
#include "InputHandler.h"

#include <iostream>
#include <assert.h>

#include "GL\glew.h"

#include "GL\freeglut.h"
#include "IL\il.h"
#include "IL\ilu.h"
#include "IL\ilut.h"

#include "SDL\SDL_mixer.h"

#include <iostream>
#include <assert.h>

Game::Game()
{
std::cout << "konstructor Game()" << std::endl;
Expand Down Expand Up @@ -53,11 +51,11 @@ void Game::init()

SDL_GL_SetAttribute(SDL_GL_ACCELERATED_VISUAL, 1); // set to 1 to require hardware acceleration

//SDL_DisplayMode dm;
//SDL_GetDesktopDisplayMode(0, &dm); // if resolution change in SDL, this function will return the previous native display mode !!!
//screen_width = dm.w;
//screen_height = dm.h;
//std::cout << dm.w << " " << dm.h << std::endl;
SDL_DisplayMode dm;
SDL_GetDesktopDisplayMode(0, &dm); // if resolution change in SDL, this function will return the previous native display mode !!!
screen_width = dm.w;
screen_height = dm.h;
std::cout << dm.w << " " << dm.h << std::endl;

window = SDL_CreateWindow("Chapter 1",
SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED,
Expand Down Expand Up @@ -101,27 +99,11 @@ void Game::init()
glViewport(0, 0, screen_width, screen_height); // çàäàòü ïðÿìîóãîëüíèê îêíà
glEnable(GL_DEPTH_TEST); // âêëþ÷àåì òåñò ãëóáèíû

glEnable(GL_LINE_SMOOTH);
glHint(GL_LINE_SMOOTH_HINT, GL_NICEST);
glEnable(GL_POINT_SMOOTH);
glHint(GL_POINT_SMOOTH_HINT, GL_NICEST);
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
// antialiasing for figures need be do library who created window

glClearColor(1.0f, 1.0f, 1.0f, 1.0f); // óñòàíàâëèâàåì ôîíîâûé öâåò
glClearDepth(1.0);

//glMatrixMode(GL_PROJECTION); ðåæèì òåêóùåé ìàòðèöû.( GL_MODELVIEW- ïåðåõîäèì â òðåõìåðíûé ðåæèì(ïî óìîë÷àíèþ))
//glLoadIdentity(); // replace the current matrix(modelview ) with the user matrix (GL_PROJECTION)
//glOrtho(0.0, 920.0, 900.0, 0.0, -1.0, 1.0); - òèïà 2ä ýêðàí ñòàíîâèòñÿ
//glMatrixMode(GL_MODELVIEW);

int ff;
glGetIntegerv(GL_SAMPLE_BUFFERS, &ff); // ïðîâåðèòü ÷òî âêëþ÷åíî(ff ñòàíåò = 1) à ÷òî íåò(ff = 0)?
//SDL_GL_GetAttribute(SDL_GL_DEPTH_SIZE, &ff);
std::cout << "GL_CHECK = " << ff << std::endl;

int buffer;
SDL_GL_GetAttribute(SDL_GL_DOUBLEBUFFER, &buffer);
printf("SDL_GL_DOUBLEBUFFER: %d \n", buffer);
Expand Down
2 changes: 1 addition & 1 deletion Load_3D_model_2/InputHandler.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "InputHandler.h"
#include "game.h"
#include "Game.h"


InputHandler::InputHandler()
Expand Down
2 changes: 1 addition & 1 deletion Load_3D_model_2/Load_3D_model_2.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalLibraryDirectories>res/lib/x64/Debug</AdditionalLibraryDirectories>
<AdditionalDependencies>assimp-vc140-mt.lib;DevIL.lib;ILU.lib;ILUT.lib;glew32d.lib;SDL2.lib;SDL2main.lib;SDL2_mixer.lib;freetyped.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>assimp-vc140-mt.lib;DevIL.lib;ILU.lib;ILUT.lib;glew32d.lib;SDL2.lib;SDL2main.lib;SDL2_mixer.lib;freetyped.lib;freeglutd.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
Expand Down
1 change: 0 additions & 1 deletion Load_3D_model_2/SkyBox.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#pragma once

#include "GL\glew.h"
#include "GL\glut.h"
#include "glm\glm.hpp"
#include "glm\gtc\type_ptr.hpp"
#include "Camera.h"
Expand Down
1 change: 0 additions & 1 deletion Load_3D_model_2/TextRendering.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#pragma once

#include "GL\glew.h"
#include "GL\freeglut.h"
#include "glm\glm.hpp"
#include "glm\gtc\matrix_transform.hpp"
#include "glm\gtc\type_ptr.hpp"
Expand Down
1 change: 0 additions & 1 deletion Load_3D_model_2/Triangle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#include "SkyBox.h"
#include "TextRendering.h"
#include "ForShader.h"

#include "IL\il.h"
#include "IL\ilu.h"
#include "IL\ilut.h"
Expand Down
1 change: 0 additions & 1 deletion Load_3D_model_2/Triangle.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#pragma once

#include "GL\glew.h"
#include "GL\freeglut.h"
#include <iostream>
#include "Camera.h"
#include "Model.h"
Expand Down
30 changes: 3 additions & 27 deletions Load_3D_model_2/main.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
#include <iostream>
#include <string>

#include "Game.h"
#include <SDL\SDL.h>

#define vova
#define PARAM
#include <iostream>
#include <string>

// 60 powtorenij w sec = kazdyje 16 milisec
const int FPS = 60;
Expand All @@ -16,26 +12,6 @@ const int LOOP_TIME = 1000 / FPS; // = 16 milisec // 1000 millisec == 1 sec

int main(int argc, char* argv[])
{

#ifdef vova
std::cout << "vova define" <<std::endl;
#else
std::cout << "vova NOT define" << std::endl;
#endif // vova

#if defined(PARAM)
std::cout << "PARAM define" << std::endl;
#elif defined(DEBUG)
std::cout << "DEBUG define" << std::endl;
#else
std::cout << "DEBUG NOT define" << std::endl;
#endif // defined(PARAM)

#ifdef _DEBUG
std::cout << "debug ON" << std::endl;
#endif // DEBUG


Uint32 frameStart, frameTime;

Game::Instance()->init();
Expand All @@ -49,7 +25,7 @@ int main(int argc, char* argv[])
Game::Instance()->playSound();

frameTime = SDL_GetTicks() - frameStart; // time for full 1 loop
//std::cout <<" time for loop = " << frameTime << " milli sec"<< std::endl;
//std::cout <<"frame time = " << frameTime << " milli sec"<< std::endl;

if (frameTime < LOOP_TIME)
{
Expand Down
Binary file removed Load_3D_model_2/res/lib/x64/Release/DevIL.dll
Binary file not shown.
Binary file removed Load_3D_model_2/res/lib/x64/Release/DevIL.lib
Binary file not shown.
Binary file removed Load_3D_model_2/res/lib/x64/Release/ILU.dll
Binary file not shown.
Binary file removed Load_3D_model_2/res/lib/x64/Release/ILU.lib
Binary file not shown.
Binary file removed Load_3D_model_2/res/lib/x64/Release/ILUT.dll
Binary file not shown.
Binary file removed Load_3D_model_2/res/lib/x64/Release/ILUT.lib
Binary file not shown.
Binary file removed Load_3D_model_2/res/lib/x64/Release/SDL2.dll
Binary file not shown.
Binary file removed Load_3D_model_2/res/lib/x64/Release/SDL2.lib
Binary file not shown.
Binary file removed Load_3D_model_2/res/lib/x64/Release/SDL2_mixer.dll
Binary file not shown.
Binary file removed Load_3D_model_2/res/lib/x64/Release/SDL2_mixer.lib
Binary file not shown.
Binary file removed Load_3D_model_2/res/lib/x64/Release/SDL2main.lib
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed Load_3D_model_2/res/lib/x64/Release/freeglut.dll
Binary file not shown.
Binary file removed Load_3D_model_2/res/lib/x64/Release/freeglut.lib
Binary file not shown.
Binary file removed Load_3D_model_2/res/lib/x64/Release/freetype.lib
Binary file not shown.
Binary file removed Load_3D_model_2/res/lib/x64/Release/glew32.dll
Binary file not shown.
Binary file removed Load_3D_model_2/res/lib/x64/Release/glew32.lib
Binary file not shown.
Binary file removed Load_3D_model_2/res/lib/x64/Release/glewinfo.exe
Binary file not shown.
Binary file removed Load_3D_model_2/res/lib/x64/Release/libFLAC-8.dll
Binary file not shown.
Binary file removed Load_3D_model_2/res/lib/x64/Release/libmikmod-2.dll
Binary file not shown.
Binary file not shown.
Binary file removed Load_3D_model_2/res/lib/x64/Release/libogg-0.dll
Binary file not shown.
Binary file removed Load_3D_model_2/res/lib/x64/Release/libvorbis-0.dll
Binary file not shown.
Binary file not shown.
Binary file removed Load_3D_model_2/res/lib/x64/Release/smpeg2.dll
Binary file not shown.

0 comments on commit 793467c

Please sign in to comment.