Skip to content
This repository has been archived by the owner on Feb 23, 2023. It is now read-only.

Add Frame.createHalfFloat #34

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Add Frame.createHalfFloat #34

wants to merge 1 commit into from

Conversation

finscn
Copy link

@finscn finscn commented Nov 20, 2017

Detail at #32

@finscn
Copy link
Author

finscn commented Nov 20, 2017

I know in current pixi-gl-core , you check the type of GLTexture in Texture.prototype.uploadData
You use if(data instanceof Float32Array)... .

But for half-float , it's not a good idea.

Because half-float supports null-data , and sometimes we have to use null.

So, I do all things about create half-float in Frame.createHalfFloat.

@finscn
Copy link
Author

finscn commented Nov 20, 2017

Another thing, in safair (iOS & mac) , the half-float GLTexture doesn't support uploadData.
User can't change its content via upload arraybuffer , it only could be changed via shader.

And in safair (iOS & mac) , float32 GLTexture is NOT renderable , it only could be changed via upload arraybuffer.

It's so strange..... I don't know what Apple's developers are thinking...

@finscn
Copy link
Author

finscn commented Nov 20, 2017

A better way is refactor Texture.prototype.uploadData or refactor Texture's constructor.
But in current version , I think , do many change is not a good choice . So I choose add new function , don't touch existing functions.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant