blob: 9ebda21a1cc2c9877bf3befa3a21f0720fcff9eb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
#ifndef vl_context_h
#define vl_context_h
#include <X11/Xlib.h>
#include <pipe/p_state.h>
#include "vl_types.h"
struct pipe_context;
struct VL_CONTEXT
{
Display *display;
struct pipe_context *pipe;
unsigned int video_width;
unsigned int video_height;
enum VL_FORMAT video_format;
struct
{
struct
{
struct pipe_rasterizer_state *raster;
struct pipe_depth_stencil_alpha_state *dsa;
struct pipe_blend_state *blend;
} common;
struct
{
} idct;
struct
{
struct pipe_viewport_state viewport;
struct pipe_framebuffer_state render_target;
struct pipe_sampler_state *samplers[5];
struct pipe_texture *textures[5];
struct pipe_shader_state *i_vs, *p_vs[2], *b_vs[2];
struct pipe_shader_state *i_fs, *p_fs[2], *b_fs[2];
struct pipe_vertex_buffer vertex_bufs[3];
struct pipe_vertex_element vertex_buf_elems[3];
struct pipe_constant_buffer vs_const_buf, fs_const_buf;
} mc;
struct
{
struct pipe_viewport_state viewport;
struct pipe_framebuffer_state framebuffer;
struct pipe_sampler_state *sampler;
struct pipe_shader_state *vertex_shader, *fragment_shader;
struct pipe_vertex_buffer vertex_bufs[2];
struct pipe_vertex_element vertex_buf_elems[2];
struct pipe_constant_buffer vs_const_buf, fs_const_buf;
} csc;
} states;
};
int vlCreateContext
(
Display *display,
struct pipe_context *pipe,
unsigned int video_width,
unsigned int video_height,
enum VL_FORMAT video_format,
struct VL_CONTEXT **context
);
int vlDestroyContext(struct VL_CONTEXT *context);
int vlBeginRender(struct VL_CONTEXT *context);
int vlEndRender(struct VL_CONTEXT *context);
#endif
|