linux part
This commit is contained in:
parent
0cc3dce9a8
commit
b9e88547e6
2
Math.cpp
2
Math.cpp
@ -1,7 +1,7 @@
|
||||
#include "Math.h"
|
||||
|
||||
#include <exception>
|
||||
|
||||
#include <cmath>
|
||||
namespace ZL {
|
||||
|
||||
Vector2f operator+(const Vector2f& x, const Vector2f& y)
|
||||
|
||||
@ -10,6 +10,12 @@
|
||||
#include "emscripten.h"
|
||||
#endif
|
||||
|
||||
#ifdef __linux__
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glu.h>
|
||||
#include <GLES3/gl3.h>
|
||||
|
||||
#endif
|
||||
|
||||
#include <exception>
|
||||
#include <stdexcept>
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
#include "Physics.h"
|
||||
#include <cmath>
|
||||
|
||||
namespace ZL
|
||||
{
|
||||
|
||||
@ -2,4 +2,10 @@
|
||||
|
||||
```
|
||||
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
|
||||
```
|
||||
|
||||
linux:
|
||||
```
|
||||
g++ Game.cpp main.cpp Math.cpp OpenGlExtensions.cpp Physics.cpp Renderer.cpp ShaderManager.cpp TextureManager.cpp Utils.cpp -o sdl_app -O2 -std=c++14 $(pkg-config --cflags --libs sdl2 gl)
|
||||
|
||||
```
|
||||
@ -29,7 +29,8 @@ namespace ZL {
|
||||
VAOHolder::~VAOHolder()
|
||||
{
|
||||
#ifndef EMSCRIPTEN
|
||||
glDeleteVertexArray(1, &vao);
|
||||
glDeleteVertexArrays(1, &vao);
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#include "Utils.h"
|
||||
|
||||
#include <cstring>
|
||||
#include <iterator>
|
||||
#include <vector>
|
||||
#include <iostream>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user