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

✨ Add GLWpfControl to SceneView #243

Merged

Conversation

softwareantics
Copy link
Owner

@softwareantics softwareantics commented Aug 11, 2023

Description

Fixes #242

Dependencies

Type of change

  • New feature (non-breaking change which adds functionality).

How Has This Been Tested?

I added unit tests to accommodate my changes as well as ensured that a simple triangle could be rendered using immediate mode OpenGL (this has been removed as it's not a requirement for the issue). I also made sure that events were still being triggered by the main application as originally there were some issues but it looks like they've been resolved.

Test Configuration:

  • Operating System: Windows 10 Home
  • Hardware: Intel i7-6700HQ, 32GB, GTX 950M
  • Toolchain: VS Community 2022 17.5.4

Proposed Design

Scene Renderer

The scene renderer is responsible for rendering the currently active scene. Right now it simply clears the view to a dark color. You should not but any game-update logic in here. This can instead be handled by the SceneViewPaneViewModel with some other service if required.

/// <summary>
/// Defines an interface that renders a scene.
/// </summary>
public interface ISceneRenderer
{
    /// <summary>
    /// Renders the scene.
    /// </summary>
    void Render();
}

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added unit tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • My changes generate no new warnings

Copy link
Owner Author

@softwareantics softwareantics left a comment

Choose a reason for hiding this comment

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

Almost good to merge.

FinalEngine.Editor.Desktop/Views/Scenes/SceneView.xaml Outdated Show resolved Hide resolved
@softwareantics softwareantics marked this pull request as ready for review August 12, 2023 11:12
@sonarcloud
Copy link

sonarcloud bot commented Aug 12, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

warning The version of Java (11.0.20) you have used to run this analysis is deprecated and we will stop accepting it soon. Please update to at least Java 17.
Read more here

@softwareantics softwareantics merged commit b6199d8 into epic/112-editor Aug 12, 2023
3 checks passed
@softwareantics softwareantics deleted the feature/242-add-glwpfcontrol-to-scene-view branch August 12, 2023 11:39
@softwareantics softwareantics changed the title [FEATURE] Add GLWpfControl to SceneView ✨ Add GLWpfControl to SceneView Aug 15, 2023
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.

None yet

1 participant