Forum Replies Created
-
AuthorPosts
-
kinuoParticipant
抱歉哈 我也忘記了。只能提供一些我的文件中的一些信息給你參考了。
********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”kinuoParticipantH:\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。kinuoParticipant请问你解决了吗?我是rasterizer output.png normal之后也是显示不了。只有Rasterizing using the normal shader。
kinuoParticipant输入rasterizer output.png normal之后。
在vs code里只显示这一句话,然后什么反应也没有了。
Rasterizing using the normal shader -
AuthorPosts