List of commits:
Subject Hash Author Date (UTC)
Add uploadModelTransforms(...) 53530b8cabe72cfa6c71148bd484a1b5a17df565 mse 2021-09-23 14:33:47
Readability a5885db68a6134c7c3930b6cf10650f0b340088d mse 2021-09-13 15:56:30
Pad HUD health with 0 267304751e17901c276108d8899d096e2094cb2a mse 2021-09-13 11:02:57
Housekeeping 6ff79e3a21829e267e866a8472777e180d337ff4 mse 2021-09-13 07:33:00
Add CSL comments 7a818e8b57cb38c9bfef922e66bd6f735b4962e4 mse 2021-09-12 09:26:07
Add Confectioner Scripting Language (CSL) & change array separator to ; 8d980bfac5d649574f749b7c04a19af766f71091 mse 2021-09-11 12:31:58
Fix console /set bug 7c45e27e7f40472bea317b0316e4367135b49704 mse 2021-09-11 01:32:11
Scriptable lines@, ids@, bugfix 9f606fd2a793fd76a9d1b9e186434d231b973085 mse 2021-09-10 14:43:50
Add array scripting (@ operator, ARRLEN <array>) 3f098b3e0a04922c2c7a981b232efd8d08a8d9a0 mse 2021-09-10 14:02:39
Optimize script runtime a298b01c9b77192b7ed8aba3832a8ab51c9d389a mse 2021-09-09 06:57:49
Scriptable bg$, fg$, caption$ 0ad08aa3887118d2376f4fa7f8b7c66e0f164c73 mse 2021-09-06 11:04:38
Animation command: ANIM <loop|play> <bg|fg> <fps> <directory> 6066e2cae1dc29043902d46549f443c7b683fd88 mse 2021-09-06 06:42:13
Switch to C++17 489987b1b2749f37e0ac76594308635affbd24f2 mse 2021-09-05 10:51:02
Fix stats synchronization bug 3b6195c3321a6f10af43839cc00d24f301eddb3e mse 2021-09-05 04:45:58
Add top-level command: STRLEN, scriptable player name$ ec7a623cdc98b9832f35f0beb3e45179e6094436 mse 2021-09-05 03:17:47
Start work on animation system d2aafd6f46c719342054e3f256f972f4917f2231 mse 2021-09-05 02:41:28
Add string scripting with $ operator 20034a2b658ee8ad4f2082c44301c231b0323fc7 mse 2021-09-03 10:20:55
Enhance console /set command to support operators 61032844fcb833f04e2f6d1e123f8f0f89333107 mse 2021-09-02 11:06:00
Add scriptable bribing & remove hard-coded karma increment 41b4d79da6331b4b1ffd96f36ae1b032a869b482 mse 2021-08-31 17:51:29
Add floor operator (_) 819304b561d474e962afa7397ef68ffae83e8649 mse 2021-08-31 13:49:57
Commit 53530b8cabe72cfa6c71148bd484a1b5a17df565 - Add uploadModelTransforms(...)
Author: mse
Author date (UTC): 2021-09-23 14:33
Committer name: mse
Committer date (UTC): 2021-09-23 14:33
Parent(s): a5885db68a6134c7c3930b6cf10650f0b340088d
Signing key:
Tree: a7505a157cd18b4e596f8fe5778c84d8f6001e6a
File Lines added Lines deleted
confec.cpp 1 1
include/fg2/fg2.h 8 5
include/fg3/fg3.h 9 3
File confec.cpp changed (mode: 100644) (index 5b2a5f9..e9b9a4f)
... ... void Render(){
4373 4373 } }
4374 4374
4375 4375 // Image animations. // Image animations.
4376 static double animation_timer;
4376 static double animation_timer = 0.0;
4377 4377 if( animation_layer > 0 ){ if( animation_layer > 0 ){
4378 4378 animation_timer += d; animation_timer += d;
4379 4379 if( animation_timer >= 1.0 / animation_fps ){ if( animation_timer >= 1.0 / animation_fps ){
File include/fg2/fg2.h changed (mode: 100755) (index a2f3ce4..d5d18e8)
... ... void updateMesh( Mesh &mesh, std::vector<Vertex> &vertices, std::vector<Index> &
516 516 mesh.indices = indices; mesh.indices = indices;
517 517 } }
518 518
519 void drawMesh( Mesh &mesh, linalg::mat<double,4,4> modelMat, linalg::mat<double,4,4> viewMat, linalg::mat<double,4,4> projMat ){
520 if( !mesh.success ){
521 return;
522 }
523
519 // Get the transforms ready and upload them to the graphics API.
520 void uploadModelTransforms( const linalg::mat<double,4,4> &modelMat, const linalg::mat<double,4,4> &viewMat, const linalg::mat<double,4,4> &projMat ){
524 521 linalg::mat<double,4,4> mv = linalg::mul( linalg::inverse( viewMat ), modelMat ); linalg::mat<double,4,4> mv = linalg::mul( linalg::inverse( viewMat ), modelMat );
525 522 linalg::mat<double,4,4> mvp = linalg::mul( projMat, mv ); linalg::mat<double,4,4> mvp = linalg::mul( projMat, mv );
526 523 linalg::mat<double,4,4> normal = linalg::transpose( linalg::inverse( modelMat ) ); linalg::mat<double,4,4> normal = linalg::transpose( linalg::inverse( modelMat ) );
 
... ... void drawMesh( Mesh &mesh, linalg::mat<double,4,4> modelMat, linalg::mat<double,
561 558 viewMat[3][1] - modelMat[3][1], viewMat[3][1] - modelMat[3][1],
562 559 viewMat[3][2] - modelMat[3][2] viewMat[3][2] - modelMat[3][2]
563 560 ); );
561 }
562
563 void drawMesh( Mesh &mesh, linalg::mat<double,4,4> modelMat, linalg::mat<double,4,4> viewMat, linalg::mat<double,4,4> projMat ){
564 if( !mesh.success ) return;
565
566 uploadModelTransforms( modelMat, viewMat, projMat );
564 567
565 568 glBindBuffer( GL_ARRAY_BUFFER, mesh.buffers[0] ); glBindBuffer( GL_ARRAY_BUFFER, mesh.buffers[0] );
566 569 glBindBuffer( GL_ELEMENT_ARRAY_BUFFER, mesh.buffers[1] ); glBindBuffer( GL_ELEMENT_ARRAY_BUFFER, mesh.buffers[1] );
File include/fg3/fg3.h changed (mode: 100644) (index 9a8e24e..78dbb01)
... ... void updateMesh( Mesh &mesh, std::vector<Vertex> &vertices, std::vector<Index> &
731 731 mesh.indices = indices; mesh.indices = indices;
732 732 } }
733 733
734 void drawMesh( Mesh &mesh, linalg::mat<double,4,4> modelMat, linalg::mat<double,4,4> viewMat, linalg::mat<double,4,4> projMat ){
735 if( !mesh.success ) return;
736
734 // Get the transforms ready and upload them to the graphics API.
735 void uploadModelTransforms( const linalg::mat<double,4,4> &modelMat, const linalg::mat<double,4,4> &viewMat, const linalg::mat<double,4,4> &projMat ){
737 736 linalg::mat<double,4,4> mv = linalg::mul( linalg::inverse( viewMat ), modelMat ); linalg::mat<double,4,4> mv = linalg::mul( linalg::inverse( viewMat ), modelMat );
738 737 linalg::mat<double,4,4> mvp = linalg::mul( projMat, mv ); linalg::mat<double,4,4> mvp = linalg::mul( projMat, mv );
739 738 linalg::mat<double,4,4> normal = linalg::transpose( linalg::inverse( modelMat ) ); linalg::mat<double,4,4> normal = linalg::transpose( linalg::inverse( modelMat ) );
 
... ... void drawMesh( Mesh &mesh, linalg::mat<double,4,4> modelMat, linalg::mat<double,
774 773 viewMat[3][1] - modelMat[3][1], viewMat[3][1] - modelMat[3][1],
775 774 viewMat[3][2] - modelMat[3][2] viewMat[3][2] - modelMat[3][2]
776 775 ); );
776 }
777
778 // Draw the mesh.
779 void drawMesh( Mesh &mesh, linalg::mat<double,4,4> modelMat, linalg::mat<double,4,4> viewMat, linalg::mat<double,4,4> projMat ){
780 if( !mesh.success ) return;
781
782 uploadModelTransforms( modelMat, viewMat, projMat );
777 783
778 784 // Switch graphics memory to the VAO. // Switch graphics memory to the VAO.
779 785 glBindVertexArray( mesh.vao[0] ); glBindVertexArray( mesh.vao[0] );
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/mse/ConfectionerEngine

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/mse/ConfectionerEngine

Clone this repository using git:
git clone git://git.rocketgit.com/user/mse/ConfectionerEngine

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main