Added modelviewer.

Added neural network code(turned off by default).
Lots of editor and rendering fixes.
This commit is contained in:
Justin Marshall
2026-05-17 22:09:25 -07:00
parent 079442e7ba
commit 76f642286e
74 changed files with 101444 additions and 2227 deletions
+40
View File
@@ -562,6 +562,36 @@ public:
// I'm not really sure why this needs to be virtual...
virtual const char* ImageName(void) const;
bool HasNeuralPOMData() const {
return neuralPOMHasData &&
neuralPOMWeightsBytes.Num() > 0 &&
neuralPOMLatentRGBA16FBytes.Num() > 0;
}
bool IsNeuralPOMUploadedToShim() const {
return neuralPOMUploadedToShim;
}
void SetNeuralPOMUploadedToShim(bool uploaded) const {
const_cast<idMaterial*>(this)->neuralPOMUploadedToShim = uploaded;
}
GLuint GetNeuralPOMGLHandle() const {
return neuralPOMGLHandle;
}
void SetNeuralPOMGLHandle(GLuint handle) const {
const_cast<idMaterial*>(this)->neuralPOMGLHandle = handle;
}
const idList<byte>& GetNeuralPOMWeightsBytes() const {
return neuralPOMWeightsBytes;
}
const idList<byte>& GetNeuralPOMLatentRGBA16FBytes() const {
return neuralPOMLatentRGBA16FBytes;
}
void ReloadImages(bool force) const;
// returns number of stages this material contains
@@ -881,6 +911,8 @@ private:
void CheckForConstantRegisters();
private:
void LoadNeuralBytesForMaterial(const char* path);
#ifdef PREY
subviewClass_t subviewClass; // HUMANHEAD tmj: Type of subview this surface points to
#endif
@@ -967,6 +999,14 @@ private:
bool suppressInSubview;
bool portalSky;
int refCount;
bool neuralPOMBytesLoaded;
bool neuralPOMHasData;
bool neuralPOMUploadedToShim;
GLuint neuralPOMGLHandle;
idList<byte> neuralPOMWeightsBytes;
idList<byte> neuralPOMLatentRGBA16FBytes;
};
typedef idList<const idMaterial*> idMatList;