Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions src/libprojectM/Renderer/TextureManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ auto TextureManager::GetSampler(const std::string& fullName) -> std::shared_ptr<
void TextureManager::Preload()
{
// Create samplers
m_samplers.emplace(std::pair<GLint, GLint>(GL_CLAMP_TO_EDGE, GL_LINEAR), std::make_shared<Sampler>(GL_CLAMP_TO_EDGE, GL_LINEAR));
m_samplers.emplace(std::pair<GLint, GLint>(GL_CLAMP_TO_EDGE, GL_NEAREST), std::make_shared<Sampler>(GL_CLAMP_TO_EDGE, GL_NEAREST));
m_samplers.emplace(std::pair<GLint, GLint>(GL_REPEAT, GL_LINEAR), std::make_shared<Sampler>(GL_REPEAT, GL_LINEAR));
m_samplers.emplace(std::pair<GLint, GLint>(GL_REPEAT, GL_NEAREST), std::make_shared<Sampler>(GL_REPEAT, GL_NEAREST));
m_samplers.emplace(std::make_pair(GL_CLAMP_TO_EDGE, GL_LINEAR), std::make_shared<Sampler>(GL_CLAMP_TO_EDGE, GL_LINEAR));
m_samplers.emplace(std::make_pair(GL_CLAMP_TO_EDGE, GL_NEAREST), std::make_shared<Sampler>(GL_CLAMP_TO_EDGE, GL_NEAREST));
m_samplers.emplace(std::make_pair(GL_REPEAT, GL_LINEAR), std::make_shared<Sampler>(GL_REPEAT, GL_LINEAR));
m_samplers.emplace(std::make_pair(GL_REPEAT, GL_NEAREST), std::make_shared<Sampler>(GL_REPEAT, GL_NEAREST));

int width{};
int height{};
Expand All @@ -78,7 +78,7 @@ void TextureManager::Preload()
M_bytes,
SOIL_LOAD_AUTO,
SOIL_CREATE_NEW_ID,
SOIL_FLAG_POWER_OF_TWO | SOIL_FLAG_MULTIPLY_ALPHA, &width, &height);
SOIL_FLAG_POWER_OF_TWO | SOIL_FLAG_MULTIPLY_ALPHA);

m_textures["idlem"] = std::make_shared<Texture>("idlem", tex, GL_TEXTURE_2D, width, height, false);;

Expand All @@ -87,7 +87,7 @@ void TextureManager::Preload()
headphones_bytes,
SOIL_LOAD_AUTO,
SOIL_CREATE_NEW_ID,
SOIL_FLAG_POWER_OF_TWO | SOIL_FLAG_MULTIPLY_ALPHA, &width, &height);
SOIL_FLAG_POWER_OF_TWO | SOIL_FLAG_MULTIPLY_ALPHA);

m_textures["idleheadphones"] = std::make_shared<Texture>("idleheadphones", tex, GL_TEXTURE_2D, width, height, false);;

Expand Down Expand Up @@ -217,7 +217,7 @@ auto TextureManager::LoadTexture(const ScannedFile& file) -> std::shared_ptr<Tex
file.filePath.c_str(),
SOIL_LOAD_RGBA,
SOIL_CREATE_NEW_ID,
SOIL_FLAG_MULTIPLY_ALPHA, &width, &height);
SOIL_FLAG_MULTIPLY_ALPHA);

if (tex == 0)
{
Expand Down
63 changes: 36 additions & 27 deletions vendor/SOIL2/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,31 +1,34 @@
add_library(SOIL2 OBJECT
etc1_utils.c
etc1_utils.h
image_DXT.c
image_DXT.h
image_helper.c
image_helper.h
pkm_helper.h
pvr_helper.h
SOIL2.c
SOIL2.h
stb_image.h
stb_image_write.h
stbi_DDS.h
stbi_DDS_c.h
stbi_ext.h
stbi_ext_c.h
stbi_pkm.h
stbi_pkm_c.h
stbi_pvr.h
stbi_pvr_c.h
${CMAKE_CURRENT_SOURCE_DIR}/src/common/common.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/common/common.hpp
${CMAKE_CURRENT_SOURCE_DIR}/src/SOIL2/image_DXT.c
${CMAKE_CURRENT_SOURCE_DIR}/src/SOIL2/image_DXT.h
${CMAKE_CURRENT_SOURCE_DIR}/src/SOIL2/image_helper.c
${CMAKE_CURRENT_SOURCE_DIR}/src/SOIL2/image_helper.h
${CMAKE_CURRENT_SOURCE_DIR}/src/SOIL2/pkm_helper.h
${CMAKE_CURRENT_SOURCE_DIR}/src/SOIL2/pvr_helper.h
${CMAKE_CURRENT_SOURCE_DIR}/src/SOIL2/SOIL2.c
${CMAKE_CURRENT_SOURCE_DIR}/src/SOIL2/SOIL2.h
${CMAKE_CURRENT_SOURCE_DIR}/src/SOIL2/stb_image.h
${CMAKE_CURRENT_SOURCE_DIR}/src/SOIL2/stb_image_write.h
${CMAKE_CURRENT_SOURCE_DIR}/src/SOIL2/stbi_DDS.h
${CMAKE_CURRENT_SOURCE_DIR}/src/SOIL2/stbi_DDS_c.h
${CMAKE_CURRENT_SOURCE_DIR}/src/SOIL2/stbi_ext.h
${CMAKE_CURRENT_SOURCE_DIR}/src/SOIL2/stbi_ext_c.h
${CMAKE_CURRENT_SOURCE_DIR}/src/SOIL2/stbi_pkm.h
${CMAKE_CURRENT_SOURCE_DIR}/src/SOIL2/stbi_pkm_c.h
${CMAKE_CURRENT_SOURCE_DIR}/src/SOIL2/stbi_pvr.h
${CMAKE_CURRENT_SOURCE_DIR}/src/SOIL2/stbi_pvr_c.h
${CMAKE_CURRENT_SOURCE_DIR}/src/SOIL2/stbi_qoi.h
${CMAKE_CURRENT_SOURCE_DIR}/src/SOIL2/stbi_qoi_c.h
${CMAKE_CURRENT_SOURCE_DIR}/src/SOIL2/stbi_qoi_write.h
${CMAKE_CURRENT_SOURCE_DIR}/src/SOIL2/wfETC.c
${CMAKE_CURRENT_SOURCE_DIR}/src/SOIL2/wfETC.h
)

target_include_directories(SOIL2
PRIVATE
"."
PUBLIC
"${CMAKE_CURRENT_SOURCE_DIR}/.."
"${CMAKE_CURRENT_SOURCE_DIR}/src"
)

target_link_libraries(SOIL2
Expand All @@ -36,15 +39,21 @@ target_link_libraries(SOIL2
if(USE_GLES)
target_compile_definitions(SOIL2
PRIVATE
SOIL_GLES3
SOIL_NO_EGL
SOIL_GLES2
)
target_link_libraries(SOIL2
PUBLIC
${CMAKE_DL_LIBS}
)
endif()


if(NOT TARGET OpenGL::EGL)
target_compile_definitions(SOIL2
PRIVATE
SOIL_NO_EGL
)
endif()

set_target_properties(SOIL2 PROPERTIES
FOLDER libprojectM
FOLDER vendor/SOIL2
)
Loading
Loading