sdk: GL blitter
git-svn-id: svn://kolibrios.org@4502 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
39
contrib/sdk/sources/render/render.h
Normal file
39
contrib/sdk/sources/render/render.h
Normal file
@@ -0,0 +1,39 @@
|
||||
#ifndef __GL_RENDER_H__
|
||||
#define __GL_RENDER_H__
|
||||
|
||||
#define EGL_EGLEXT_PROTOTYPES
|
||||
#define GL_GLEXT_PROTOTYPES
|
||||
|
||||
#include "EGL/egl.h"
|
||||
#include "EGL/eglext.h"
|
||||
#include "GL/gl.h"
|
||||
|
||||
enum px_buffer
|
||||
{
|
||||
PX_FRONT = 0,
|
||||
PX_BACK = 1
|
||||
};
|
||||
|
||||
struct render
|
||||
{
|
||||
int fd;
|
||||
EGLDisplay dpy;
|
||||
EGLContext context;
|
||||
EGLint dx, dy;
|
||||
EGLint width, height;
|
||||
EGLint scr_width, scr_height;
|
||||
GLuint framebuffer;
|
||||
EGLImageKHR front, back, screen;
|
||||
GLuint tx_buffers[2];
|
||||
GLuint tx_screen;
|
||||
int back_buffer;
|
||||
GLuint blit_prog;
|
||||
GLint sampler;
|
||||
float vertices[8], texcoords[8];
|
||||
};
|
||||
|
||||
struct render* create_render(EGLDisplay dpy, EGLSurface surface, int dx, int dy);
|
||||
void render_blit(struct render *render, enum px_buffer buffer);
|
||||
void render_swap_and_blit(struct render *render);
|
||||
|
||||
#endif /* __GL_RENDER_H__ */
|
Reference in New Issue
Block a user