Commit graph

46 commits

Author SHA1 Message Date
Kp 0ece005dfa Use screen_mode for screen resolution 2015-05-14 02:23:13 +00:00
Kp e592f3a0bb Inline call to gr_set_mode(0) 2015-05-14 02:23:13 +00:00
Kp 2d9af1e348 Propagate gr_init argument 2015-05-14 02:23:13 +00:00
derhass 49e7cfe37e GLES: never declare the unused variable gl_draw_buffer
Move the declarition directly to the code part where it is used
(always in a #ifndef OGLES block).
2015-04-04 22:58:02 +02:00
derhass 639b569496 Merge branch 'unification/master' into unification/syncgl_v2
Conflicts:
	similar/arch/ogl/gr.cpp
	similar/misc/args.cpp
2015-03-23 20:18:17 +01:00
derhass 6d41224638 move GL synchronization code into its own class 2015-03-22 21:19:06 +01:00
derhass db267af6f2 add basic OpenGL extension handling
Currently only used for fence sync objects.
2015-03-22 20:32:14 +01:00
Kp 2b44a352ca Remove redundant sc_mode
sc_mode is a packed copy of sc_w/sc_h.  Switch to an accessor that uses
the copy.
2015-03-22 18:49:21 +00:00
Kp fca381727c Add wrappers for screen width/height 2015-03-22 18:49:21 +00:00
Kp 8daa014d53 Remove unused gr_check_mode 2015-03-22 18:49:21 +00:00
Kp 6c861b61cd Move RPI variables to usage site 2015-03-22 18:49:21 +00:00
Kp f098471e54 Make sdl_video_flags static 2015-03-22 18:49:21 +00:00
Kp 4afeba001a Move gl_* variables to local scope 2015-03-22 18:49:21 +00:00
Kp 08c0c3768c Remove unused gr_set_draw_buffer 2015-03-22 18:49:21 +00:00
derhass 2cd73b6dfe Import the syncgl patch based on 0.58.1 into unification code base
I also changed the command line arguments a bit, gl_syncmethod and
gl_sycnwait are used now. Furthermore, I added the ew mode AUTO. This is
a conservative mode and the default for now: if GL_ARB_sync is available,
use the FENCE_SLEEP mode, otherwise, disable it completely.

Conflicts:
	include/args.h
	misc/args.c
	similar/arch/ogl/gr.cpp
2015-03-22 18:17:11 +01:00
derhass a8283a9d45 Merge branch 'unification/master' into unification/rpi
Kp already incorporated some small changes I made in my rpi branch into
unification/master. However, besides making the rpi helper functions
static as I did, he also changed the prototype from (void) parameters
to C++ style (). I've incorporated his version here.

Conflicts:
	similar/arch/ogl/gr.cpp
2015-03-21 18:02:16 +01:00
derhass f46e4a2a7c RPi: use -isystem for the VideoCore library header path
Rebirth builds with -Werror=redundant-decls -Werror=undef, which are
triggered by the bcm_host.h. Making gcc treat those paths as
system headers avoids these issues. This was suggested by Kp.
2015-03-21 17:53:13 +01:00
Kp cf687a9a0a Make RPi OGL functions static 2015-03-20 03:30:20 +00:00
derhass c1a38e4433 RPi: Use explicit type casts for DISPMANX_TRANSFORM_T 2015-03-18 21:30:50 +01:00
derhass 7ce066cb8b GLES/RPi: Declare internal helper functions static 2015-03-18 21:07:57 +01:00
derhass c23c98562b GLES: Fix const correctness and for TestEGLError() 2015-03-18 21:05:34 +01:00
Kp f900d4a5ee Remove RAIIdmem::operator pointer
Mac OS X defines uint_fast32_t to unsigned int, causing ambiguous
overloads between RAIIdmem::operator[](std::size_t) and
RAIIdmem::operator[](int).  Adding a disambiguating overload for OS X
breaks Windows.  Remove operator pointer and operator[].  Rely on the
inherited operator[] for indexing.  Require users to call ->get() to
convert to a simple pointer.

First btb ambiguity reported: https://github.com/dxx-rebirth/dxx-rebirth/pull/34
Second btb ambiguity reported: https://github.com/dxx-rebirth/dxx-rebirth/pull/43
2015-02-17 03:52:59 +00:00
Kp ff4a0ccd70 Fix RAIIdmem array usage
Some RAIIdmem instances managed a T[], but were declared to manage a T.
2015-01-28 03:42:53 +00:00
Kp f7815810e8 Use RAIIPHYSFS_File to manage PHYSFS_File
Fixes a few leaks on error paths.
2015-01-17 18:31:42 +00:00
Kp f2797ddf1e Pass gr_init_canvas arg by & 2015-01-17 18:31:40 +00:00
Kp 5eddc2c197 Make bitmap bm_data const where easy 2014-12-02 03:24:38 +00:00
Kp 0790eda153 Use new/delete for grs_screen 2014-11-30 22:09:19 +00:00
Kp ad3a240958 Pass ogl_ugpixel arg by & 2014-11-30 22:09:18 +00:00
Kp 917ca43524 Propagate for variables in similar/arch/ogl/gr.cpp 2014-09-26 02:42:13 +00:00
Kp d3d457cf19 Pass array<> to gr_list_modes to preserve size information 2014-07-17 03:29:57 +00:00
Kp 256e86b2b6 List initialize grd_curscreen 2014-07-04 03:56:40 +00:00
zico ad7cb106bc Changed custom D1X license to GPLv3 2014-06-01 19:55:23 +02:00
Kp 073f00974a Eliminate uses of the typedef struct X { ... } X; pattern
C++ does not require this pattern.

import re, fileinput
to = re.compile(r'^typedef struct ([a-z_A-Z]+)\s*{')
tc = re.compile(r'^}(.*?)\s*([a-z_A-Z]+);$')
osn = None
for line in fileinput.input(inplace=True):
	m = to.match(line)
	if m:
		osn = m.group(1)
		print 'struct %s\n{' % osn
		continue
	if osn:
		m = tc.match(line)
		if m:
			csn = m.group(2)
			if osn == csn:
				print '}%s;' % m.group(1)
				osn = None
				continue
			else:
				osn = None
	print line,
2013-12-28 22:48:07 +00:00
Kp e9f9cb676f Centralize palette utilities 2013-12-22 00:05:13 +00:00
Kp a3d66a3b37 Add typedef palette_array_t for palette data 2013-12-22 00:05:13 +00:00
Kp 50b1717ae3 Use common helper to copy and bound palettes 2013-12-22 00:05:13 +00:00
zico c4f14f1044 Small change in ogl_ulinec to haround up right and bottom properly 2013-12-14 02:34:13 +01:00
Kp 3b9b5ebfb0 Use RAII to manage function-local heap objects 2013-12-08 19:04:52 +00:00
Kp 4d261232c6 Remove useless allocation when saving screenshot 2013-12-08 18:26:19 +00:00
Kp 75c229c6bf Normalize con_printf newline usage 2013-12-07 21:13:37 +00:00
Kp 2714679284 Mark private functions static 2013-11-02 04:23:55 +00:00
Kp b5414edcd0 Fix Win32 OpenGL build 2013-10-26 03:50:27 +00:00
Kp d21b7b7b6e Explicitly narrow GL floats for C++11 2013-10-09 01:54:12 +00:00
Kp b7db46a43a Switch to std::min 2013-09-15 04:06:07 +00:00
Kp 20cf3f4cdb Mark various OGL functions static 2013-08-24 16:44:23 +00:00
Kp 4e6142d779 Move similar/arch/ogl/gr.c -> similar/arch/ogl/gr.cpp 2013-08-10 03:56:14 +00:00
Renamed from similar/arch/ogl/gr.c (Browse further)