kinuo

Forum Replies Created

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • in reply to: 作业3 rasterizer output.png normal #17340 Score: 0
    kinuo
    Participant

    抱歉哈 我也忘記了。只能提供一些我的文件中的一些信息給你參考了。
    ********in CMakeLists.txt
    cmake_minimum_required(VERSION 3.10)
    project(Rasterizer)

    find_package(OpenCV REQUIRED)

    set(CMAKE_CXX_STANDARD 17)
    set(CMAKE_CXX_STANDARD_REQUIRED True)

    set(CMAKE_C_COMPILER “H:\\compiler\\mingw64\\bin\\gcc.exe”)
    set(CMAKE_CXX_COMPILER “H:\\compiler\\mingw64\\bin\\g++.exe”)
    include_directories(“H:\\programing\\cpp_file\\ustcCG\\Eigen”)

    add_executable(Rasterizer main.cpp rasterizer.hpp rasterizer.cpp global.hpp Triangle.hpp Triangle.cpp Texture.hpp Texture.cpp Shader.hpp OBJ_Loader.h)
    target_link_libraries(Rasterizer ${OpenCV_LIBRARIES})
    #target_compile_options(Rasterizer PUBLIC -Wall -Wextra -pedantic)

    *********in Texture.hpp
    #ifndef RASTERIZER_TEXTURE_H
    #define RASTERIZER_TEXTURE_H
    #include “global.hpp”
    #include <Eigen/Eigen>
    #include <opencv2/opencv.hpp>

    *********in main.cpp
    #include <iostream>
    #include <opencv2/opencv.hpp>

    #include “global.hpp”
    #include “rasterizer.hpp”
    #include “Triangle.hpp”

    #include “Shader.hpp”
    #include “Texture.hpp”
    #include “OBJ_Loader.h”

    in reply to: 作业3 rasterizer output.png normal #17053 Score: 0
    kinuo
    Participant

    H:\programing\cpp_file\ustcCG\games101\week5\rasterizer.hpp:107:14: error: ‘optional’ in namespace ‘std’ does not name a template type
    std::optional<Texture> texture;
    ^~~~~~~~
    H:\programing\cpp_file\ustcCG\games101\week5\rasterizer.hpp:107:9: note: ‘std::optional’ is only available from C++17 onwards
    std::optional<Texture> texture;
    ^~~
    可是cmakelists里面,.vscode的各个文件里面都是c17。

    in reply to: 作业3求助 #17052 Score: 0
    kinuo
    Participant

    请问你解决了吗?我是rasterizer output.png normal之后也是显示不了。只有Rasterizing using the normal shader。

    in reply to: 作业三完成步骤1、2后没能成功运行 #17049 Score: 0
    kinuo
    Participant

    输入rasterizer output.png normal之后。
    在vs code里只显示这一句话,然后什么反应也没有了。
    Rasterizing using the normal shader

Viewing 4 posts - 1 through 4 (of 4 total)