Stilllegung des Forums
Das Forum wurde am 05.06.2023 nach über 20 Jahren stillgelegt (weitere Informationen und ein kleiner Rückblick).
Registrierungen, Anmeldungen und Postings sind nicht mehr möglich. Öffentliche Inhalte sind weiterhin zugänglich.
Das Team von spieleprogrammierer.de bedankt sich bei der Community für die vielen schönen Jahre.
Wenn du eine deutschsprachige Spieleentwickler-Community suchst, schau doch mal im Discord und auf ZFX vorbei!
Werbeanzeige
Quellcode |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
// Führt die DX-Einstellungen des Profils ein tbResult cGalactica::RefreshProfile() { tbConfig config = Profile_Profile2tbConfig(m_ActiveProfile); // Herunterfahren tbDirect3D::Instance().Exit(); tbDirectSound::Instance().Exit(); // Neustarten if(tbDirect3D::Instance().Init(&config, APP_NAME)) { TB_ERROR("Initialisieren von Direct3D fehlgeschlagen!", TB_ERROR); } if(tbDirectSound::Instance().Init(&config)) { TB_ERROR("Initialisieren von DirectSound fehlgeschlagen!", TB_ERROR); } return TB_OK; } |
C-/C++-Quelltext |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
tbResult cGalactica::RefreshProfile() { // Direct3D tbConfig config = Profile_Profile2tbConfig(m_ActiveProfile); D3DPRESENT_PARAMETERS PresentParams = tbDirect3D::Instance().GetPresentParams(); // Hab die Veränderungen Auskommentiert! // PresentParams.BackBufferFormat = PROFILE.GraphicInfo.Direct3D.BackBufferFormat; // PresentParams.BackBufferHeight = PROFILE.GraphicInfo.Direct3D.Videomodus.Height; // PresentParams.BackBufferWidth = PROFILE.GraphicInfo.Direct3D.Videomodus.Width; // PresentParams.FullScreen_RefreshRateInHz= PROFILE.GraphicInfo.Direct3D.Videomodus.RefreshRate; // PresentParams.Windowed = PROFILE.GraphicInfo.Direct3D.bWindowed; // PresentParams.MultiSampleType = PROFILE.GraphicInfo.Direct3D.MultySamplingType; // PresentParams.MultiSampleQuality = PROFILE.GraphicInfo.Direct3D.dwMultySamplingQuality; // PresentParams.Flags = PROFILE.GraphicInfo.Direct3D.dwFlags; // if(PROFILE.GraphicInfo.Direct3D.bVSync) // PresentParams.PresentationInterval = D3DPRESENT_INTERVAL_ONE; // else // PresentParams.PresentationInterval = D3DPRESENT_INTERVAL_IMMEDIATE; // PresentParams.EnableAutoDepthStencil = FALSE; // PresentParams.AutoDepthStencilFormat = PROFILE.GraphicInfo.Direct3D.ZStencilBufferFormat; tbDirect3D::Instance()->Reset(&PresentParams); // DirectSound tbDirectSound::Instance().Exit(); if(tbDirectSound::Instance().Init(&config)) { TB_ERROR("Initialisieren von DirectSound fehlgeschlagen!", TB_ERROR); } return TB_OK; } |
Quellcode |
|
1 |
Der Aufruf von Device->Reset() verursachte den DirectX-Fehler D3DERR_INVALIDCALL! Beschreibung: Invalid call |
Quellcode |
|
1 2 3 4 5 6 7 8 9 |
GraphikenLöschen()... tbTextureManager::Instance().Exit(); tbDirect3D::Instance().Exit(); tbDirect3D::Instance().Init(~); tbTextureManager::Instance().Init(); GraphikenNeuLaden()... tbDirectSound::Instance().Exit(); tbDirectSound::Instance().Init(~); |
Zitat von »"Jonsen"«
Ja, ich benutze Texturen, Fonts und einen Vertexbuffer im Hauptmenü und einen Effect zum rendern! (-> tbGUI)
Aber bei DirectSound funktioniert das doch auch, das neustarten - warum muss ich dann bei Direct3D alle Texturen etc neu initialisieren :?
Werbeanzeige