Skip to content

Add glTexImage2DMultisample wrapper (native only)#1

Open
iceiix wants to merge 2 commits intomainfrom
ms
Open

Add glTexImage2DMultisample wrapper (native only)#1
iceiix wants to merge 2 commits intomainfrom
ms

Conversation

@iceiix
Copy link
Copy Markdown
Owner

@iceiix iceiix commented Dec 25, 2020

iceiix added a commit to iceiix/stevenarella that referenced this pull request Dec 25, 2020
@iceiix iceiix mentioned this pull request Dec 25, 2020
iceiix added a commit to iceiix/stevenarella that referenced this pull request Dec 25, 2020
iceiix added a commit to iceiix/stevenarella that referenced this pull request Dec 25, 2020
Replaces the use of gl_generator with the glow wrapper:

* Add glow dependency, based on glow 0.6.1

* Pin version of glow fork for iceiix/glow#1 until #442 renderbuffer

* Remove gl module, steven_gl

Porting details:
* Initialize glow in src/gl/mod.rs
* Call gl methods on glow context
* glow uses camelcase
* Import glow::HasContext trait, finds draw_elements etc.
* Fix mismatched types, glow uses Option and &str instead of raw pointers
* Fix uniform_location, glow already returns Some(u32)
* uniform_location: convert i32 to u32 for Uniform
* Fix attribute_location
* Fix shader creation Result u32 type 
* Fix passing GLvoid and 2d/3d
* Fix missing Options type mismatches
* Offsets are i32 in glow, not GLvoid
* Fix clear_buffer using _f32_slice
* Delete methods are singular not plural
* glBufferData -> buffer_data_u8_slice
* buffer_sub_data_u8_slice
* Update more glow method wrapper names found by reviewing glow native platform
* Remove unused multi_draw_elements, can be replaced by draw_elements in a loop and it has no WebGL equivalent
* glow implements glMapBufferRange
* Remove unused read_buffer
* glow's deletes automatically pass 1 and take no reference
* shader_source() accepts &str directly; removes last of std::ptr
* Pass uniform Option<u32>
* Fix bool passing normalized parameter
* Fix draw_buffers parameter
* Stop unnecessarily returning context from gl::init
* Getting shader info is unsafe 
* Unwrapping static mut is unsafe
* Use unsafe raw pointers for global mutable context
* Fix initializing GL objects wrappers from glow wrappers
* Unbinding framebuffers uses None
* Uppercase global to fix warning
* Shaders return Some instead of None
* Unbox the context to a raw pointer
* Use tex_image_2d_multisample added in glow fork 
* Implement uniform_location, fixing unwrap None failed
* Add tex_sub_image_3d, using PixelUnpackData::Slice
* set_matrix4: transmute the Matrix4 since it is repr(C)
* get_pixels -> get_tex_image -> glGetTexImage, with PixelPackData::Slice
* Wrap sub_image_2d (glTexSubImage2D) and fix warnings
* Implement set_float_multi_raw and set_matrix4_multi, using from_raw_parts
@iceiix iceiix mentioned this pull request Dec 25, 2020
3 tasks
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.

1 participant