Put shaders into the data/ directory

Simplifies a lot of things
This commit is contained in:
heinrich5991 2017-11-08 22:19:47 +01:00
parent 3fdc87047b
commit 17d3f4afa4
17 changed files with 15 additions and 21 deletions

View file

@ -422,7 +422,6 @@ endif()
########################################################################
file(COPY data DESTINATION .)
file(COPY shader DESTINATION .)
set(COPY_FILES
${CURL_COPY_FILES}
${FREETYPE_COPY_FILES}
@ -1160,7 +1159,6 @@ endforeach()
set(CMAKE_INSTALL_DEFAULT_COMPONENT_NAME ${PROJECT_NAME})
install(TARGETS ${TARGET_CLIENT} ${TARGET_SERVER} DESTINATION bin)
install(DIRECTORY data shader DESTINATION share/DDNet)
set(CPACK_TARGETS
${TARGET_CLIENT}
@ -1171,7 +1169,7 @@ set(CPACK_TARGETS
map_diff
map_extract
)
set(CPACK_DIRS data shader)
set(CPACK_DIRS data)
set(CPACK_FILES
license.txt
storage.cfg

View file

@ -66,8 +66,6 @@ shutil.copy("autoexec_server.cfg", package_dir)
if include_data and not use_bundle:
os.mkdir(os.path.join(package_dir, "data"))
copydir("data", package_dir)
os.mkdir(os.path.join(package_dir, "shader"))
copydir("shader", package_dir)
if platform[:3] == "win":
shutil.copy("other/config_directory.bat", package_dir)
shutil.copy("SDL2.dll", package_dir)
@ -121,9 +119,7 @@ if use_bundle:
os.mkdir(clientbundle_resource_dir)
os.mkdir(clientbundle_framework_dir)
os.mkdir(os.path.join(clientbundle_resource_dir, "data"))
os.mkdir(os.path.join(clientbundle_resource_dir, "shader"))
copydir("data", clientbundle_resource_dir)
copydir("shader", clientbundle_resource_dir)
shutil.copy("other/icons/DDNet.icns", clientbundle_resource_dir)

View file

@ -598,8 +598,8 @@ void CCommandProcessorFragment_OpenGL3_3::Cmd_Init(const SCommand_Init *pCommand
{
CGLSL PrimitiveVertexShader;
CGLSL PrimitiveFragmentShader;
PrimitiveVertexShader.LoadShader("./shader/prim.vert", GL_VERTEX_SHADER);
PrimitiveFragmentShader.LoadShader("./shader/prim.frag", GL_FRAGMENT_SHADER);
PrimitiveVertexShader.LoadShader("data/shader/prim.vert", GL_VERTEX_SHADER);
PrimitiveFragmentShader.LoadShader("data/shader/prim.frag", GL_FRAGMENT_SHADER);
m_pPrimitiveProgram->CreateProgram();
m_pPrimitiveProgram->AddShader(&PrimitiveVertexShader);
@ -615,8 +615,8 @@ void CCommandProcessorFragment_OpenGL3_3::Cmd_Init(const SCommand_Init *pCommand
{
CGLSL VertexShader;
CGLSL FragmentShader;
VertexShader.LoadShader("./shader/tile.vert", GL_VERTEX_SHADER);
FragmentShader.LoadShader("./shader/tile.frag", GL_FRAGMENT_SHADER);
VertexShader.LoadShader("data/shader/tile.vert", GL_VERTEX_SHADER);
FragmentShader.LoadShader("data/shader/tile.frag", GL_FRAGMENT_SHADER);
m_pTileProgram->CreateProgram();
m_pTileProgram->AddShader(&VertexShader);
@ -634,8 +634,8 @@ void CCommandProcessorFragment_OpenGL3_3::Cmd_Init(const SCommand_Init *pCommand
{
CGLSL VertexShader;
CGLSL FragmentShader;
VertexShader.LoadShader("./shader/tiletex.vert", GL_VERTEX_SHADER);
FragmentShader.LoadShader("./shader/tiletex.frag", GL_FRAGMENT_SHADER);
VertexShader.LoadShader("data/shader/tiletex.vert", GL_VERTEX_SHADER);
FragmentShader.LoadShader("data/shader/tiletex.frag", GL_FRAGMENT_SHADER);
m_pTileProgramTextured->CreateProgram();
m_pTileProgramTextured->AddShader(&VertexShader);
@ -653,8 +653,8 @@ void CCommandProcessorFragment_OpenGL3_3::Cmd_Init(const SCommand_Init *pCommand
{
CGLSL VertexShader;
CGLSL FragmentShader;
VertexShader.LoadShader("./shader/bordertile.vert", GL_VERTEX_SHADER);
FragmentShader.LoadShader("./shader/bordertile.frag", GL_FRAGMENT_SHADER);
VertexShader.LoadShader("data/shader/bordertile.vert", GL_VERTEX_SHADER);
FragmentShader.LoadShader("data/shader/bordertile.frag", GL_FRAGMENT_SHADER);
m_pBorderTileProgram->CreateProgram();
m_pBorderTileProgram->AddShader(&VertexShader);
@ -675,8 +675,8 @@ void CCommandProcessorFragment_OpenGL3_3::Cmd_Init(const SCommand_Init *pCommand
{
CGLSL VertexShader;
CGLSL FragmentShader;
VertexShader.LoadShader("./shader/bordertiletex.vert", GL_VERTEX_SHADER);
FragmentShader.LoadShader("./shader/bordertiletex.frag", GL_FRAGMENT_SHADER);
VertexShader.LoadShader("data/shader/bordertiletex.vert", GL_VERTEX_SHADER);
FragmentShader.LoadShader("data/shader/bordertiletex.frag", GL_FRAGMENT_SHADER);
m_pBorderTileProgramTextured->CreateProgram();
m_pBorderTileProgramTextured->AddShader(&VertexShader);
@ -697,8 +697,8 @@ void CCommandProcessorFragment_OpenGL3_3::Cmd_Init(const SCommand_Init *pCommand
{
CGLSL VertexShader;
CGLSL FragmentShader;
VertexShader.LoadShader("./shader/bordertileline.vert", GL_VERTEX_SHADER);
FragmentShader.LoadShader("./shader/bordertileline.frag", GL_FRAGMENT_SHADER);
VertexShader.LoadShader("data/shader/bordertileline.vert", GL_VERTEX_SHADER);
FragmentShader.LoadShader("data/shader/bordertileline.frag", GL_FRAGMENT_SHADER);
m_pBorderTileLineProgram->CreateProgram();
m_pBorderTileLineProgram->AddShader(&VertexShader);
@ -717,8 +717,8 @@ void CCommandProcessorFragment_OpenGL3_3::Cmd_Init(const SCommand_Init *pCommand
{
CGLSL VertexShader;
CGLSL FragmentShader;
VertexShader.LoadShader("./shader/bordertilelinetex.vert", GL_VERTEX_SHADER);
FragmentShader.LoadShader("./shader/bordertilelinetex.frag", GL_FRAGMENT_SHADER);
VertexShader.LoadShader("data/shader/bordertilelinetex.vert", GL_VERTEX_SHADER);
FragmentShader.LoadShader("data/shader/bordertilelinetex.frag", GL_FRAGMENT_SHADER);
m_pBorderTileLineProgramTextured->CreateProgram();
m_pBorderTileLineProgramTextured->AddShader(&VertexShader);