fix tpsGame build

This commit is contained in:
lewa_j 2019-09-30 20:36:05 +03:00
parent e265413e23
commit 3593e8dea8
3 changed files with 10 additions and 7 deletions

View File

@ -1,8 +1,8 @@
#include ../demos/cube/Android.mk
#include ../demos/SSR/Android.mk
#include ../demos/gravity/Android.mk
include ../demos/VolLight/Android.mk
#include ../demos/VolLight/Android.mk
#include ../demos/ComprTex/Android.mk
#include ../demos/blur-test/Android.mk
#include ../demos/tpsGame/Android.mk
include ../demos/tpsGame/Android.mk
#include ../../vbsp-gles/src/Android.mk

View File

@ -9,15 +9,15 @@ LOCAL_C_INCLUDES := $(LOCAL_PATH)/. $(LOCAL_PATH)/../../../libs/glm/glm $(LOCAL_
LOCAL_SRC_FILES := $(ENGINE_DIR)android_backend.cpp $(ENGINE_DIR)game/IGame.cpp $(ENGINE_DIR)log.cpp $(ENGINE_DIR)system/FileSystem.cpp $(ENGINE_DIR)system/config.cpp \
$(ENGINE_DIR)cull/frustum.cpp $(ENGINE_DIR)cull/BoundingBox.cpp $(ENGINE_DIR)scene/Scene.cpp \
$(ENGINE_DIR)graphics/gl_utils.cpp $(ENGINE_DIR)graphics/vbo.cpp $(ENGINE_DIR)graphics/glsl_prog.cpp $(ENGINE_DIR)graphics/texture.cpp $(ENGINE_DIR)graphics/fbo.cpp \
$(ENGINE_DIR)renderer/renderer.cpp $(ENGINE_DIR)renderer/camera.cpp $(ENGINE_DIR)renderer/Model.cpp $(ENGINE_DIR)renderer/font.cpp $(ENGINE_DIR)renderer/mesh.cpp \
$(ENGINE_DIR)renderer/renderer.cpp $(ENGINE_DIR)renderer/LightingForward.cpp $(ENGINE_DIR)renderer/camera.cpp $(ENGINE_DIR)renderer/Model.cpp $(ENGINE_DIR)renderer/font.cpp $(ENGINE_DIR)renderer/mesh.cpp \
$(ENGINE_DIR)resource/ResourceManager.cpp $(ENGINE_DIR)resource/vtf_loader.cpp $(ENGINE_DIR)resource/dds_loader.cpp $(ENGINE_DIR)resource/nmf_loader.cpp $(ENGINE_DIR)resource/mesh_loader.cpp \
init.cpp tpsMaterials.cpp tpsMenu.cpp scene_txt_loader.cpp tpsObjects.cpp tpsPhysics.cpp tpsWeapon.cpp tpsPlayer.cpp
LOCAL_LDLIBS := -llog -lGLESv2 -lm -lEGL
LOCAL_C_INCLUDES += $(LOCAL_PATH)/../../libs/bullet/src
LOCAL_C_INCLUDES += $(LOCAL_PATH)/../../../libs/bullet3-2.86.1/src
LOCAL_LDLIBS += -lBullet
#LOCAL_STATIC_LIBRARIES
LOCAL_LDFLAGS += -L../libs/bullet
LOCAL_LDFLAGS += -L$(LOCAL_PATH)/../../../libs/bullet3-2.86.1/lib
include $(BUILD_SHARED_LIBRARY)

View File

@ -20,6 +20,7 @@ public:
progLightDir.u_mvpMtx = progLightDir.GetUniformLoc("u_mvpMtx");
progLightDir.u_modelMtx = progLightDir.GetUniformLoc("u_modelMtx");
progLightDir.u_cameraPos = progLightDir.GetUniformLoc("u_camPos");
progLightDir.u_color = progLightDir.GetUniformLoc("u_color");
u_lightDir = progLightDir.GetUniformLoc("u_lightDir");
progLightPoint.CreateFromFile("lightPoint","lightPoint");
@ -29,6 +30,7 @@ public:
u_lightPos = progLightPoint.GetUniformLoc("u_lightPos");
u_lightColor = progLightPoint.GetUniformLoc("u_lightColor");
u_lightSize = progLightPoint.GetUniformLoc("u_lightSize");
}
virtual void Draw(){
@ -37,6 +39,7 @@ public:
{
r->UseProg(&progLightDir);
glUniform3fv(progLightDir.u_cameraPos,1,&(camera->pos.x));
glUniform4f(progLightDir.u_color,1,1,1,1);
glUniform3fv(u_lightDir,1,&(scene->sunDirection.x));
}
virtual void SetCamera(Camera *cam){