This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bool teMesh::MeshEntry::LoadDataToMemory(aiMesh *mesh) | |
{ | |
//std::cout << "MeshEntry::LoadDataToMemory()\n"; | |
vbo[VERTEX_BUFFER] = NULL; | |
vbo[TEXCOORD_BUFFER] = NULL; | |
vbo[NORMAL_BUFFER] = NULL; | |
vbo[INDEX_BUFFER] = NULL; | |
vbo[INSTANCE_BUFFER] = NULL; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PostProcessor::PostProcessor(teShader* shader, GLuint width, GLuint height) | |
: myShader(shader), myTexture(), myWidth(width), myHeight(height), Confuse(GL_FALSE), Chaos(GL_FALSE), Shake(GL_FALSE) | |
{ | |
/* | |
Framebuffer MSFBO has: | |
- RenderBufferStorageMultisample RBO_Color | |
- RenderbufferStorageMultisample RBO_Depth | |
Framebuffer FBO has: | |
- FramebufferTexture2D myTexture.ID |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
enum collisionGroups // http://www.bulletphysics.org/mediawiki-1.5.8/index.php/Collision_Filtering | |
{ | |
COLLISION_GROUP_NOTHING = 0, | |
COLLISION_GROUP_TERRAIN = BIT(0), | |
COLLISION_GROUP_ALL_BUILDINGS = BIT(1), | |
COLLISION_GROUP_GHOST_OBJECT_ATTACK_RANGE = BIT(2), | |
COLLISION_GROUP_UNITS = BIT(3), | |
COLLISION_GROUP_RAYCASTS_PICKING = BIT(4), | |
COLLISION_GROUP_RAYCASTS_HEIGHT = BIT(5), | |
COLLISION_GROUP_ENEMY_BUILDINGS = BIT(6), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void te2GraphicsModule::submitMesh(glm::mat4 orientation, meshBase* whichMesh, teShader* whichShader) | |
{ | |
ZoneScoped; | |
//std::cerr << "submitMesh(glm::mat4, meshBase*, teShader*)\n"; | |
auto it = shadersAndMeshesToRender.find(whichShader); | |
if (it != shadersAndMeshesToRender.end()) //found the shader we need | |
{ | |
//std::cout << "shader found, searching for mesh...\n"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Weapon | |
{ | |
public: | |
glm::vec3 currentFiringLocation; //updated every frame with new barrel exit location | |
float cooldownRemaining = 0.0f; //updated every tick to see when it can fire again | |
bool fixed = false; //fixed weapon, or turret? | |
virtual void fire(int targetGlobalID) = 0; | |
//the parameter below is because this weapon needs to know its owner's world location to draw the laser sprite |