-
Notifications
You must be signed in to change notification settings - Fork 519
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Graphics backend enhancements etc. #163
Conversation
@@ -256,29 +248,29 @@ namespace SohImGui { | |||
} | |||
} | |||
|
|||
void Draw() { | |||
|
|||
void Draw1() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you should change this to something more recognizable like RenderMenu and RenderFramebuffer for Draw2
@@ -1007,7 +1007,7 @@ bool ImGui::ScrollbarEx(const ImRect& bb_frame, ImGuiID id, ImGuiAxis axis, ImS6 | |||
return held; | |||
} | |||
|
|||
void ImGui::ImageRotated(ImTextureID tex_id, ImVec2 center, ImVec2 size, float angle) { | |||
void ImGui::ImageSimple(ImTextureID tex_id, ImVec2 center, ImVec2 size) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this function and change it to ImGui::Image
ImGui::Text("Internal Resolution:"); | ||
ImGui::SliderInt("Mul", reinterpret_cast<int*>(&gfx_current_dimensions.internal_mul), 1, 8); | ||
} | ||
ImGui::Text("Internal Resolution:"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was my fault, but it would be cool if you move this into a Graphics category on the menubar
…hest-fix dc boss room chest fix
This change simplifies and unifies how the framebuffers concept is implemented in the different gfx backends.
This allows SSAA, MSAA and N64 mode to be implemented by both the OpenGL and Direct3D 11 backends in the same way. The ImGUI gui has been updated accordingly.
When rendering for unscaled resolution, the OpenGL renderer now renders directly to the back buffer instead of to a texture which is then rendered to the back buffer, in order to save some performance.
The glClipControl usage is now removed and the y flipping has been moved to software. This should only result in a tiny performance decrease but will allow framebuffers to not be rendered upside-down on old hardware/drivers. It should also remove the need to use GLEW on Linux.
Another huge improvement that drastically reduces CPU% and GPU% in Kokiri forest is the batching of all read depth value calls to a single one, to avoid ping-ponging the GPU for every pixel that should be read (11 in Kokiri Forest and 26 in that grotto outside Shadow Temple). The OpenGL renderer now also avoids a read pixel "slow path" when the Intel driver was used that made it slower at higher resolutions.
I also moved audio to a separate thread, so it can be parallelized with the gfx rendering. It's still synchronized to the game though so the audio thread never does any job while the game logic runs. This also avoids the audio to drift in case the game or graphics would lag, which might be important in cutscenes.