mirror of
https://github.com/MadeOfJelly/MushMachine.git
synced 2024-12-04 03:03:29 +01:00
fix linker warning and add lto example as comment
This commit is contained in:
parent
3f03bbbd49
commit
20dd451cd0
@ -20,9 +20,16 @@ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
|
||||
|
||||
# add this to your projects cmake to enable ipo
|
||||
#include(CheckIPOSupported)
|
||||
#check_ipo_supported()
|
||||
#set(CMAKE_INTERPROCEDURAL_OPTIMIZATION ON)
|
||||
#if(CMAKE_BUILD_TYPE STREQUAL "Release" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
|
||||
#include(CheckIPOSupported)
|
||||
#check_ipo_supported(RESULT HAVE_LTO)
|
||||
#if(HAVE_LTO)
|
||||
#set(CMAKE_INTERPROCEDURAL_OPTIMIZATION ON)
|
||||
#message(STATUS "Enabled LTO")
|
||||
#else()
|
||||
#message(STATUS "LTO not supported")
|
||||
#endif()
|
||||
#endif()
|
||||
|
||||
# enable test
|
||||
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
|
||||
|
@ -55,15 +55,16 @@ FBOBuilder& FBOBuilder::setTarget(FrameBufferObject::Target target) {
|
||||
FBOBuilder& FBOBuilder::attachTexture(std::shared_ptr<Texture> tex, GLuint attachment_type) {
|
||||
GLenum target;
|
||||
switch (_currTarget) {
|
||||
case FrameBufferObject::Target::RW:
|
||||
target = GL_FRAMEBUFFER;
|
||||
break;
|
||||
case FrameBufferObject::Target::R:
|
||||
target = GL_READ_FRAMEBUFFER;
|
||||
break;
|
||||
case FrameBufferObject::Target::W:
|
||||
target = GL_DRAW_FRAMEBUFFER;
|
||||
break;
|
||||
//case FrameBufferObject::Target::RW:
|
||||
default:
|
||||
target = GL_FRAMEBUFFER;
|
||||
break;
|
||||
}
|
||||
|
||||
if (tex->samples == 0u) {
|
||||
|
Loading…
Reference in New Issue
Block a user