Skip to content

Commit 2764ece

Browse files
committed
vcpkg: fix test
1 parent b0b34ec commit 2764ece

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

build/vcpkg/test/main.cpp

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,16 @@
55
#include <ruis/render/opengl/context.hpp>
66

77
int main(int argc, const char** argv){
8-
ruis::render::opengl::context c;
8+
std::function<void()> f = [](){
9+
ruis::render::opengl::context c;
10+
};
911

10-
std::cout << "scissor enabled = " << c.is_scissor_enabled() << std::endl;
12+
// do not call f() to avoid segmentation fault, becuase OpenGL is not initialized
1113

14+
if(!f){
15+
return 1;
16+
}
17+
18+
std::cout << "Hello ruis-render-opengl!" << std::endl;
1219
return 0;
1320
}

0 commit comments

Comments
 (0)