mirror of
https://github.com/MadeOfJelly/MushMachine.git
synced 2024-12-04 19:23:28 +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")
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
|
||||||
|
|
||||||
# add this to your projects cmake to enable ipo
|
# add this to your projects cmake to enable ipo
|
||||||
#include(CheckIPOSupported)
|
#if(CMAKE_BUILD_TYPE STREQUAL "Release" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
|
||||||
#check_ipo_supported()
|
#include(CheckIPOSupported)
|
||||||
#set(CMAKE_INTERPROCEDURAL_OPTIMIZATION ON)
|
#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
|
# enable test
|
||||||
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
|
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) {
|
FBOBuilder& FBOBuilder::attachTexture(std::shared_ptr<Texture> tex, GLuint attachment_type) {
|
||||||
GLenum target;
|
GLenum target;
|
||||||
switch (_currTarget) {
|
switch (_currTarget) {
|
||||||
case FrameBufferObject::Target::RW:
|
|
||||||
target = GL_FRAMEBUFFER;
|
|
||||||
break;
|
|
||||||
case FrameBufferObject::Target::R:
|
case FrameBufferObject::Target::R:
|
||||||
target = GL_READ_FRAMEBUFFER;
|
target = GL_READ_FRAMEBUFFER;
|
||||||
break;
|
break;
|
||||||
case FrameBufferObject::Target::W:
|
case FrameBufferObject::Target::W:
|
||||||
target = GL_DRAW_FRAMEBUFFER;
|
target = GL_DRAW_FRAMEBUFFER;
|
||||||
break;
|
break;
|
||||||
|
//case FrameBufferObject::Target::RW:
|
||||||
|
default:
|
||||||
|
target = GL_FRAMEBUFFER;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tex->samples == 0u) {
|
if (tex->samples == 0u) {
|
||||||
|
Loading…
Reference in New Issue
Block a user