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

Part 9.3, materials #8

Open
RickardAhlstedt opened this issue Jan 22, 2019 · 1 comment
Open

Part 9.3, materials #8

RickardAhlstedt opened this issue Jan 22, 2019 · 1 comment

Comments

@RickardAhlstedt
Copy link

Hi!
First off, great work.
Although I have found some problems regarding the ObjVolume-class, but it's quite an easy fix to replace StringBuilder with a simple string.
And float.TryParse requires some additional parameters such as setting the decimal-separator to use a dot instead. (My locale of my dev-machine is set to use swedish currency).

My suggestion here is:

CultureInfo ci = (CultureInfo)CultureInfo.CurrentCulture.Clone();
ci.NumberFormat.CurrencyDecimalSeparator = ".";

And then adding , NumberStyles.Any, ci, to every float.TryParse
Example:

bool success = float.TryParse(texcoordparts[0], NumberStyles.Any, ci, out vec.X);

As for my problem, I can't get the textures to work properly using OpenTK 3.0 (runtime-version 2.0.50727), the count for the texture-list remains zero.

Good to note, I also applied the above-fix for Material.cs, and I store my files in /data/Models/ and shaders in /data/Shaders/.
Any pointers are welcome, submitting this as an issue due to perhaps get the above-fix implemented

@neokabuto
Copy link
Owner

Thanks, I'm going to make this change with the other upcoming changes: 2046b91

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