jzy3d-api icon indicating copy to clipboard operation
jzy3d-api copied to clipboard

Volume Visualization issue : can't bind texture

Open jzy3d opened this issue 2 years ago • 1 comments

Describe the bug Running BasicVolumeDemo yield to

glGetError() returned the following error codes after a call to glBindTexture(<int> 0x806F, <int> 0x1): GL_INVALID_OPERATION ( 1282 0x502),

At Texture3D.bind()

Versions (please complete the following information):

  • Jzy3D : 2.2.1-SNAPSHOT + JOGL 2.4.0-rc4
  • JVM / JDK: any
  • GPU: any
  • OS: any
  • Currently working on macOS 11+AppleM1, but issue reproduced on Windows 10, macOs 10.12

Additional context Reproduced

  • Bug NOT happening on jzy3d 1.0.3, when @jacobfilik pushed it.
  • Bug happening on jzy3d 2.0 (May 2021), 2.1, Surprising since it did not occur in December 2021 (https://github.com/jzy3d/jzy3d-api/issues/220)

jzy3d avatar Dec 17 '22 16:12 jzy3d

Verified multiple things

  • Compared source code between jacob push and current version : nothing visible
  • Reverted fragment shader to non refactored version
  • Shader programs are properly loaded
  • Let shader compilation verification happen either at mount() time or draw() time
  • Verified suggestions on GL_INVALID_OPERATION based on OpenGL spec
  • Checked no call to anything else than TEXTURE_3D is made (GL_INVALID_OPERATION is generated if texture was previously created with a target that doesn't match that of target .)

Surprised by

  • No glGenTextures before glBindTexture (but also in old version). It is probably implicitely made in fragment shader under name volumeTexture, and then fetched at validateTexID time in java.
  • glBindTexture appears before glActiveTexture (but also in old version)

jzy3d avatar Dec 17 '22 16:12 jzy3d