hardcoded unsigned byte type in Texture2D

43 views
Skip to first unread message

David Hoese

unread,
Oct 24, 2015, 8:30:29 PM10/24/15
to vispy-dev
I brought this up on gitter, but thought I could get more information here. In "vispy/gloo/glir.py" Texture2D objects are created with a hard coded UNSIGNED_BYTE type: https://github.com/vispy/vispy/blob/master/vispy/gloo/glir.py#L1104

I am currently able to put in luminance 32-bit floats with an internal format of R32F so I'm wondering if that hardcoded value actually means anything. Could someone shed some light on this? Thanks.

Dave

Almar Klein

unread,
Oct 27, 2015, 7:01:04 AM10/27/15
to David Hoese, vispy-dev

Yes, this is because OpenGL ES 2.0 only allows bytes.

--
You received this message because you are subscribed to the Google Groups "vispy-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vispy-dev+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vispy-dev/a778f477-faea-4379-a611-8ec3d8ede5f7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

 

 

David Hoese

unread,
Oct 27, 2015, 7:32:00 AM10/27/15
to Almar Klein, vispy-dev
Ok thanks. Why is it hardcoded? And why doesn't it seem to affect what I
can actually place in the texture (hardcoded to bytes but I'm putting in
32-bit floats)?

On 10/27/2015 6:01 AM, Almar Klein wrote:
> Yes, this is because OpenGL ES 2.0 only allows bytes.
>
>
> *From: *David Hoese
> *Sent: *25 October 2015 02:30
> *To: *vispy-dev
> *Subject: *hardcoded unsigned byte type in Texture2D
>
> I brought this up on gitter, but thought I could get more information
> here. In "vispy/gloo/glir.py" Texture2D objects are created with a hard
> coded UNSIGNED_BYTE type:
> https://github.com/vispy/vispy/blob/master/vispy/gloo/glir.py#L1104
>
> I am currently able to put in luminance 32-bit floats with an internal
> format of R32F so I'm wondering if that hardcoded value actually means
> anything. Could someone shed some light on this? Thanks.
>
> Dave
>
> --
> You received this message because you are subscribed to the Google
> Groups "vispy-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to vispy-dev+...@googlegroups.com
> <mailto:vispy-dev+...@googlegroups.com>.
> <https://groups.google.com/d/msgid/vispy-dev/a778f477-faea-4379-a611-8ec3d8ede5f7%40googlegroups.com?utm_medium=email&utm_source=footer>.

Almar Klein

unread,
Oct 27, 2015, 5:08:23 PM10/27/15
to David Hoese, vispy-dev

Oh sorry. I am mistaken that hardcoded UINT8 is only to set the size of the texture. When uploading the actual datatype is taken into account. Sorry for the confusion.

Reply all
Reply to author
Forward
0 new messages