mirror of
https://github.com/jmarshall23/DoomRTX.git
synced 2026-08-16 00:01:53 +02:00
Added skydome support.
This commit is contained in:
@@ -6139,7 +6139,7 @@ void CCamWnd::Cam_Render() {
|
||||
|
||||
// the editor uses opposite pitch convention
|
||||
refdef.viewaxis = idAngles(-m_Camera.angles.pitch, m_Camera.angles.yaw, m_Camera.angles.roll).ToMat3();
|
||||
|
||||
refdef.skyDomeMaterial = world_entity->GetKeyMaterial("skydome", "textures/skies/mars1");
|
||||
refdef.width = SCREEN_WIDTH;
|
||||
refdef.height = SCREEN_HEIGHT;
|
||||
refdef.fov_x = 90;
|
||||
|
||||
@@ -68,6 +68,15 @@ const char *idEditorEntity::GetKeyString(int iIndex)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
const idMaterial* idEditorEntity::GetKeyMaterial(const char* key, const char* defaultMaterial) {
|
||||
const char* value = ValueForKey(key);
|
||||
|
||||
if (value == NULL || value[0] == 0) {
|
||||
value = defaultMaterial;
|
||||
}
|
||||
|
||||
return declManager->FindMaterial(value, false);
|
||||
}
|
||||
|
||||
/*
|
||||
=======================================================================================================================
|
||||
|
||||
@@ -51,6 +51,7 @@ public:
|
||||
const char *ValueForKey(const char *key);
|
||||
int GetNumKeys();
|
||||
const char *GetKeyString(int iIndex);
|
||||
const idMaterial* GetKeyMaterial(const char* key, const char *defaultMaterial);
|
||||
void SetKeyValue(const char *key, const char *value, bool trackAngles = true);
|
||||
void DeleteKey(const char *key);
|
||||
float FloatForKey(const char *key);
|
||||
|
||||
Reference in New Issue
Block a user