You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The original idea was to set the texture parameters before allocating the image. The Texture ctor was meant to be used like this to allocate space for the image:
To actually transfer the bytes, there is no support yet!
Here's one way we can go around this:
We need to add a default argument to allocateImageX -- the buffer which is by default null or None. A non-null value would mean that there is data to be transfered.
The allocateImageX called outside the ctor or whenever the texture is not bound should throw an exception.
Another thing I see that we should fix: once bound in the updated method, the Texture is not unbound (returned to previous setting). We should surround the init call in the acquire with the glBindTexture calls to set and reset the bound texture properly:
Currently, the idea is to call
allocateImageX
to allocate the texture:https://github.com/storm-enroute/macrogl/blob/master/src/main/scala/org/macrogl/Texture.scala#L70
The original idea was to set the texture parameters before allocating the image. The
Texture
ctor was meant to be used like this to allocate space for the image:To actually transfer the bytes, there is no support yet!
Here's one way we can go around this:
We need to add a default argument to
allocateImageX
-- the buffer which is by defaultnull
orNone
. A non-null value would mean that there is data to be transfered.The
allocateImageX
called outside the ctor or whenever the texture is not bound should throw an exception.Another thing I see that we should fix: once bound in the
updated
method, theTexture
is not unbound (returned to previous setting). We should surround theinit
call in theacquire
with theglBindTexture
calls to set and reset the bound texture properly:https://github.com/storm-enroute/macrogl/blob/master/src/main/scala/org/macrogl/Texture.scala#L29
There should be no
glBindTexture
calls inupdate
.allocateImageX
outside the ctor should throw an exception, unless the texture is bound.The text was updated successfully, but these errors were encountered: