diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2014-03-31 23:12:37 -0500 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2014-03-31 23:12:37 -0500 |
commit | fbd3a27d6e0998f6052e93ce60f68c5261b38d2d (patch) | |
tree | 6f85c703246c65dfdff0c7c25f8a138be138ce17 /opengl.c | |
parent | 6e4f45f875ccc0f29b93b0b36ef34dfdc8f8394a (diff) | |
download | tdebase-fbd3a27d6e0998f6052e93ce60f68c5261b38d2d.tar.gz tdebase-fbd3a27d6e0998f6052e93ce60f68c5261b38d2d.zip |
Add required functionality for use with TDE
Diffstat (limited to 'opengl.c')
-rw-r--r-- | opengl.c | 38 |
1 files changed, 37 insertions, 1 deletions
@@ -4,6 +4,7 @@ * Based on `xcompmgr` - Copyright (c) 2003, Keith Packard * * Copyright (c) 2011-2013, Christopher Jeffrey + * Copyright (c) 2014 Timothy Pearson <kb9vqf@pearsoncomputing.net> * See LICENSE for more information. * */ @@ -1378,7 +1379,7 @@ glx_render(session_t *ps, const glx_texture_t *ptex, glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_ALPHA, GL_REPLACE); glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_ALPHA, GL_TEXTURE); glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_ALPHA, GL_SRC_ALPHA); - + // Texture stage 1 glActiveTexture(GL_TEXTURE1); glEnable(ptex->target); @@ -1509,6 +1510,41 @@ glx_render(session_t *ps, const glx_texture_t *ptex, } /** + * @brief Render a region with a specified color. + */ +bool +glx_render_specified_color(session_t *ps, int color, int dx, int dy, int width, int height, int z, + XserverRegion reg_tgt, const reg_data_t *pcache_reg) { + + glColor4f(color, + color, + color, + 1.0f + ); + + { + P_PAINTREG_START(); + { + GLint rdx = crect.x; + GLint rdy = ps->root_height - crect.y; + GLint rdxe = rdx + crect.width; + GLint rdye = rdy - crect.height; + + glVertex3i(rdx, rdy, z); + glVertex3i(rdxe, rdy, z); + glVertex3i(rdxe, rdye, z); + glVertex3i(rdx, rdye, z); + } + P_PAINTREG_END(); + } + glColor4f(0.0f, 0.0f, 0.0f, 0.0f); + + glx_check_err(ps); + + return true; +} + +/** * Render a region with color. */ static void |