支持抗锯齿
This commit is contained in:
@@ -21,6 +21,7 @@ SDL_Window* main_window;
|
||||
|
||||
extern davinci::Scene g_scene;
|
||||
extern davinci::RenderTarget g_renderTarget;
|
||||
extern davinci::AntiAliasingTech g_aaTech;
|
||||
|
||||
bool initMainUI(SDL_Window* window, SDL_GLContext gl_context, const char* glsl_version)
|
||||
{
|
||||
@@ -96,6 +97,8 @@ void drawMainUI()
|
||||
{
|
||||
davinci_utils::export_mesh_to_obj(g_scene);
|
||||
}
|
||||
const char* aaItem[] = { "None", "MSAA_2X2", "MSAA_4X4"};
|
||||
ImGui::Combo("AntiAliasing", (int*)(&g_aaTech), aaItem, IM_ARRAYSIZE(aaItem));
|
||||
if (ImGui::Button("Render"))
|
||||
{
|
||||
davinci::UniformBuffer uniformBuffer;
|
||||
@@ -112,7 +115,9 @@ void drawMainUI()
|
||||
queue.build(g_scene);
|
||||
|
||||
g_renderTarget.clear();
|
||||
queue.process(uniformBuffer, g_renderTarget);
|
||||
queue.process(g_aaTech, uniformBuffer, g_renderTarget);
|
||||
|
||||
davinci_utils::dump_render_target("d:\\rendertarget", g_renderTarget);
|
||||
}
|
||||
ImGui::End();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user