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 Feb 24 21:17:47 2012 +1000 (10 years ago)
permissions -rw-r--r--
last change Factor video_width/video_height out into video_gl.c
Convert immediate-mode bits in video_gl.c into a structure for glDrawArray
Move setOrtho into defineOrthoMatrix in glutil.c
Rearrange various GL settings to keep a consistent state
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@1159
    20
#include "drivers/video_gl.h"
nkeynes@1159
    21
nkeynes@1159
    22
static gboolean video_null_init( void );
nkeynes@106
    23
nkeynes@805
    24
static render_buffer_t video_null_create_render_buffer( uint32_t hres, uint32_t vres, GLuint tex_id )
nkeynes@352
    25
{
nkeynes@352
    26
    return NULL;
nkeynes@352
    27
}
nkeynes@352
    28
nkeynes@669
    29
static void video_null_destroy_render_buffer( render_buffer_t buffer )
nkeynes@106
    30
{
nkeynes@106
    31
}
nkeynes@106
    32
nkeynes@669
    33
static gboolean video_null_set_render_target( render_buffer_t buffer )
nkeynes@106
    34
{
nkeynes@106
    35
    return TRUE;
nkeynes@106
    36
}
nkeynes@106
    37
nkeynes@805
    38
static void video_null_finish_render( render_buffer_t buffer )
nkeynes@805
    39
{
nkeynes@805
    40
}
nkeynes@805
    41
nkeynes@669
    42
static void video_null_display_render_buffer( render_buffer_t buffer )
nkeynes@669
    43
{
nkeynes@669
    44
}
nkeynes@669
    45
nkeynes@669
    46
static gboolean video_null_read_render_buffer( unsigned char *target, 
nkeynes@736
    47
                                               render_buffer_t buffer, 
nkeynes@736
    48
                                               int rowstride, int format )
nkeynes@106
    49
{
nkeynes@106
    50
    return TRUE;
nkeynes@106
    51
}
nkeynes@106
    52
nkeynes@669
    53
static void video_null_load_frame_buffer( frame_buffer_t frame, 
nkeynes@736
    54
                                          render_buffer_t buffer )
nkeynes@352
    55
{
nkeynes@352
    56
}
nkeynes@352
    57
nkeynes@669
    58
static void video_null_display_blank( uint32_t colour )
nkeynes@106
    59
{
nkeynes@106
    60
}
nkeynes@106
    61
nkeynes@1081
    62
static void video_null_swap_buffers(void)
nkeynes@1081
    63
{
nkeynes@1081
    64
}
nkeynes@106
    65
nkeynes@700
    66
struct display_driver display_null_driver = { 
nkeynes@700
    67
        "null",
nkeynes@700
    68
        N_("Null (no video) driver"),
nkeynes@1159
    69
        video_null_init,
nkeynes@700
    70
        NULL,
nkeynes@700
    71
        NULL,
nkeynes@700
    72
        NULL, 
nkeynes@700
    73
        NULL,
nkeynes@700
    74
        video_null_create_render_buffer,
nkeynes@700
    75
        video_null_destroy_render_buffer,
nkeynes@700
    76
        video_null_set_render_target,
nkeynes@805
    77
        video_null_finish_render,
nkeynes@700
    78
        video_null_load_frame_buffer,
nkeynes@700
    79
        video_null_display_render_buffer,
nkeynes@700
    80
        video_null_display_blank,
nkeynes@1081
    81
        video_null_swap_buffers,
nkeynes@1134
    82
        video_null_read_render_buffer,
nkeynes@1134
    83
        NULL };
nkeynes@1159
    84
nkeynes@1159
    85
static gboolean video_null_init( void )
nkeynes@1159
    86
{
nkeynes@1159
    87
    gl_vbo_fallback_init(&display_null_driver);
nkeynes@1159
    88
    return TRUE;
nkeynes@1159
    89
}
.