Author Topic: Cpct?  (Read 7121 times)

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12131
    • View Profile
    • http://www.jpct.net
Re: Cpct?
« Reply #60 on: December 29, 2020, 04:25:12 pm »
No, Hashtable and HashMap don't care about this. And why would they? I consider it to be rather...not stupid...but, well let's go with stupid anyway...behaviour to throw an exception in this case. You would have to modify the code to check for the key and remove/add it or replace it, if that's supported.

Offline AGP

  • quad
  • ******
  • Posts: 1668
    • View Profile
Re: Cpct?
« Reply #61 on: December 30, 2020, 07:56:40 am »
I added the test. And then I think I fixed another issue. Now I'm only getting the appropriate background color, and convertTexture(Texture) is printing [ 12/30/2020 3:57:37 AM ] - ERROR: Failed to upload texture! texID, unhelpfully (helplessly?) is always 0.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12131
    • View Profile
    • http://www.jpct.net
Re: Cpct?
« Reply #62 on: December 30, 2020, 11:35:05 am »
That's before the actual upload happens. All it does, is to make the GL driver generate an ID. If that fails, it's most likely that something with your handling of the native buffers is wrong...or whatever C# uses in this place.

Offline AGP

  • quad
  • ******
  • Posts: 1668
    • View Profile
Re: Cpct?
« Reply #63 on: December 30, 2020, 10:56:45 pm »
About that, I made a GenericBuffer<T> class to mimic Java's xBuffer classes. But there's a chunk in convertTexture() where you do IntBuffer (GenericBuffer<int> in mine) buf = getSmallBuffer(); GL11.GenTextures(buf) and then you claim that the texture refence is now in buf. But buf is a local variable that's never called again.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12131
    • View Profile
    • http://www.jpct.net
Re: Cpct?
« Reply #64 on: December 31, 2020, 12:43:25 pm »
The GenTexture call puts it there.

Offline AGP

  • quad
  • ******
  • Posts: 1668
    • View Profile
Re: Cpct?
« Reply #65 on: January 18, 2021, 10:30:58 pm »
Happy 95% of what remains of this year, pal.

What's with WorldProcessor.createWSNormals()? It seems to me to be both a waste of processing time and a waste of memory.