aboutsummaryrefslogtreecommitdiff
path: root/stockton-skeleton/src/context.rs
diff options
context:
space:
mode:
authortcmal <me@aria.rip>2024-08-25 17:44:23 +0100
committertcmal <me@aria.rip>2024-08-25 17:44:23 +0100
commite1cc0e9a9d191bcd3a634be46fd3555d430b07a8 (patch)
tree7f984fbb55c935797217d105e93f3f415f35d226 /stockton-skeleton/src/context.rs
parent0353181306702c40ad0fe482b5c2b159b46794a4 (diff)
feat(skeleton): draw pass aware of position
Diffstat (limited to 'stockton-skeleton/src/context.rs')
-rw-r--r--stockton-skeleton/src/context.rs11
1 files changed, 9 insertions, 2 deletions
diff --git a/stockton-skeleton/src/context.rs b/stockton-skeleton/src/context.rs
index 802b8ca..5e2d3a3 100644
--- a/stockton-skeleton/src/context.rs
+++ b/stockton-skeleton/src/context.rs
@@ -19,6 +19,7 @@ use super::{
target::{SwapchainProperties, TargetChain},
};
use crate::{
+ draw_passes::Singular,
error::{EnvironmentError, LockPoisoned},
types::*,
};
@@ -56,7 +57,9 @@ pub struct RenderingContext {
impl RenderingContext {
/// Create a new RenderingContext for the given window.
- pub fn new<IDP: IntoDrawPass<DP>, DP: DrawPass>(window: &Window) -> Result<Self> {
+ pub fn new<IDP: IntoDrawPass<DP, Singular>, DP: DrawPass<Singular>>(
+ window: &Window,
+ ) -> Result<Self> {
// Create surface
let (instance, surface, mut adapters) = unsafe {
let instance =
@@ -208,7 +211,11 @@ impl RenderingContext {
}
/// Draw onto the next frame of the swapchain
- pub fn draw_next_frame<DP: DrawPass>(&mut self, session: &Session, dp: &mut DP) -> Result<()> {
+ pub fn draw_next_frame<DP: DrawPass<Singular>>(
+ &mut self,
+ session: &Session,
+ dp: &mut DP,
+ ) -> Result<()> {
let mut device = self
.device
.write()