Search
lxdream.org :: lxdream/src/drivers/video_null.c
lxdream 0.9.1
released Jun 29
Download Now
filename src/drivers/video_null.c
changeset 1159:580436b01b6c
prev1134:f502f3d32f90
author nkeynes
date Fri May 29 18:47:05 2015 +1000 (7 years ago)
permissions -rw-r--r--
last change Fix test case
view annotate diff log raw
     1 /**
     2  * $Id$
     3  *
     4  * Null video output driver (ie no video output whatsoever)
     5  *
     6  * Copyright (c) 2005 Nathan Keynes.
     7  *
     8  * This program is free software; you can redistribute it and/or modify
     9  * it under the terms of the GNU General Public License as published by
    10  * the Free Software Foundation; either version 2 of the License, or
    11  * (at your option) any later version.
    12  *
    13  * This program is distributed in the hope that it will be useful,
    14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
    15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    16  * GNU General Public License for more details.
    17  */
    19 #include "display.h"
    20 #include "drivers/video_gl.h"
    22 static gboolean video_null_init( void );
    24 static render_buffer_t video_null_create_render_buffer( uint32_t hres, uint32_t vres, GLuint tex_id )
    25 {
    26     return NULL;
    27 }
    29 static void video_null_destroy_render_buffer( render_buffer_t buffer )
    30 {
    31 }
    33 static gboolean video_null_set_render_target( render_buffer_t buffer )
    34 {
    35     return TRUE;
    36 }
    38 static void video_null_finish_render( render_buffer_t buffer )
    39 {
    40 }
    42 static void video_null_display_render_buffer( render_buffer_t buffer )
    43 {
    44 }
    46 static gboolean video_null_read_render_buffer( unsigned char *target, 
    47                                                render_buffer_t buffer, 
    48                                                int rowstride, int format )
    49 {
    50     return TRUE;
    51 }
    53 static void video_null_load_frame_buffer( frame_buffer_t frame, 
    54                                           render_buffer_t buffer )
    55 {
    56 }
    58 static void video_null_display_blank( uint32_t colour )
    59 {
    60 }
    62 static void video_null_swap_buffers(void)
    63 {
    64 }
    66 struct display_driver display_null_driver = { 
    67         "null",
    68         N_("Null (no video) driver"),
    69         video_null_init,
    70         NULL,
    71         NULL,
    72         NULL, 
    73         NULL,
    74         video_null_create_render_buffer,
    75         video_null_destroy_render_buffer,
    76         video_null_set_render_target,
    77         video_null_finish_render,
    78         video_null_load_frame_buffer,
    79         video_null_display_render_buffer,
    80         video_null_display_blank,
    81         video_null_swap_buffers,
    82         video_null_read_render_buffer,
    83         NULL };
    85 static gboolean video_null_init( void )
    86 {
    87     gl_vbo_fallback_init(&display_null_driver);
    88     return TRUE;
    89 }
.