move around - flatter.
[profile/ivi/evas.git] / src / modules / engines / gl_common / evas_gl_private.h
1 #ifndef _EVAS_GL_PRIVATE_H
2 #define _EVAS_GL_PRIVATE_H
3
4 #include "evas_gl_common.h"
5
6 #ifndef GL_TEXTURE_RECTANGLE_NV
7 #define GL_TEXTURE_RECTANGLE_NV 0x84f5
8 #endif
9
10 #if 0
11 #ifndef GL_WRITE_PIXEL_DATA_RANGE_NV
12 /* nvidia extensions */
13 extern void *glXAllocateMemoryNV(GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority);
14 extern void glPixelDataRangeNV(GLenum target, GLsizei length, void *pointer);
15 extern void glFlushPixelDataRangeNV(GLenum target);
16 # define GL_WRITE_PIXEL_DATA_RANGE_NV 0x8878
17 #define GL_READ_PIXEL_DATA_RANGE_NV 0x8879
18 #endif
19
20 /* arb extensions */
21 void glBindBufferARB(GLenum target, uint buffer);
22 void glDeleteBuffersARB(GLsizei n, const uint *buffers);
23 void glGenBuffersARB(GLsizei n, GLuint *buffers);
24 GLboolean glIsBufferARB(GLuint buffer);
25
26 void glBufferDataARB(GLenum target, GLsizei size, const void *data,
27                                         GLenum usage);
28 void glBufferSubDataARB(GLenum target, int offset, GLsizei size,
29                                               const void *data);
30 void glGetBufferSubDataARB(GLenum target, int offset,
31                                                     GLsizei size, void *data);
32
33 void *glMapBufferARB(GLenum target, GLenum access);
34 GLboolean glUnmapBufferARB(GLenum target);
35
36 void glGetBufferParameterivARB(GLenum target, GLenum pname, int *params);
37 void glGetBufferPointervARB(GLenum target, GLenum pname, void **params);
38
39 #define GL_ARRAY_BUFFER_ARB                             0x8892
40 #define GL_ELEMENT_ARRAY_BUFFER_ARB                     0x8893
41 #define GL_ARRAY_BUFFER_BINDING_ARB                     0x8894
42 #define GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB             0x8895
43 #define GL_VERTEX_ARRAY_BUFFER_BINDING_ARB              0x8896
44 #define GL_BNORMAL_ARRAY_BUFFER_BINDING_ARB             0x8897
45 #define GL_COLOR_ARRAY_BUFFER_BINDING_ARB               0x8898
46 #define GL_INDEX_ARRAY_BUFFER_BINDING_ARB               0x8899
47 #define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB       0x889A
48 #define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB           0x889B
49 #define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB     0x889C
50 #define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB      0x889D
51 #define GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB              0x889E
52 #define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB       0x889F
53 #define GL_STREAM_DRAW_ARB                              0x88E0
54 #define GL_STREAM_READ_ARB                              0x88E1
55 #define GL_STREAM_COPY_ARB                              0x88E2
56 #define GL_STATIC_DRAW_ARB                              0x88E4
57 #define GL_STATIC_READ_ARB                              0x88E5
58 #define GL_STATIC_COPY_ARB                              0x88E6
59 #define GL_DYNAMIC_DRAW_ARB                             0x88E8
60 #define GL_DYNAMIC_READ_ARB                             0x88E9
61 #define GL_DYNAMIC_COPY_ARB                             0x88EA
62 #define GL_READ_ONLY_ARB                                0x88B8
63 #define GL_WRITE_ONLY_ARB                               0x88B9
64 #define GL_READ_WRITE_ARB                               0x88BA
65 #define GL_BUFFER_SIZE_ARB                              0x8764
66 #define GL_BUFFER_USAGE_ARB                             0x8765
67 #define GL_BUFFER_ACCESS_ARB                            0x88BB
68 #define GL_BUFFER_MAPPED_ARB                            0x88BC
69 #define GL_BUFFER_MAP_POINTER_ARB                       0x88BD
70 #endif
71
72
73
74
75
76
77 /* evas ARGB pixel config */
78 #define NATIVE_PIX_FORMAT GL_BGRA
79
80 /* Big endian systems require the texture know the byte order is reversed */
81 #ifdef WORDS_BIGENDIAN
82 #define NATIVE_PIX_UNIT   GL_UNSIGNED_INT_8_8_8_8_REV
83 #else
84 /* fast on vidia */
85 /*#define NATIVE_PIX_UNIT   GL_UNSIGNED_INT_8_8_8_8_REV*/
86 /* fast on ati compared to GL_UNSIGNED_INT_8_8_8_8_REV */
87 #define NATIVE_PIX_UNIT   GL_UNSIGNED_BYTE
88 #endif
89
90 #endif