Changeset 20e0020 in opengl-game for new-game.cpp
- Timestamp:
- Jun 12, 2018, 3:07:10 AM (6 years ago)
- Branches:
- feature/imgui-sdl, master, points-test
- Children:
- c8dc5c6
- Parents:
- 81f28c0
- git-author:
- Dmitry Portnoy <dmp1488@…> (06/12/18 03:07:04)
- git-committer:
- Dmitry Portnoy <dmp1488@…> (06/12/18 03:07:10)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
new-game.cpp
r81f28c0 r20e0020 435 435 0.5f, 0.3f, -2.0f, 436 436 437 // top mid 438 -0.25f, 0.3f, -3.0f, 439 -0.5f, 0.3f, -2.0f, 440 0.5f, 0.3f, -2.0f, 441 -0.25f, 0.3f, -3.0f, 442 0.5f, 0.3f, -2.0f, 443 0.25f, 0.3f, -3.0f, 444 445 // top front 446 -0.25f, 0.3f, -3.0f, 447 0.25f, 0.3f, -3.0f, 448 0.0f, 0.0f, -3.5f, 449 450 // left wing start back 451 -1.5f, 0.3f, 0.0f, 452 -1.5f, 0.0f, 0.0f, 453 -0.5f, 0.0f, 0.0f, 454 -1.5f, 0.3f, 0.0f, 455 -0.5f, 0.0f, 0.0f, 456 -0.5f, 0.3f, 0.0f, 457 458 // left wing start top 459 -0.5f, 0.3f, -0.3f, 460 -1.3f, 0.3f, -0.3f, 461 -1.5f, 0.3f, 0.0f, 462 -0.5f, 0.3f, -0.3f, 463 -1.5f, 0.3f, 0.0f, 464 -0.5f, 0.3f, 0.0f, 465 466 // left wing start front 467 -0.5f, 0.3f, -0.3f, 468 -0.5f, 0.0f, -0.3f, 469 -1.3f, 0.0f, -0.3f, 470 -0.5f, 0.3f, -0.3f, 471 -1.3f, 0.0f, -0.3f, 472 -1.3f, 0.3f, -0.3f, 473 474 // left wing end outside 475 -1.5f, 0.3f, 0.0f, 476 -2.2f, 0.15f, -0.8f, 477 -1.5f, 0.0f, 0.0f, 478 479 // left wing end top 480 -1.3f, 0.3f, -0.3f, 481 -2.2f, 0.15f, -0.8f, 482 -1.5f, 0.3f, 0.0f, 483 484 // left wing end front 485 -1.3f, 0.0f, -0.3f, 486 -2.2f, 0.15f, -0.8f, 487 -1.3f, 0.3f, -0.3f, 437 // bottom back 438 -0.5f, 0.0f, 0.0f, 439 -0.5f, 0.0f, -2.0f, 440 0.5f, 0.0f, 0.0f, 441 0.5f, 0.0f, 0.0f, 442 -0.5f, 0.0f, -2.0f, 443 0.5f, 0.0f, -2.0f, 444 445 // top mid 446 -0.25f, 0.3f, -3.0f, 447 -0.5f, 0.3f, -2.0f, 448 0.5f, 0.3f, -2.0f, 449 -0.25f, 0.3f, -3.0f, 450 0.5f, 0.3f, -2.0f, 451 0.25f, 0.3f, -3.0f, 452 453 // bottom mid 454 -0.5f, 0.0f, -2.0f, 455 -0.25f, 0.0f, -3.0f, 456 0.5f, 0.0f, -2.0f, 457 0.5f, 0.0f, -2.0f, 458 -0.25f, 0.0f, -3.0f, 459 0.25f, 0.0f, -3.0f, 460 461 // top front 462 -0.25f, 0.3f, -3.0f, 463 0.25f, 0.3f, -3.0f, 464 0.0f, 0.0f, -3.5f, 465 466 // bottom front 467 0.25f, 0.0f, -3.0f, 468 -0.25f, 0.0f, -3.0f, 469 0.0f, 0.0f, -3.5f, 470 471 // left wing start back 472 -1.5f, 0.3f, 0.0f, 473 -1.5f, 0.0f, 0.0f, 474 -0.5f, 0.0f, 0.0f, 475 -1.5f, 0.3f, 0.0f, 476 -0.5f, 0.0f, 0.0f, 477 -0.5f, 0.3f, 0.0f, 478 479 // left wing start top 480 -0.5f, 0.3f, -0.3f, 481 -1.3f, 0.3f, -0.3f, 482 -1.5f, 0.3f, 0.0f, 483 -0.5f, 0.3f, -0.3f, 484 -1.5f, 0.3f, 0.0f, 485 -0.5f, 0.3f, 0.0f, 486 487 // left wing start front 488 -0.5f, 0.3f, -0.3f, 489 -0.5f, 0.0f, -0.3f, 490 -1.3f, 0.0f, -0.3f, 491 -0.5f, 0.3f, -0.3f, 492 -1.3f, 0.0f, -0.3f, 493 -1.3f, 0.3f, -0.3f, 494 495 // left wing start bottom 496 -0.5f, 0.0f, 0.0f, 497 -1.5f, 0.0f, 0.0f, 498 -1.3f, 0.0f, -0.3f, 499 -0.5f, 0.0f, 0.0f, 500 -1.3f, 0.0f, -0.3f, 501 -0.5f, 0.0f, -0.3f, 502 503 // left wing end outside 504 -1.5f, 0.3f, 0.0f, 505 -2.2f, 0.15f, -0.8f, 506 -1.5f, 0.0f, 0.0f, 507 508 // left wing end top 509 -1.3f, 0.3f, -0.3f, 510 -2.2f, 0.15f, -0.8f, 511 -1.5f, 0.3f, 0.0f, 512 513 // left wing end front 514 -1.3f, 0.0f, -0.3f, 515 -2.2f, 0.15f, -0.8f, 516 -1.3f, 0.3f, -0.3f, 517 518 // left wing end bottom 519 -1.5f, 0.0f, 0.0f, 520 -2.2f, 0.15f, -0.8f, 521 -1.3f, 0.0f, -0.3f, 522 523 // right wing start back 524 1.5f, 0.0f, 0.0f, 525 1.5f, 0.3f, 0.0f, 526 0.5f, 0.0f, 0.0f, 527 0.5f, 0.0f, 0.0f, 528 1.5f, 0.3f, 0.0f, 529 0.5f, 0.3f, 0.0f, 530 531 // right wing start top 532 1.3f, 0.3f, -0.3f, 533 0.5f, 0.3f, -0.3f, 534 1.5f, 0.3f, 0.0f, 535 1.5f, 0.3f, 0.0f, 536 0.5f, 0.3f, -0.3f, 537 0.5f, 0.3f, 0.0f, 538 539 // right wing start front 540 0.5f, 0.0f, -0.3f, 541 0.5f, 0.3f, -0.3f, 542 1.3f, 0.0f, -0.3f, 543 1.3f, 0.0f, -0.3f, 544 0.5f, 0.3f, -0.3f, 545 1.3f, 0.3f, -0.3f, 546 547 // right wing start bottom 548 1.5f, 0.0f, 0.0f, 549 0.5f, 0.0f, 0.0f, 550 1.3f, 0.0f, -0.3f, 551 1.3f, 0.0f, -0.3f, 552 0.5f, 0.0f, 0.0f, 553 0.5f, 0.0f, -0.3f, 554 555 // right wing end outside 556 2.2f, 0.15f, -0.8f, 557 1.5f, 0.3f, 0.0f, 558 1.5f, 0.0f, 0.0f, 559 560 // right wing end top 561 2.2f, 0.15f, -0.8f, 562 1.3f, 0.3f, -0.3f, 563 1.5f, 0.3f, 0.0f, 564 565 // right wing end front 566 2.2f, 0.15f, -0.8f, 567 1.3f, 0.0f, -0.3f, 568 1.3f, 0.3f, -0.3f, 569 570 // right wing end bottom 571 2.2f, 0.15f, -0.8f, 572 1.5f, 0.0f, 0.0f, 573 1.3f, 0.0f, -0.3f, 488 574 }; 489 575 obj.colors = { … … 548 634 0.0f, 0.0f, 0.3f, 549 635 0.0f, 0.0f, 0.3f, 550 551 0.0f, 0.0f, 0.3f, 552 0.0f, 0.0f, 0.3f, 553 0.0f, 0.0f, 0.3f, 554 0.0f, 0.0f, 0.3f, 555 0.0f, 0.0f, 0.3f, 556 0.0f, 0.0f, 0.3f, 557 558 0.0f, 0.0f, 0.3f, 559 0.0f, 0.0f, 0.3f, 560 0.0f, 0.0f, 0.3f, 561 0.0f, 0.0f, 0.3f, 562 0.0f, 0.0f, 0.3f, 563 0.0f, 0.0f, 0.3f, 564 565 0.0f, 0.0f, 0.3f, 566 0.0f, 0.0f, 0.3f, 567 0.0f, 0.0f, 0.3f, 636 0.0f, 0.0f, 0.3f, 637 0.0f, 0.0f, 0.3f, 638 0.0f, 0.0f, 0.3f, 639 640 0.0f, 0.0f, 0.3f, 641 0.0f, 0.0f, 0.3f, 642 0.0f, 0.0f, 0.3f, 643 0.0f, 0.0f, 0.3f, 644 0.0f, 0.0f, 0.3f, 645 0.0f, 0.0f, 0.3f, 646 647 0.0f, 0.0f, 0.3f, 648 0.0f, 0.0f, 0.3f, 649 0.0f, 0.0f, 0.3f, 650 651 0.0f, 0.0f, 0.3f, 652 0.0f, 0.0f, 0.3f, 653 0.0f, 0.0f, 0.3f, 654 655 0.0f, 0.0f, 0.3f, 656 0.0f, 0.0f, 0.3f, 657 0.0f, 0.0f, 0.3f, 658 0.0f, 0.0f, 0.3f, 659 0.0f, 0.0f, 0.3f, 660 0.0f, 0.0f, 0.3f, 661 662 0.0f, 0.0f, 0.3f, 663 0.0f, 0.0f, 0.3f, 664 0.0f, 0.0f, 0.3f, 665 0.0f, 0.0f, 0.3f, 666 0.0f, 0.0f, 0.3f, 667 0.0f, 0.0f, 0.3f, 668 669 0.0f, 0.0f, 0.3f, 670 0.0f, 0.0f, 0.3f, 671 0.0f, 0.0f, 0.3f, 672 0.0f, 0.0f, 0.3f, 673 0.0f, 0.0f, 0.3f, 674 0.0f, 0.0f, 0.3f, 675 676 0.0f, 0.0f, 0.3f, 677 0.0f, 0.0f, 0.3f, 678 0.0f, 0.0f, 0.3f, 679 0.0f, 0.0f, 0.3f, 680 0.0f, 0.0f, 0.3f, 681 0.0f, 0.0f, 0.3f, 682 683 0.0f, 0.0f, 0.3f, 684 0.0f, 0.0f, 0.3f, 685 0.0f, 0.0f, 0.3f, 686 687 0.0f, 0.0f, 0.3f, 688 0.0f, 0.0f, 0.3f, 689 0.0f, 0.0f, 0.3f, 690 691 0.0f, 0.0f, 0.3f, 692 0.0f, 0.0f, 0.3f, 693 0.0f, 0.0f, 0.3f, 694 695 0.0f, 0.0f, 0.3f, 696 0.0f, 0.0f, 0.3f, 697 0.0f, 0.0f, 0.3f, 698 699 0.0f, 0.0f, 0.3f, 700 0.0f, 0.0f, 0.3f, 701 0.0f, 0.0f, 0.3f, 702 0.0f, 0.0f, 0.3f, 703 0.0f, 0.0f, 0.3f, 704 0.0f, 0.0f, 0.3f, 705 706 0.0f, 0.0f, 0.3f, 707 0.0f, 0.0f, 0.3f, 708 0.0f, 0.0f, 0.3f, 709 0.0f, 0.0f, 0.3f, 710 0.0f, 0.0f, 0.3f, 711 0.0f, 0.0f, 0.3f, 712 713 0.0f, 0.0f, 0.3f, 714 0.0f, 0.0f, 0.3f, 715 0.0f, 0.0f, 0.3f, 716 0.0f, 0.0f, 0.3f, 717 0.0f, 0.0f, 0.3f, 718 0.0f, 0.0f, 0.3f, 719 720 0.0f, 0.0f, 0.3f, 721 0.0f, 0.0f, 0.3f, 722 0.0f, 0.0f, 0.3f, 723 0.0f, 0.0f, 0.3f, 724 0.0f, 0.0f, 0.3f, 725 0.0f, 0.0f, 0.3f, 726 568 727 0.0f, 0.0f, 0.3f, 569 728 0.0f, 0.0f, 0.3f, … … 643 802 0.0f, 1.0f, 644 803 0.0f, 0.0f, 645 646 1.0f, 1.0f,647 0.0f, 1.0f,648 0.0f, 0.0f,649 804 1.0f, 1.0f, 650 805 0.0f, 0.0f, … … 661 816 0.0f, 1.0f, 662 817 0.0f, 0.0f, 818 819 1.0f, 1.0f, 820 0.0f, 1.0f, 821 0.0f, 0.0f, 822 823 1.0f, 1.0f, 824 0.0f, 1.0f, 825 0.0f, 0.0f, 663 826 1.0f, 1.0f, 664 827 0.0f, 0.0f, 665 828 1.0f, 0.0f, 829 830 1.0f, 1.0f, 831 0.0f, 1.0f, 832 0.0f, 0.0f, 833 1.0f, 1.0f, 834 0.0f, 0.0f, 835 1.0f, 0.0f, 836 837 1.0f, 1.0f, 838 0.0f, 1.0f, 839 0.0f, 0.0f, 840 1.0f, 1.0f, 841 0.0f, 0.0f, 842 1.0f, 0.0f, 843 844 1.0f, 1.0f, 845 0.0f, 1.0f, 846 0.0f, 0.0f, 847 1.0f, 1.0f, 848 0.0f, 0.0f, 849 1.0f, 0.0f, 850 851 1.0f, 1.0f, 852 0.0f, 1.0f, 853 0.0f, 0.0f, 854 855 1.0f, 1.0f, 856 0.0f, 1.0f, 857 0.0f, 0.0f, 858 859 1.0f, 1.0f, 860 0.0f, 1.0f, 861 0.0f, 0.0f, 862 863 1.0f, 1.0f, 864 0.0f, 1.0f, 865 0.0f, 0.0f, 866 867 1.0f, 1.0f, 868 0.0f, 1.0f, 869 0.0f, 0.0f, 870 1.0f, 1.0f, 871 0.0f, 0.0f, 872 1.0f, 0.0f, 873 874 1.0f, 1.0f, 875 0.0f, 1.0f, 876 0.0f, 0.0f, 877 1.0f, 1.0f, 878 0.0f, 0.0f, 879 1.0f, 0.0f, 880 881 1.0f, 1.0f, 882 0.0f, 1.0f, 883 0.0f, 0.0f, 884 1.0f, 1.0f, 885 0.0f, 0.0f, 886 1.0f, 0.0f, 887 888 1.0f, 1.0f, 889 0.0f, 1.0f, 890 0.0f, 0.0f, 891 1.0f, 1.0f, 892 0.0f, 0.0f, 893 1.0f, 0.0f, 894 895 1.0f, 1.0f, 896 0.0f, 1.0f, 897 0.0f, 0.0f, 666 898 667 899 1.0f, 1.0f, … … 687 919 688 920 T_model = translate(mat4(), vec3(0.0f, -0.9f, 0.0f)); 689 R_model = rotate(mat4(), -1.0f, vec3(1.0f, 0.0f, 0.0f));690 obj.model_base = T_model ; //T_model * R_model;921 R_model = rotate(mat4(), 0.6f, vec3(1.0f, 0.0f, 0.0f)); 922 obj.model_base = T_model * R_model * scale(mat4(), vec3(0.3f, 0.3f, 0.3f));; 691 923 692 924 addObjectToScene(obj); … … 964 1196 view_mat = R*T; 965 1197 966 printVector("cam pos", cam_pos);1198 //printVector("cam pos", cam_pos); 967 1199 968 1200 glUseProgram(color_sp);
Note:
See TracChangeset
for help on using the changeset viewer.