summaryrefslogtreecommitdiff
path: root/platform/x11/os_x11.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'platform/x11/os_x11.cpp')
-rw-r--r--platform/x11/os_x11.cpp17
1 files changed, 10 insertions, 7 deletions
diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp
index b47c66c57f..14bb8dbcb8 100644
--- a/platform/x11/os_x11.cpp
+++ b/platform/x11/os_x11.cpp
@@ -103,7 +103,7 @@ void OS_X11::initialize_core() {
int OS_X11::get_current_video_driver() const {
return video_driver_index;
}
-
+#if 0
static RID test_index_array;
static RID test_vertex_array;
static RID test_uniform_set;
@@ -111,7 +111,7 @@ static RID test_pipeline;
static RID test_framebuffer_pipeline;
static RID test_framebuffer_uniform_set;
static RID test_framebuffer;
-
+#endif
Error OS_X11::initialize(const VideoMode &p_desired, int p_video_driver, int p_audio_driver) {
long im_event_mask = 0;
@@ -409,7 +409,8 @@ Error OS_X11::initialize(const VideoMode &p_desired, int p_video_driver, int p_a
RasterizerRD::make_current();
// test shader
-
+#if 0
+ //test code, remains for reference, ask before removing
RID shader;
{
RenderingDevice::ShaderStageSource vert;
@@ -601,7 +602,9 @@ Error OS_X11::initialize(const VideoMode &p_desired, int p_video_driver, int p_a
test_framebuffer_pipeline = rendering_device->render_pipeline_create(shader, rendering_device->screen_get_framebuffer_format(), vertex_desc, RenderingDevice::RENDER_PRIMITIVE_TRIANGLES, RenderingDevice::PipelineRasterizationState(), RenderingDevice::PipelineMultisampleState(), RenderingDevice::PipelineDepthStencilState(), RenderingDevice::PipelineColorBlendState::create_disabled());
}
+#endif
#if 0
+ //test code, remains for reference, ask before removing
Vector<RenderingDevice::ShaderStageSource> source;
RenderingDevice::ShaderStageSource frag;
frag.shader_stage = RenderingDevice::SHADER_STAGE_FRAGMENT;
@@ -3414,8 +3417,8 @@ void OS_X11::swap_buffers() {
#if defined(OPENGL_ENABLED)
context_gl->swap_buffers();
#endif
-
- Vector<Color> clear;
+#if 0
+ Vector <Color> clear;
float color[4] = { 1, 0, 1, 1 };
clear.push_back(Color(0.5, 0.8, 0.2));
RenderingDevice::DrawListID cmd_list = rendering_device->draw_list_begin(test_framebuffer, RenderingDevice::INITIAL_ACTION_CLEAR, RenderingDevice::FINAL_ACTION_READ_COLOR_DISCARD_DEPTH, clear);
@@ -3435,9 +3438,9 @@ void OS_X11::swap_buffers() {
rendering_device->draw_list_set_push_constant(cmd_list, color, 4 * 4);
rendering_device->draw_list_draw(cmd_list, true);
rendering_device->draw_list_end();
- rendering_device->finalize_frame();
+#endif
+
context_vulkan->swap_buffers();
- rendering_device->advance_frame();
}
void OS_X11::alert(const String &p_alert, const String &p_title) {