Commit 7a50e490dcdd132bf2faac644fc9045b07c0b83a

Authored by Olav Kjartan Larseng
1 parent 52dfff70

models and textures are working

SpaceShooterV4/SpaceshipModelTest.cpp
... ... @@ -17,7 +17,7 @@ void SpaceshipModelTest::privateInit()
17 17  
18 18 _texture = SOIL_load_OGL_texture
19 19 (
20   - "assets/models/SS1_OBJ/HULL.jpg",
  20 + "assets/models/Spaceship/Textures/shipA.bmp",
21 21 SOIL_LOAD_AUTO,
22 22 SOIL_CREATE_NEW_ID,
23 23 SOIL_FLAG_MIPMAPS | SOIL_FLAG_INVERT_Y | SOIL_FLAG_NTSC_SAFE_RGB | SOIL_FLAG_COMPRESS_TO_DXT
... ... @@ -30,7 +30,7 @@ void SpaceshipModelTest::privateInit()
30 30  
31 31  
32 32 objl::Loader Loader;
33   - bool loadout = Loader.LoadFile("assets/models/SS1_OBJ/SS1.obj");
  33 + bool loadout = Loader.LoadFile("assets/models/Spaceship/shipA_OBJ/shipA_OBJ.obj");
34 34  
35 35 if (loadout)
36 36 {
... ... @@ -69,7 +69,7 @@ void SpaceshipModelTest::privateRender()
69 69  
70 70 glDisable(GL_COLOR_MATERIAL);
71 71  
72   - //glColor4f(1, 1, 1, 1);
  72 + glClearColor(0.0, 0.0, 0.0, 0.0);
73 73  
74 74 glActiveTexture(GL_TEXTURE0);
75 75 glEnable(GL_TEXTURE_2D);
... ... @@ -80,8 +80,10 @@ void SpaceshipModelTest::privateRender()
80 80  
81 81 glEnable(GL_PRIMITIVE_RESTART);
82 82  
83   - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
84   - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
  83 + //glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
  84 + //glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
  85 + //glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
  86 + //glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
85 87 //glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
86 88 //glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
87 89  
... ...
SpaceShooterV4/assets/shaders/spaceship.vert
... ... @@ -2,6 +2,6 @@ varying vec4 texCoord;
2 2  
3 3 void main()
4 4 {
5   - texCoord = gl_Vertex;
  5 + texCoord = gl_MultiTexCoord0;
6 6 gl_Position = gl_ModelViewProjectionMatrix * (gl_Vertex);
7 7 }
8 8 \ No newline at end of file
... ...
SpaceShooterV4/x64/Debug/SpaceShooterV4.log
1 1  SpaceshipModelTest.cpp
2 2 d:\csmaster\opengl projects\projects\spaceshooterv4\spaceshooterv4\spaceshooterv4\include\obj_loader.h(915): warning C4244: 'initializing': conversion from 'double' to 'float', possible loss of data
3   -d:\csmaster\opengl projects\projects\spaceshooterv4\spaceshooterv4\spaceshooterv4\spaceshipmodeltest.cpp(95): warning C4267: 'argument': conversion from 'size_t' to 'GLsizei', possible loss of data
  3 +d:\csmaster\opengl projects\projects\spaceshooterv4\spaceshooterv4\spaceshooterv4\spaceshipmodeltest.cpp(97): warning C4267: 'argument': conversion from 'size_t' to 'GLsizei', possible loss of data
4 4 SOIL.lib(SOIL.obj) : MSIL .netmodule or module compiled with /GL found; restarting link with /LTCG; add /LTCG to the link command line to improve linker performance
5 5 LINK : warning LNK4075: ignoring '/INCREMENTAL' due to '/LTCG' specification
6 6 LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library
... ...
SpaceShooterV4/x64/Debug/SpaceShooterV4.tlog/CL.read.1.tlog
1 1 Binary files a/SpaceShooterV4/x64/Debug/SpaceShooterV4.tlog/CL.read.1.tlog and b/SpaceShooterV4/x64/Debug/SpaceShooterV4.tlog/CL.read.1.tlog differ
... ...
SpaceShooterV4/x64/Debug/SpaceShooterV4.tlog/CL.write.1.tlog
1 1 Binary files a/SpaceShooterV4/x64/Debug/SpaceShooterV4.tlog/CL.write.1.tlog and b/SpaceShooterV4/x64/Debug/SpaceShooterV4.tlog/CL.write.1.tlog differ
... ...
SpaceShooterV4/x64/Debug/SpaceShooterV4.tlog/SpaceShooterV4.write.1u.tlog
1 1 Binary files a/SpaceShooterV4/x64/Debug/SpaceShooterV4.tlog/SpaceShooterV4.write.1u.tlog and b/SpaceShooterV4/x64/Debug/SpaceShooterV4.tlog/SpaceShooterV4.write.1u.tlog differ
... ...
SpaceShooterV4/x64/Debug/SpaceshipModelTest.obj
No preview for this file type
SpaceShooterV4/x64/Debug/main.obj
No preview for this file type
SpaceShooterV4/x64/Debug/vc141.idb
No preview for this file type
SpaceShooterV4/x64/Debug/vc141.pdb
No preview for this file type
x64/Debug/SpaceShooterV4.exe
No preview for this file type
x64/Debug/SpaceShooterV4.pdb
No preview for this file type