documentation
This commit is contained in:
@@ -36,36 +36,37 @@ pub struct RenderState<'a, D> where D: Device
|
||||
type Uniform;
|
||||
type VertexArray;
|
||||
type VertexAttr;
|
||||
|
||||
|
||||
|
||||
|
||||
fn create_texture(&self, format: TextureFormat, size: Vector2I) -> Self::Texture;
|
||||
[*] fn create_texture(&self, format: TextureFormat, size: Vector2I) -> Self::Texture;
|
||||
|
||||
fn create_texture_from_data(&self,
|
||||
[*] fn create_texture_from_data(&self,
|
||||
format: TextureFormat,
|
||||
size: Vector2I,
|
||||
data: [[TextureDataRef]]
|
||||
data: TextureDataRef
|
||||
) -> Self::Texture;
|
||||
|
||||
**For now I'm going to create just the shader and not the pipeline**
|
||||
fn create_shader(&self,
|
||||
[*] fn create_shader(&self,
|
||||
resources: &dyn ResourceLoader,
|
||||
name: &str,
|
||||
kind: ShaderKind)
|
||||
-> Self::Shader;
|
||||
|
||||
|
||||
fn create_shader_from_source(&self,
|
||||
[*] fn create_shader_from_source(&self,
|
||||
name: &str,
|
||||
source: &[u8],
|
||||
kind: ShaderKind) -> Self::Shader;
|
||||
|
||||
|
||||
fn create_vertex_array(&self) -> Self::VertexArray;
|
||||
|
||||
**This seems to just return a container, but what is the type of the container?**
|
||||
[ ] fn create_vertex_array(&self) -> Self::VertexArray;
|
||||
|
||||
**This means more in GL as a program is a part of the state machine**
|
||||
**In vk and metal this just returns the two shaders in one object**
|
||||
fn create_program_from_shaders(
|
||||
[*] fn create_program_from_shaders(
|
||||
&self,
|
||||
resources: &dyn ResourceLoader,
|
||||
name: &str,
|
||||
@@ -74,15 +75,15 @@ pub struct RenderState<'a, D> where D: Device
|
||||
) -> Self::Program;
|
||||
|
||||
**This one I'm a little shakey on. Where do I get these attributes?**
|
||||
fn get_vertex_attr(&self, program: &Self::Program, name: &str) -> Option<Self::VertexAttr>;
|
||||
[ ] fn get_vertex_attr(&self, program: &Self::Program, name: &str) -> Option<Self::VertexAttr>;
|
||||
|
||||
**This one as well, how am I storing these?**
|
||||
fn get_uniform(&self, program: &Self::Program, name: &str) -> Self::Uniform;
|
||||
**This function just looks up the uniform using the name**
|
||||
[ ] fn get_uniform(&self, program: &Self::Program, name: &str) -> Self::Uniform;
|
||||
|
||||
**Probably just allocating a buffer with data. Target is just usage**
|
||||
**See that it passes in a borrow for Buffer, I assume we should do an**
|
||||
**uninitialized_buffer type of deal**
|
||||
fn bind_buffer(&self,
|
||||
[>] fn bind_buffer(&self,
|
||||
vertex_array: &Self::VertexArray,
|
||||
buffer: &Self::Buffer,
|
||||
target: BufferTarget);
|
||||
@@ -95,9 +96,8 @@ pub struct RenderState<'a, D> where D: Device
|
||||
attr: &Self::VertexAttr,
|
||||
descriptor: &VertexAttrDescriptor);
|
||||
|
||||
**This creates the framebuffer using the **
|
||||
**render_pass and swap_image. I assume what is happening here is that**
|
||||
**the api is forcing me to genericize the swap_image into a texture**
|
||||
**This creates the framebuffer using render_pass**
|
||||
**Since it's single-frame. We don't use the swapchain**
|
||||
fn create_framebuffer(&self, texture: Self::Texture) -> Self::Framebuffer;
|
||||
|
||||
**This just creates an empty buffer **
|
||||
|
||||
Reference in New Issue
Block a user