OpenGL2: Add OpenGL ES 2.0+ support
This mainly targets OpenGL ES 2.0 but it also supports compiling GLSL as ESSL 3.00. It's missing support for framebuffer objects which should be possible on ES 2. (Though using renderbuffers instead of textures.) opengl1 cvars that are not supported will display a message and disable the cvar. This has not been reviewed for new opengl2 cvars. Enabling cvars may cause rendering issues. Some of the broken cvars may be possible to support using OpenGL ES 3 features. The game displays okay with the default cvars.
This commit is contained in:
1 parent
1fc83e4845
commit
3b984d2b51
14 files changed
+658
-167
No files matched your search
@@ -357,11 +357,12 @@ qboolean CL_OpenAVIForWriting( const char *fileName )
|
||||
else
|
||||
afd.motionJpeg = qfalse;
|
||||
|
||||
// Buffers only need to store RGB pixels.
|
||||
// Capture buffer stores RGB pixels but OpenGL ES reads RGBA and converts to RGB in-place.
|
||||
// Encode buffer only needs to store RGB pixels.
|
||||
// Allocate a bit more space for the capture buffer to account for possible
|
||||
// padding at the end of pixel lines, and padding for alignment
|
||||
#define MAX_PACK_LEN 16
|
||||
afd.cBuffer = Z_Malloc((afd.width * 3 + MAX_PACK_LEN - 1) * afd.height + MAX_PACK_LEN - 1);
|
||||
afd.cBuffer = Z_Malloc((afd.width * 4 + MAX_PACK_LEN - 1) * afd.height + MAX_PACK_LEN - 1);
|
||||
// raw avi files have pixel lines start on 4-byte boundaries
|
||||
afd.eBuffer = Z_Malloc(PAD(afd.width * 3, AVI_LINE_PADDING) * afd.height);
|
||||
|
||||
|
||||
Reference in new issue
Block a user