Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement cockpit view #279

Merged
merged 12 commits into from
Feb 18, 2023
Merged

Implement cockpit view #279

merged 12 commits into from
Feb 18, 2023

Conversation

dethrace-labs
Copy link
Owner

@dethrace-labs dethrace-labs commented Jan 13, 2023

  • Fixes cockpit camera direction and position
  • Fixes skybox model and rendering used in cockpit mode
  • Updates BR_MODU_* enum names from BRender 1.3 that seem to match better than the BRender 1.2 SDK names
  • Added support for rendering with BR_RSTYLE_EDGES - useful for debugging
  • Reverted to using the colour_buffer width/height/offset when reading the depth buffer which resolves 1 and 2 from Rendering artifacts at different viewport sizes #282
Untitled.mov


static br_pixelmap *last_colour_buffer, *last_depth_buffer;

static tStored_material* current_material;
static br_pixelmap* current_shade_table;

// Increment flush_counter during flush, and upload_counter when we upload the framebuffer texture.
// If the counters are equal, we can avoid re-uploading the same thing.
static int flush_counter = 0, framebuffer_upload_counter = 0;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would make these unsigned. Overflow for signed types is UB, but not for unsigned ones.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, done 👍

dethrace-labs and others added 2 commits February 13, 2023 22:36
Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com>
@dethrace-labs dethrace-labs marked this pull request as ready for review February 13, 2023 09:42
@dethrace-labs dethrace-labs changed the title Cockpit view fixes Implement cockpit view Feb 13, 2023
@dethrace-labs dethrace-labs mentioned this pull request Feb 13, 2023
@dethrace-labs dethrace-labs merged commit e567903 into main Feb 18, 2023
@dethrace-labs dethrace-labs deleted the fix_cockpit_camera branch February 18, 2023 23:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants