Commit Graph

96 Commits

Author SHA1 Message Date
Garux 4016d64859 use std::chrono::steady_clock timer 2021-11-03 19:43:44 +03:00
Garux c217ad981a remove Sys_DoubleTime() 2021-10-31 14:33:57 +03:00
Garux 522f6f907e rename cmdlib and imagelib to fix name clashes 2021-10-31 14:13:02 +03:00
Garux da98e8fde3 various code cleanups 2021-10-30 16:04:31 +03:00
Garux 0c390241c8 fix formatting 2021-10-26 18:16:24 +03:00
Garux d812cbd4d4 replace ArrayRange by tcb::span (reproduction of std::span) 2021-10-24 08:32:10 +03:00
Garux 133b146712 limit camera workzone renderable data amount
fixes performance with big selection + small grid
fixes crash, while scaling brush + model to zero
2021-07-02 16:55:50 +03:00
Garux 4471302857 add and use BasicVector3.vec2() 2021-06-23 16:51:03 +03:00
Garux 9cf755dfab lower default camera mouse sensitivity
screen resolution change over time ~= 640x480 -> fullHd ~= 3x
2021-05-08 11:05:13 +03:00
Garux 2222100316 indent classes, align by spaces 2021-03-24 00:25:15 +03:00
Garux 5977a04550 * unzoom from mouse pointer in 2D and 3D 2020-06-13 20:58:10 +03:00
Garux 62603d25fb don't check equality to gboolean FALSE and TRUE 2020-05-21 16:27:31 +03:00
Garux 70cf8c4bdd gtk_widget_ref/gtk_widget_unref -> g_object_ref/g_object_unref 2020-05-21 16:27:28 +03:00
Garux 50e1af1a16 update GtkWidget allocation access method 2020-05-21 16:27:03 +03:00
Garux ff33df7d45 replace GTK_WIDGET_VISIBLE -> gtk_widget_get_visible() 2020-05-19 23:46:54 +03:00
Garux 112f66fb06 remove deprecated GTK_WIDGET_SET_FLAGS GTK_WIDGET_UNSET_FLAGS use 2020-05-19 22:08:00 +03:00
Garux e1a145c234 remove excess (GdkModifierType) casts 2020-05-19 21:40:52 +03:00
Garux 0831e0966d Replace GDK_<keyname> with GDK_KEY_<keyname> 2020-05-19 21:15:11 +03:00
Garux a0a47640b0 * new rendering system for volatile text
(symbols rendered to atlas texture)
deliver position via glRasterPos + glGet GL_CURRENT_RASTER_POSITION to avoid adding calculations of screen coords in many spots
solves problem: pango 1.44 switch freetype->harfbuzz = bitmap fonts aren't available, in particular no gdk_gl_font_use_pango_font()
text is rendered from font bottom (was from baseline)(latter is wanted less often)
wgl bitmap<->pango sizes do not match, thus realign all text positions, increase default font size
make 2D axes labels, view type text, sizing info adaptive to font size
#24
fixes #42
2020-05-14 07:51:34 +03:00
Garux 7ae79b263d minor refactoring 2020-04-28 08:30:25 +03:00
Garux 7acdf92d50 * QE tool mouse move: highlight PlaneSelectables with alt/ctrl+alt, components in component modes
improve bestPlaneIndirect pickup (resolve, when corner is closest)
support 2d in class DragPlanes::bestPlaneIndirect
2020-03-19 00:00:28 +03:00
Garux 94a6cc9cda lower default camera fov 2020-02-25 19:01:48 +03:00
Garux a834981d53 binds... * shift + }/{: CameraModeNext/Prev 2019-09-08 18:28:48 +03:00
Garux 6e42edd1cb * calculate fov against max of 3D viewport width, height for consistency 2019-08-31 11:30:29 +03:00
Garux 3bb51ba6b9 * fix invisible radiant with floating 3D camera window hidden in non floating layout 2019-08-30 12:30:16 +03:00
Garux 49d1c98d81 * disable overlay front buffer rendering hack in 3D camera and completely in 64bit builds
* render 2D crosshair, as overlay, update it during manipulations
	* fix active 2D view outline rendering in 2x2 layout
2019-08-23 13:06:16 +03:00
Garux aa99f4d254 * UV Tool (edit texture alignment of selected face) modifiers:
pivot control point and lines: ctrl = snap hard to face vertices and grid
		grid density controls: shift = change density of both axes synchronously, ctrl = power of two grid
		scale lines: shift = scale axes synchronously, ctrl = snap hard to vertices
		alt + m1 on grid = skew texture (is possible alright in BP and Valve220 map formats, not in AP); ctrl = snap hard to edges
		texture move: shift = only move along the axis with the biggest move, ctrl = snap grid lines hard to vertices and pivot
		rotate: shift = rotate with step of 15 degrees, ctrl = snap hard to edges
2019-05-19 10:30:44 +03:00
Garux b9a43074f0 fix wrong alpha after negative float to byte conversion in RenderableCamWorkzone 2019-04-24 01:08:51 +03:00
Garux 8d1015c7c8 make RenderTextLabel OpenGLRenderable
render CamDrawSize in uniform way
2019-04-23 14:02:13 +03:00
Garux 58eb6e61d2 simplify RENDER_TEXT logic
class RenderTextLabel for text rendering
* consider texture alpha channel during rendering of shaders with qer_trans
2019-04-23 11:31:52 +03:00
Garux 4bc399fe56 optimize RenderableCamWorkzone 2019-04-17 13:57:59 +03:00
Garux 645d33be37 * special mWheel scrolling mode during orbiting in camera (alt + m2) 2019-03-14 21:10:02 +03:00
Garux 2dd78b7b97 fix use after free in RenderableCamWorkzone
somehow it was grabbed by ogl too late here, if sizing info wasn't rendering
2019-02-23 00:01:12 +03:00
Garux 07d3008b96 calm down fall through warnings 2019-02-22 23:50:10 +03:00
Garux 2a3ca3a44f binds... * alt + m2 in camera: orbit around clicked point 2018-10-07 02:20:29 +03:00
Garux cf885ea4ea use OpenGLRenderable to draw camera workzone for proper sorting and smoother states management 2018-09-25 20:50:04 +03:00
Garux 2d35f656f9 * represent grid by 3d camera workzone 2018-09-24 20:35:57 +03:00
Garux 1f4143ece2 * render size info in 3d camera 2018-08-28 16:06:47 +03:00
Garux 82ff22882d * render workzone in 3d camera 2018-08-20 23:33:33 +03:00
Garux 5c48131eba * rectangular selector gestures, enabling select, deselect and toggle behaviors 2018-07-23 16:25:32 +03:00
Garux aff5c8093e * up/down floor walker: examine all types of scene nodes (was brushes only)
consider only top/down and selected instances (was whole scene)
				fix jam at close coords
				also jump to bottommost coord of considered objects
2018-06-08 21:05:47 +03:00
Garux 6f8a0668a3 add and use VolumeTest/View.getViewDir() 2018-05-18 01:55:20 +03:00
Garux 10c2b9bbd2 * check move amount (56 pixels) in M2 toggle freelook or keep strafemode condition to allow fast strafe moves 2018-04-26 19:23:35 +03:00
Garux 460df292ff * preferences->Camera->Time to Max Speed slider (camera key moves acceleration) 2018-04-21 02:17:52 +03:00
Garux 600963629c * preferences->Camera->Scroll Move Speed slider
* change freelook move speed units to game units; expand range; simplify
	* print speed values on change by CameraSpeedDec/CameraSpeedInc commands to console
2018-04-21 01:13:08 +03:00
Garux 065505b71b * remove hack, making freelook move speed fps dependent and harsh move start 2018-04-20 23:17:23 +03:00
Garux a3201f1954 * camera strafe: m1 one is disableable by mode 'none'
do not block strafe by pressed shift in up/forward modes
			enable forward strafe with only shift pressed in 'both' modes (no ctrl is required)
2018-04-20 16:38:20 +03:00
Garux 0cae576d5e * preferences->Camera->Strafe Speed slider 2018-04-20 13:59:49 +03:00
Garux 446ab50511 really support mouse_moved_epsilon system in camera freelook
use FreezePointer chain for freelook selections/manipulaions instead of extra gtk motion handler (fixes one step latency in window observer aswell)
2018-04-17 14:26:49 +03:00
Garux 93aef246ea * support mouse_moved_epsilon system in camera freelook + refactor RadiantWindowObserver 2018-04-14 23:12:53 +03:00