OpenGL shows black screen when using CMAKE system in QT5



  • Hi,

    I got the texture exemple and port the build system to CMAKE. But when I run it shows a black screen. I'm using QT5.

    Does everyone know something about it??

    Here is my CMAKE file:

    PROJECT(QtTexture)

    Find includes in corresponding build directories

    SET(CMAKE_INCLUDE_CURRENT_DIR ON)

    Instruct CMake to run moc automatically when needed.

    SET(CMAKE_AUTOMOC ON)

    Setting application files

    SET(HEADER_FILES window.h glwidget.h)

    SET(SRC_FILES main.cpp window.cpp glwidget.cpp)

    SET(RESOURCE_FILES textures.qrc)

    Setting the correct group to the file

    SOURCE_GROUP(Header FILES ${HEADER_FILES})
    SOURCE_GROUP(Source FILES ${SRC_FILES})
    SOURCE_GROUP(Resources FILES ${RESOURCE_FILES})

    QT5_ADD_RESOURCES(RESOURCES_GENERATED_FILES ${RESOURCE_FILES})

    Tell CMake to create the helloworld executable

    ADD_EXECUTABLE(QtTexture ${SRC_FILES} ${HEADER_FILES} ${RESOURCES_GENERATED_FILES})

    Adding depencies

    #ADD_DEPENDENCIES( test_shader dv3d_core )

    Link to libraries

    TARGET_LINK_LIBRARIES(QtTexture OPENGL32 GLU32 GLEW32)

    Use the Widgets module from Qt 5.

    QT5_USE_MODULES(QtTexture Core Widgets OpenGL)

    Thanks,
    Renato


  • Moderators

    "same topic":http://qt-project.org/forums/viewthread/25569/
    Closing the double post.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.