fix: compiler warnings

This commit is contained in:
2021-09-02 10:48:14 +02:00
parent fe86bffc2e
commit 04d1e3c0bf
22 changed files with 74 additions and 79 deletions

View File

@@ -68,7 +68,7 @@ namespace GL{
void VBO::bindVertexAttribs() const{
for(const VertexAttribPointer& pointer : m_VertexAttribs){
glEnableVertexAttribArray(pointer.m_Index);
glVertexAttribPointer(pointer.m_Index, pointer.m_Size, GL_FLOAT, false, m_DataStride * sizeof(float), (void*) pointer.m_Offset);
glVertexAttribPointer(pointer.m_Index, pointer.m_Size, GL_FLOAT, false, m_DataStride * sizeof(float), (void*)(intptr_t) pointer.m_Offset);
}
}
}

View File

@@ -98,13 +98,13 @@ GL::VAO loadWorldModel(const td::game::World* world){
positions.push_back(chunkX + tileX + 1);
positions.push_back(chunkY + tileY + 1);*/
const td::game::Color& tileColor = world->getTileColor(tile);
const td::game::Color* tileColor = world->getTileColor(tile);
for (int i = 0; i < 6; i++){
int color = 255;
color |= tileColor.r << 24;
color |= tileColor.g << 16;
color |= tileColor.b << 8;
color |= tileColor->r << 24;
color |= tileColor->g << 16;
color |= tileColor->b << 8;
int newColorIndex = colors.size();
colors.push_back(0);