Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 3 of 3

Thread: OpenGL Superbible on MAC compiled without errors but do not run

  1. #1
    Junior Member Newbie
    Join Date
    Jul 2014
    Posts
    4

    OpenGL Superbible on MAC compiled without errors but do not run

    Hello i have stared to learn opengl via the opengl superbible 6th ed. I am programming on Mac 10.9.4 (Maverick)
    which can run opengl till vers. 4.3. (mentioned via OpenGL viewer for mac). The development environment i am
    using is xcode vers. 5.1.1. I have matched to build all the projects like it was explained in the HOWTOBUILD.txt file (with CMake)
    without any errors only one warning that swap16 in the sb6ktx,cpp is unused. The project i am trying to run is the sb6
    project (1st). When i run the project it only says successfull build but it don't runs the program (the window with red background).

    The code i have separatley written in a file called my.cpp is schown below:

    Code :
    #include "sb6.h"
     
    class my_application : public sb6::application
    {
    public:
      void render(double currentTime)
      {
        static const GLfloat red[] = {1.0f, 0.0f, 0.0f, 1.0f};
        glClearBufferfv(GL_COLOR, 0, red);
      }
    };
    DECLARE_MAIN(my_application);

    The tree structure of my project sb6 is:
    Click image for larger version. 

Name:	tree.jpg 
Views:	20 
Size:	9.3 KB 
ID:	1393

    Can someone help?

    THX in advance

    Maybe i have to set the my.cpp file as my first executing file? If YES how can i do this?
    Last edited by mike01; 08-12-2014 at 02:35 PM.

  2. #2
    Junior Member Newbie
    Join Date
    Jul 2014
    Posts
    4
    nobody any suggestions?

  3. #3
    Intern Newbie
    Join Date
    Apr 2014
    Posts
    47
    Did you try going to the "Product" menu and hit "Run"?

    Make sure you created the Xcode project using CMake and not manually.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •