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

WriteDataPitch syntax #8

Open
elliotwoods opened this issue Aug 19, 2013 · 3 comments
Open

WriteDataPitch syntax #8

elliotwoods opened this issue Aug 19, 2013 · 3 comments

Comments

@elliotwoods
Copy link

on
https://github.com/mrvux/FeralTic/blob/master/Core/DX11/Resources/Textures/2d/DX11DynamicTexture2D.cs#L55

you've got:

 public void WriteDataPitch(IntPtr ptr, int len, int rowsize = 4)

just a matter of opinion, but i think the syntax would be better as

 public void WriteDataPitch(IntPtr ptr, int stride, int rows)

where 'stride' is the stride of the input data

rowsize is a little ambiguous, and the input data might have a non 'integer * width' stride, (e.g. 'integer * width + integer').

@elliotwoods
Copy link
Author

of course, the biggest issue with this change, is that it's pretty difficult to track down changes since both function names would have the same syntax.

@elliotwoods
Copy link
Author

also currently, len isn't used inside the function.
is it the length of the input array, length in rows, etc?

@mrvux
Copy link
Owner

mrvux commented Aug 26, 2013

I'll change function names to fix all that, with few other improvements

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

No branches or pull requests

2 participants