Commit Graph

32 Commits

Author SHA1 Message Date
Kevin Shanahan
e15480ba4b draw: const_container_of fixes for gl_draw.c
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-04-24 20:24:54 +09:30
Kevin Shanahan
f0524dc9a2 draw: shorten the conback version string
Only use the first four characters; the full version is still
available via the "version" console command.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-04-08 15:25:53 +09:30
Kevin Shanahan
04e5e9165e draw: don't scribble pic data with glpic_t
Switch things around a bit so that we are not scribbling over the first
few bytes of pic data when we store the glpic_t. Change the definition of
pic_t so that data is a pointer and embed a pic_t in the glpic_t. Then we
just need to place the glpic_t on the hunk, copy the pic->width and
pic->height and point data at the actual pic data provided by
W_GetLumpName.

Unfortunately this made things slightly more complicated on the software
renderer side. Maybe we should be modifying the pic wad at load time
instead?

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-04-08 09:45:44 +09:30
Kevin Shanahan
fa3580ffb9 wad: update wad API to take a wad_t structure
Instead of single global variables to access the one currently loaded wad,
pass in a wad_t to access a specific wad.  Currently this is only gfx.wad,
so the global for this is held by NQ/host.c and QW/client/cl_main.c.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-04-07 15:43:37 +09:30
Kevin Shanahan
3af484f864 draw: factor out scrap init from Draw_Init
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-04-04 17:12:20 +10:30
Kevin Shanahan
b478460327 draw: mark scrap dirty at point of allocation
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-04-04 17:10:34 +10:30
Kevin Shanahan
010ade4ecd draw: make gl scrap texture info into a structure
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-04-03 16:04:49 +10:30
Kevin Shanahan
0001b6b088 gl: bump the gl texture limits
Need a more thorough solution for this, but for now bump the lightmap
block and texture cache limits for recent "big" maps.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-01-01 10:19:12 +10:30
Kevin Shanahan
f407557721 draw: constify qpic_t usage
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-12-22 16:26:53 +10:30
Kevin Shanahan
e4e756bb88 common: return void * from COM_Load*File
Remove unneccessary casts from callers.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-12-22 15:43:10 +10:30
Kevin Shanahan
f569b16c0e draw: add argument completion for gl_texturemode command
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-12-22 15:20:36 +10:30
Kevin Shanahan
f696acfe6c draw: gl_draw const correctness fixes
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-12-22 14:58:50 +10:30
Kevin Shanahan
97232f3069 draw: replace a couple of Draw_Char loops with Draw_String
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-12-16 21:05:22 +10:30
Kevin Shanahan
05f26c42e2 common: replace two more temp buffers with va()
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-12-14 09:56:49 +10:30
Kevin Shanahan
530b82cbaa trivial: whitespace
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-12-14 09:54:46 +10:30
Kevin Shanahan
6b31a50386 trivial: remove some #if 0'd code targeted at 3dfx/Mesa
Looks like an old hack to deal with smaller max texture sizes in the
old, old days. Probably pre-dates the checking of GL_MAX_TEXTURE_SIZE.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-12-14 09:52:21 +10:30
Kevin Shanahan
3ef5b90a6a trivial: use va() instead of hand coded buffer
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-12-14 09:51:22 +10:30
Kevin Shanahan
158d64d15c vid: Expect at least OpenGL 1.1 and glBindTexture
Remove the tests for GL_EXT_texture_object (only being done in the wgl
target anyway). And now the basic SDL OpenGL target works on Win32 too.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-12-11 19:52:28 +10:30
Kevin Shanahan
6f999fac2e gl: rip out support for OpenGL palettized textures
8-bit paletted textures are deprecated functionailty (removed in
OpenGL 3.1 core) so probably not worth supporting them anymore. May be
worth looking at supporting a configuration where we do this via
shaders if the environment is particularly memory size or bandwidth
constrained.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-12-11 12:47:19 +10:30
Kevin Shanahan
e51c621703 work around "possibly unintialised variable" warning in gl_draw.c
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-02 18:53:21 +10:30
Kevin Shanahan
95864c0f14 fix strict aliasing issue in gl_draw.c
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-02 18:38:34 +10:30
Tyrann
05fdf8ca3c Remove some unneeded variables
clang pointed out a number of "unused" variables. These are "used" in
the sense that we do assign things to them, but the results are never
looked at.

As far as I can tell, all the cases included in this commit don't
point to any subtle bugs and should be safe to remove.
2011-12-28 11:51:25 +10:00
Tyrann
a25c79c07a Clean up unused variable from previous commit 1bb07a24 2011-12-28 11:12:02 +10:00
Tyrann
1bb07a24a0 Remove unneeded alpha parameter to GL_Upload8_EXT 2011-12-28 10:48:15 +10:00
Tyrann
5ecb73ab37 [PATCH] Add input sanity check to Draw_TileClear
Tidy up the coordinate checks on a number of the Draw_* functions and add a
similar check to the Draw_TileClear function.

Thanks to Sander van Dijk <a.h.vandijk@gmail.com> for the idea.

Signed-off-by: Tyrann <tyrann@disenchant.net>
2008-06-09 20:56:24 +09:30
Tyrann
b9ef6b0793 [PATCH] Add gcc "noreturn" attribute to a few functions
Annotate a few functions (BOPS_Error, Sys_Error, Sys_Quit and SV_Error) with
the gcc attribute "noreturn" and clean up a few lines of dead code which were
only there previously to quiet the corresponding compiler warnings.

Based on a patch from O.Sezer <sezero@users.sourceforge.net>

Signed-off-by: Tyrann <tyrann@disenchant.net>
2007-10-01 22:39:38 +09:30
Ozkan Sezer
8a488179e4 [PATCH] Use MAX_QPATH to size gltexture identifier
the array size of gltexture_t->identifier should be MAX_QPATH (at least for
consistancy.)

Signed-off-by: O.Sezer <sezero@users.sourceforge.net>
Signed-off-by: Tyrann <tyrann@disenchant.net>
2007-09-01 20:24:17 +09:30
Tyrann
d84f8d1746 [PATCH] Add console stretch effect
Add new effect, selectable with "gl_constretch 1", which makes the console
background appear to stretch as it expands from the top of the screen, as
opposed to the normal scroll down effect.

Thanks to Steven A. and Ozkan for the patch.

Signed-off-by: Tyrann <tyrann@disenchant.net>
2006-09-16 14:29:26 +09:30
Tyrann
e30996ce3a [PATCH] Use glGenTextures for texture handles
Rather than just assuming that the texture handles that we generate are okay
to use, use the proper glGenTextures function. Note that we're still leaking
textures all over the place (every map load, etc.) - proper texture management
is still needed.

Signed-off-by: Tyrann <tyrann@disenchant.net>
2006-09-16 07:05:42 +09:30
Tyrann
2068fd6227 [PATCH] Cleanup WIN32 define usage
This is the only instance of WIN32 left in the quake source. The rest are
_WIN32, so update this one to match.

Signed-off-by: Tyrann <tyrann@disenchant.net>
2006-09-10 19:14:03 +09:30
Tyrann
04a7a84053 [PATCH] Dead code removal
Remove some dead code and a small whitespace fix.

Signed-off-by: Tyrann <tyrann@disenchant.net>
2006-09-10 19:05:57 +09:30
Tyrann
130e22195a Import v0.47 sources 2006-09-10 19:02:51 +09:30