My first question here. In my program depth testing works properly on some computers, but it doesn't work on others, objects that are located farther away cover those which are located closer. I called glEnable(GL_DEPTH_TEST);
and tried to call glDepthFunc(GL_LESS);
and as I said, everything works properly on some computers, but the same program doesn't work properly on other computers. How can it be fixed?
Edit: Problem solved. Added these lines before calling
al_create_display();
and everything works
al_set_new_display_option( ALLEGRO_COLOR_SIZE, 32, ALLEGRO_REQUIRE);
al_set_new_display_option( ALLEGRO_DEPTH_SIZE, 24, ALLEGRO_REQUIRE);
al_set_new_display_option( ALLEGRO_STENCIL_SIZE, 8, ALLEGRO_REQUIRE);
al_set_new_display_option( ALLEGRO_AUX_BUFFERS, 0, ALLEGRO_REQUIRE);
al_set_new_display_option( ALLEGRO_SAMPLES, 4, ALLEGRO_SUGGEST);