added first room
This commit is contained in:
parent
fa520b5df8
commit
fe88d27632
26
.vscode/settings.json
vendored
Normal file
26
.vscode/settings.json
vendored
Normal file
@ -0,0 +1,26 @@
|
||||
{
|
||||
"files.associations": {
|
||||
"array": "cpp",
|
||||
"bitset": "cpp",
|
||||
"string_view": "cpp",
|
||||
"hash_map": "cpp",
|
||||
"hash_set": "cpp",
|
||||
"initializer_list": "cpp",
|
||||
"span": "cpp",
|
||||
"regex": "cpp",
|
||||
"valarray": "cpp",
|
||||
"__hash_table": "cpp",
|
||||
"__split_buffer": "cpp",
|
||||
"__tree": "cpp",
|
||||
"deque": "cpp",
|
||||
"list": "cpp",
|
||||
"map": "cpp",
|
||||
"queue": "cpp",
|
||||
"set": "cpp",
|
||||
"stack": "cpp",
|
||||
"string": "cpp",
|
||||
"unordered_map": "cpp",
|
||||
"unordered_set": "cpp",
|
||||
"vector": "cpp"
|
||||
}
|
||||
}
|
||||
@ -28,9 +28,14 @@ void GameObjectManager::initialize() {
|
||||
testObjMeshMutable.RefreshVBO();
|
||||
|
||||
textMesh = ZL::LoadFromTextFile("./mesh_first_room.txt"); // Add ZL:: namespace
|
||||
textMesh.Scale(17);
|
||||
textMesh.SwapZandY();
|
||||
textMesh.RotateByMatrix(QuatToMatrix(QuatFromRotateAroundX(M_PI * 0.5)));
|
||||
|
||||
|
||||
coneMesh = ZL::LoadFromTextFile("./cone001.txt"); // Add ZL:: namespace
|
||||
coneMesh.Scale(200);
|
||||
textMesh.Scale(20);
|
||||
|
||||
|
||||
textMeshMutable.AssignFrom(textMesh);
|
||||
textMeshMutable.RefreshVBO();
|
||||
|
||||
46
Readme.md.save
Normal file
46
Readme.md.save
Normal file
@ -0,0 +1,46 @@
|
||||
# Script to run:
|
||||
|
||||
```
|
||||
C:\Work\Projects\emsdk\emsdk.bat activate latest
|
||||
C:\Work\Projects\emsdk\emsdk_env.bat
|
||||
emcc main.cpp Game.cpp Math.cpp Physics.cpp Renderer.cpp ShaderManager.cpp TextureManager.cpp Utils.cpp OpenGlExtensions.cpp -O2 -std=c++14 -sTOTAL_MEMORY=33554432 -sUSE_SDL_IMAGE=2 -sSDL2_IMAGE_FORMATS="[""png""]" -sUSE_SDL=2 --preload-file background.bmp --preload-file bird.bmp32 --preload-file default.fragment --preload-file default.vertex --preload-file game_over.bmp32 --preload-file pipe.bmp32 -o jumpingbird.html
|
||||
```
|
||||
|
||||
```
|
||||
|
||||
|
||||
zlib-1.3.1:
|
||||
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DCMAKE_INSTALL_PREFIX=install ..
|
||||
|
||||
then run ALL_BUILD and INSTALL in Visual Studio
|
||||
|
||||
lpng1645:
|
||||
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DCMAKE_INSTALL_PREFIX=install -DZLIB_ROOT=C:\Work\Projects\zlib-1.3.1\build\install ..
|
||||
|
||||
then run ALL_BUILD and INSTALL in Visual Studio
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
https://github.com/Bly7/OBJ-Loader/blob/master/Source/OBJ_Loader.h
|
||||
|
||||
|
||||
https://github.com/gametutorials/tutorials/blob/master/OpenGL/MD3%20Animation/Main.cpp
|
||||
|
||||
|
||||
|
||||
linux:
|
||||
```
|
||||
g++ Game.cpp main.cpp Math.cpp OpenGlExtensions.cpp Physics.cpp Renderer.cpp ShaderManager.cpp TextureManager.cpp Utils.cpp BoneAnimatedModel.cpp ObjLoader.cpp cmakeaudioplayer/src/AudioPlayer.cpp TextModel.cpp Inventory.cpp -o sdl_app -O2 -std=c++17 \
|
||||
-I cmakeaudioplayer/include \
|
||||
$(pkg-config --cflags --libs sdl2 gl) \
|
||||
$(pkg-config --cflags --libs vorbis vorbisfile ogg) \
|
||||
-lopenal
|
||||
```
|
||||
@ -1,6 +1,5 @@
|
||||
#include "Renderer.h"
|
||||
|
||||
|
||||
#include <cmath>
|
||||
|
||||
namespace ZL {
|
||||
|
||||
@ -297,6 +296,7 @@ namespace ZL {
|
||||
PositionData[i].v[2] = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void VertexDataStruct::RotateByMatrix(Matrix3f m)
|
||||
{
|
||||
|
||||
1
py_script.py
Normal file
1
py_script.py
Normal file
@ -0,0 +1 @@
|
||||
/home/albert/Downloads/Telegram Desktop/plain_obj_script.py
|
||||
6253
textures/mesh-of-first-room-with-roof.txt
Normal file
6253
textures/mesh-of-first-room-with-roof.txt
Normal file
File diff suppressed because it is too large
Load Diff
5997
textures/mesh-of-first-room-without-roof.txt
Normal file
5997
textures/mesh-of-first-room-without-roof.txt
Normal file
File diff suppressed because it is too large
Load Diff
4833
textures/mesh_first_room.txt
Normal file
4833
textures/mesh_first_room.txt
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user