This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// In bevy there are the following macros/derive traits: | |
// RenderResources, RenderResource, render_resources | |
// These allow you to link data from bevy to your shader directly. | |
// | |
// Struct data is linked to the shader via a naming convention. | |
// | |
// render_resources allows you to specify some specifics: | |
// from_self - Specifies that the following struct is a single binding. | |
// buffer - Specifies the following field is a uniform Buffer | |
// ignore - Ignores the following field and wont be sent to the GPU |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[src/graphics/mesh.rs:230] &sub_mesh.vertices.iter().map(|x| | |
(x.normal, | |
x.tangent)).collect::<Vec<(Vec3, Vec4)>>() = [ | |
( | |
Matrix { | |
data: [ | |
-0.0, | |
-1.0, | |
0.0, | |
], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
impl<B> SimpleGraphicsPipelineDesc<B, Game<B>> for SpriteBatchPassDesc | |
where B: gfx_hal::Backend, | |
{ | |
type Pipeline = SpriteBatchPass<B>; | |
fn depth_stencil(&self) -> Option<gfx_hal::pso::DepthStencilDesc> { | |
None | |
} | |
fn vertices(&self) -> Vec<( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use rendy::{ | |
command::{RenderPassInlineEncoder}, | |
factory::{Config, Factory}, | |
graph::{Graph, GraphBuilder, render::RenderPass, present::PresentNode, NodeBuffer, NodeImage}, | |
memory::MemoryUsageValue, | |
mesh::{AsVertex, PosColor}, | |
shader::{Shader, StaticShaderInfo, ShaderKind, SourceLanguage}, | |
resource::buffer::Buffer, | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// example using the raf module from npm. try changing some values! | |
var requestAnimationFrame = require("raf") | |
var canvas = document.createElement("canvas") | |
canvas.width = 500 | |
canvas.height = 500 | |
document.body.appendChild(canvas) | |
var context = canvas.getContext("2d") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// example using the raf module from npm. try changing some values! | |
var requestAnimationFrame = require("raf") | |
var canvas = document.createElement("canvas") | |
canvas.width = 500 | |
canvas.height = 500 | |
document.body.appendChild(canvas) | |
var context = canvas.getContext("2d") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// example using the raf module from npm. try changing some values! | |
var requestAnimationFrame = require("raf") | |
var canvas = document.createElement("canvas") | |
canvas.width = 500 | |
canvas.height = 500 | |
document.body.appendChild(canvas) | |
var context = canvas.getContext("2d") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// example using the raf module from npm. try changing some values! | |
var requestAnimationFrame = require("raf") | |
var canvas = document.createElement("canvas") | |
canvas.width = 500 | |
canvas.height = 500 | |
document.body.appendChild(canvas) | |
var context = canvas.getContext("2d") |