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 1081:ef31ae97bb8b
prev805:b355f7b3ff2e
next1134:f502f3d32f90
author nkeynes
date Tue Dec 01 18:18:15 2009 +1000 (11 years ago)
permissions -rw-r--r--
last change Fix compile-time warnings
file annotate diff log raw
nkeynes@106
     1
/**
nkeynes@561
     2
 * $Id$
nkeynes@106
     3
 *
nkeynes@106
     4
 * Null video output driver (ie no video output whatsoever)
nkeynes@106
     5
 *
nkeynes@106
     6
 * Copyright (c) 2005 Nathan Keynes.
nkeynes@106
     7
 *
nkeynes@106
     8
 * This program is free software; you can redistribute it and/or modify
nkeynes@106
     9
 * it under the terms of the GNU General Public License as published by
nkeynes@106
    10
 * the Free Software Foundation; either version 2 of the License, or
nkeynes@106
    11
 * (at your option) any later version.
nkeynes@106
    12
 *
nkeynes@106
    13
 * This program is distributed in the hope that it will be useful,
nkeynes@106
    14
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
nkeynes@106
    15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
nkeynes@106
    16
 * GNU General Public License for more details.
nkeynes@106
    17
 */
nkeynes@106
    18
nkeynes@144
    19
#include "display.h"
nkeynes@106
    20
nkeynes@805
    21
static render_buffer_t video_null_create_render_buffer( uint32_t hres, uint32_t vres, GLuint tex_id )
nkeynes@352
    22
{
nkeynes@352
    23
    return NULL;
nkeynes@352
    24
}
nkeynes@352
    25
nkeynes@669
    26
static void video_null_destroy_render_buffer( render_buffer_t buffer )
nkeynes@106
    27
{
nkeynes@106
    28
}
nkeynes@106
    29
nkeynes@669
    30
static gboolean video_null_set_render_target( render_buffer_t buffer )
nkeynes@106
    31
{
nkeynes@106
    32
    return TRUE;
nkeynes@106
    33
}
nkeynes@106
    34
nkeynes@805
    35
static void video_null_finish_render( render_buffer_t buffer )
nkeynes@805
    36
{
nkeynes@805
    37
}
nkeynes@805
    38
nkeynes@669
    39
static void video_null_display_render_buffer( render_buffer_t buffer )
nkeynes@669
    40
{
nkeynes@669
    41
}
nkeynes@669
    42
nkeynes@669
    43
static gboolean video_null_read_render_buffer( unsigned char *target, 
nkeynes@736
    44
                                               render_buffer_t buffer, 
nkeynes@736
    45
                                               int rowstride, int format )
nkeynes@106
    46
{
nkeynes@106
    47
    return TRUE;
nkeynes@106
    48
}
nkeynes@106
    49
nkeynes@669
    50
static void video_null_load_frame_buffer( frame_buffer_t frame, 
nkeynes@736
    51
                                          render_buffer_t buffer )
nkeynes@352
    52
{
nkeynes@352
    53
}
nkeynes@352
    54
nkeynes@669
    55
static void video_null_display_blank( uint32_t colour )
nkeynes@106
    56
{
nkeynes@106
    57
}
nkeynes@106
    58
nkeynes@1081
    59
static void video_null_swap_buffers(void)
nkeynes@1081
    60
{
nkeynes@1081
    61
}
nkeynes@106
    62
nkeynes@700
    63
struct display_driver display_null_driver = { 
nkeynes@700
    64
        "null",
nkeynes@700
    65
        N_("Null (no video) driver"),
nkeynes@700
    66
        NULL,
nkeynes@700
    67
        NULL,
nkeynes@700
    68
        NULL,
nkeynes@700
    69
        NULL, 
nkeynes@700
    70
        NULL,
nkeynes@700
    71
        video_null_create_render_buffer,
nkeynes@700
    72
        video_null_destroy_render_buffer,
nkeynes@700
    73
        video_null_set_render_target,
nkeynes@805
    74
        video_null_finish_render,
nkeynes@700
    75
        video_null_load_frame_buffer,
nkeynes@700
    76
        video_null_display_render_buffer,
nkeynes@700
    77
        video_null_display_blank,
nkeynes@1081
    78
        video_null_swap_buffers,
nkeynes@700
    79
        video_null_read_render_buffer };
.