This repository has been archived by the owner on Sep 4, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 233
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix bbutil render_text indices (saves memory).
- Loading branch information
Showing
7 changed files
with
14 additions
and
14 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
acdd479
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Marc, is this patch only applicable to BB10 or also to PlayBook? Even if we were to only apply it to the BB10 b/c of testing/resourcing, it might be useful to document it accordingly.
acdd479
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
acdd479
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Eduardo, it is applicable to any and all code that has those lines. When malloc'ing the array of shorts, the size should be a multiple of shorts (2 bytes) not floats (4 bytes). The two types must match in the malloc. Additionally, since this is for OpenGL, it should be unsigned short not signed short. They're the same size, but later when it's used with OpenGL, the flag passed is for unsigned short, since signed short is not a legal option. Other places in the code correctly use unsigned short in this case, but this one didn't.
acdd479
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the future, ideally there would be a solution for not duplicating these lines (files) in every sample. That will keep them limited to one place in github, instead of half a dozen. Maybe a library.
acdd479
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This commit has been merged into develop branch (for BB10) with Pull Request #28.
The reason that the code is duplicated in each sample is so that each sample is standalone. The samples are for developers new to the platform and we don't want to complicate the build process by creating a library that they have to get working before they can use the samples.
acdd479
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, good to finally see this fix go in, thanks!
For code sharing, I was thinking along the lines of having the individual samples reference a common file in a sibling directory. So each builds in the file (no lib) but it's in one place. There's probably a way to have git deal with this using links of some sort.
acdd479
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, I see it's still just in develop. At what point will the incorrect master code be fixed? This should be a hotfix to the incorrect code in the current release, it shouldn't be waiting for a new release.
acdd479
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
acdd479
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, thanks Anthony!