From 5d6e8a367c03644740187e500c6de5d3ac039d5e Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Wed, 20 Sep 2023 19:51:55 +0200 Subject: Bug 1452 - Decouple math functionality to 'com.jogamp.math' to be toolkit agnostic (PMVMatrix, Matrix4f, Vec4f, ..) Math functionality (PMVMatrix, Matrix4f, Vec4f, ..) - shall be used toolkit agnostic, e.g. independent from OpenGL - shall be reused within our upcoming Vulkan implementation - may also move outside of JOGL, i.e. GlueGen or within its own package to be reused for other purposed. The 'com.jogamp.opengl.util.PMVMatrix' currently also used to feed in GLUniformData via the toolkit agnostic SyncAction and SyncBuffer shall also be split to a toolkit agnostic variant. An OpenGL PMVMatrix specialization implementing GLMatrixFunc can still exist, being derived from the toolkit agnostic base implementation. +++ Initial commit .. compile clean, passing most unit tests. --- src/jogl/classes/jogamp/opengl/util/stereo/GenericStereoDevice.java | 4 ++-- .../jogamp/opengl/util/stereo/GenericStereoDeviceRenderer.java | 2 +- src/jogl/classes/jogamp/opengl/util/stereo/ScaleAndOffset2D.java | 5 ++--- 3 files changed, 5 insertions(+), 6 deletions(-) (limited to 'src/jogl/classes/jogamp/opengl/util/stereo') diff --git a/src/jogl/classes/jogamp/opengl/util/stereo/GenericStereoDevice.java b/src/jogl/classes/jogamp/opengl/util/stereo/GenericStereoDevice.java index 60adc7d74..89765e4f6 100644 --- a/src/jogl/classes/jogamp/opengl/util/stereo/GenericStereoDevice.java +++ b/src/jogl/classes/jogamp/opengl/util/stereo/GenericStereoDevice.java @@ -27,14 +27,14 @@ */ package jogamp.opengl.util.stereo; +import com.jogamp.math.FovHVHalves; +import com.jogamp.math.Vec3f; import com.jogamp.nativewindow.util.Dimension; import com.jogamp.nativewindow.util.DimensionImmutable; import com.jogamp.nativewindow.util.Point; import com.jogamp.nativewindow.util.PointImmutable; import com.jogamp.nativewindow.util.Rectangle; import com.jogamp.nativewindow.util.RectangleImmutable; -import com.jogamp.opengl.math.FovHVHalves; -import com.jogamp.opengl.math.Vec3f; import com.jogamp.opengl.util.stereo.StereoDeviceConfig; import com.jogamp.opengl.util.stereo.EyeParameter; import com.jogamp.opengl.util.stereo.LocationSensorParameter; diff --git a/src/jogl/classes/jogamp/opengl/util/stereo/GenericStereoDeviceRenderer.java b/src/jogl/classes/jogamp/opengl/util/stereo/GenericStereoDeviceRenderer.java index 3c6f5e37e..3a3ead790 100644 --- a/src/jogl/classes/jogamp/opengl/util/stereo/GenericStereoDeviceRenderer.java +++ b/src/jogl/classes/jogamp/opengl/util/stereo/GenericStereoDeviceRenderer.java @@ -44,8 +44,8 @@ import jogamp.common.os.PlatformPropsImpl; import com.jogamp.common.nio.Buffers; import com.jogamp.common.os.Platform; +import com.jogamp.math.Vec3f; import com.jogamp.opengl.JoglVersion; -import com.jogamp.opengl.math.Vec3f; import com.jogamp.opengl.util.GLArrayDataServer; import com.jogamp.opengl.util.glsl.ShaderCode; import com.jogamp.opengl.util.glsl.ShaderProgram; diff --git a/src/jogl/classes/jogamp/opengl/util/stereo/ScaleAndOffset2D.java b/src/jogl/classes/jogamp/opengl/util/stereo/ScaleAndOffset2D.java index 1fed69363..f7a5a5e9b 100644 --- a/src/jogl/classes/jogamp/opengl/util/stereo/ScaleAndOffset2D.java +++ b/src/jogl/classes/jogamp/opengl/util/stereo/ScaleAndOffset2D.java @@ -27,12 +27,11 @@ */ package jogamp.opengl.util.stereo; +import com.jogamp.math.FovHVHalves; +import com.jogamp.math.VectorUtil; import com.jogamp.nativewindow.util.DimensionImmutable; import com.jogamp.nativewindow.util.RectangleImmutable; -import com.jogamp.opengl.math.FovHVHalves; -import com.jogamp.opengl.math.VectorUtil; - /** * 2D scale and offset NDC class, * providing conversion from {@link FovHVHalves} in tangent to NDC space. -- cgit v1.2.3