You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
650B

  1. #include <GL/glew.h>
  2. #include <stdio.h>
  3. #include <stdlib.h>
  4. #define S(x) SS(x)
  5. #define SS(x) #x
  6. int main(int argc, char* argv[]) {
  7. printf("GLEW CMake test, %s build\n",
  8. S(GLEW_CMAKE_TEST_CONFIG));
  9. printf("-- linked to %s which is %s\n",
  10. S(GLEW_CMAKE_TEST_TARGET_FILE_NAME),
  11. S(GLEW_CMAKE_TEST_TARGET_TYPE));
  12. const GLubyte* v = glewGetString(GLEW_VERSION);
  13. if(v) {
  14. printf("-- glewGetString(GLEW_VERSION) returns %s\n-- test passed.\n", v);
  15. return EXIT_SUCCESS;
  16. } else {
  17. printf("-- glewGetString(GLEW_VERSION) returns NULL\n-- test failed.\n");
  18. return EXIT_FAILURE;
  19. }
  20. }