setup_egl_display native_display
# We need 8 bits per color for selection by color
- select_egl_config(red_bits, green_bits, blue_bits, 0, 8, 0, 0)
+ select_egl_config(red_bits, green_bits, blue_bits, 0, 8, 0)
var format = egl_config.attribs(egl_display).native_visual_id
assert not native_window.address_is_null
setup_egl_display sdl_window.wm_info.display_handle
if debug_gamnit then print "Setting up EGL context"
- select_egl_config(red_bits, green_bits, blue_bits, 8, 8, 0, 0)
+ select_egl_config(red_bits, green_bits, blue_bits, 8, 8, 0)
setup_egl_context sdl_window.wm_info.window_handle
end
end
# Select an EGL config
- protected fun select_egl_config(red, green, blue, alpha, depth, stencil, sample: Int)
+ protected fun select_egl_config(red, green, blue, alpha, depth, stencil: Int)
do
var config_chooser = new EGLConfigChooser
config_chooser.renderable_type_egl
if alpha > 0 then config_chooser.alpha_size = alpha
if depth > 0 then config_chooser.depth_size = depth
if stencil > 0 then config_chooser.stencil_size = stencil
- if sample > 0 then config_chooser.sample_buffers = sample
+
+ config_chooser.sample_buffers = 1
+ config_chooser.samples = 4
+
config_chooser.close
var configs = config_chooser.choose(egl_display)
print " Caveats: {attribs.caveat}"
print " Size of RGBA: {attribs.red_size} {attribs.green_size} {attribs.blue_size} {attribs.alpha_size}"
print " Buffer, depth, stencil: {attribs.buffer_size} {attribs.depth_size} {attribs.stencil_size}"
+ print " Sample buffers, samples: {attribs.sample_buffers} {attribs.samples}"
end
end