Right now I"m getting a bunch of different line artifacts when rendering textures. One is similar to Tile Bleed, another is tile bleed but with the top of our player texture where black or white lines appear on the edges of the texture. rlDrawRenderBatchActive() seems to help somewhat, but it doesn't completely solve the problem. Any thoughts? I provided a code sample below:
static void update_draw_game_frame() {
if (!has_entered_gameplay) {
has_entered_gameplay = true;
camera.target = player.position;
camera.rotation = 0.0f;
camera.zoom = SCREEN_WIDTH / 640.0f;
}
float deltaTime = GetFrameTime();
Player *playerPointer = &player;
// Call update camera function by its pointer
// Store pointers to the multiple update camera functions
//----------------------------------------------------------------------------------
// Build up the light mask
// Update Player State
update_player(&player, &tilemap, deltaTime);
// Draw
//----------------------------------------------------------------------------------
BeginDrawing();
rlDrawRenderBatchActive();
ClearBackground(RAYWHITE);
BeginMode2D(camera);
for (int i = 0; i < MAX_PROJECTILES; i++) {
Projectile *projectile = &projectiles[i];
if (projectile->is_active) {
DrawTexturePro(
projectile->texture,
projectile->rect,
(Rectangle){projectile->position.x + 24 + (float)(projectile->parity < 0 ? 0 : 16), projectile->position.y + 29, 48, 32},
(Vector2){projectile->velocity.x < 0 ? 0 : 48, 16},
projectile->fire_angle * 180 / PI * (float)projectile->parity,
WHITE);
}
}
// Draw the tile background
draw_tilemap(&tilemap);
DrawTexturePro(
playerPointer->texture,
playerPointer->rect,
(Rectangle) { playerPointer->position.x, playerPointer->position.y, 64, 64},
Vector2Zero(),
0.0f,
WHITE);
EndMode2D();
EndDrawing();
cameraUpdaters[camera_option](&camera, &player, deltaTime, SCREEN_WIDTH, SCREEN_HEIGHT);
}
I'm also calling DrawTexturePro in the draw_tilemap function