<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>OpenGL &#8211; Virtually Fun</title>
	<atom:link href="https://virtuallyfun.com/category/opengl/feed/" rel="self" type="application/rss+xml" />
	<link>https://virtuallyfun.com</link>
	<description>Fun with Virtualization</description>
	<lastBuildDate>Fri, 17 Jan 2025 21:30:21 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0</generator>
	<item>
		<title>WSLg aka the killer feature of Windows 11</title>
		<link>https://virtuallyfun.com/2021/10/07/wslg-aka-the-killer-feature-of-windows-11/</link>
					<comments>https://virtuallyfun.com/2021/10/07/wslg-aka-the-killer-feature-of-windows-11/#comments</comments>
		
		<dc:creator><![CDATA[neozeed]]></dc:creator>
		<pubDate>Thu, 07 Oct 2021 00:51:12 +0000</pubDate>
				<category><![CDATA[OpenGL]]></category>
		<category><![CDATA[Windows 11]]></category>
		<category><![CDATA[WSL]]></category>
		<guid isPermaLink="false">https://virtuallyfun.com/wordpress/?p=11420</guid>

					<description><![CDATA[One of the great things about Windows 11 was the inclusion of the Windows Subsystem for Linux or WSL. It wasn&#8217;t available at launch but it started with v1 a simple ELF loader and an implementation of the Linux kernel &#8230; <a href="https://virtuallyfun.com/2021/10/07/wslg-aka-the-killer-feature-of-windows-11/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">One of the great things about Windows 11 was the inclusion of the Windows Subsystem for Linux or WSL.  It wasn&#8217;t available at launch but it started with v1 a simple ELF loader and an implementation of the Linux kernel on the NTOS kernel.  Being a re-implementation of Linux it was great for what did work, however many things did not.  Compared to other Unix subsystems for NT over the years however WSLv1 was the best no question.</p>



<p class="wp-block-paragraph">Not being enough however, Microsoft took a page out of the old WinOS/2 days and stubbed a Linux kernel to run under Hyper-V, allowing it to run far more applications, and for me giving the ability to use applications that alter memory space, and allowing i386/x32 applications to run.  You could happily export your X-11 display to a Windows based X server, and get applications that way.  But this isn&#8217;t 1993 so it was very limiting.</p>



<p class="wp-block-paragraph">Enter WSLg</p>



<div class="wp-block-image"><figure class="aligncenter size-large"><a href="https://virtuallyfun.com/wp-content/uploads/2021/10/WSLg-diagram.png"><img fetchpriority="high" decoding="async" width="1024" height="583" src="https://virtuallyfun.com/wp-content/uploads/2021/10/WSLg-diagram-1024x583.png" alt="" class="wp-image-11421" srcset="https://virtuallyfun.com/wp-content/uploads/2021/10/WSLg-diagram-1024x583.png 1024w, https://virtuallyfun.com/wp-content/uploads/2021/10/WSLg-diagram-300x171.png 300w, https://virtuallyfun.com/wp-content/uploads/2021/10/WSLg-diagram-768x438.png 768w, https://virtuallyfun.com/wp-content/uploads/2021/10/WSLg-diagram-500x285.png 500w, https://virtuallyfun.com/wp-content/uploads/2021/10/WSLg-diagram.png 1362w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></figure></div>



<p class="wp-block-paragraph">The big change is the ability to use RDP to hook both Wayland and Pulse Audio bringing Linux &#8216;desktop&#8217; X11 applications to the Windows desktop.  Also added in is virtual GPU capabilities allowing accelerated 3D, along with CUDA applications to run (although with a performance penalty.</p>



<p class="wp-block-paragraph">The downshot for me, is that my existing Debian 10 install was not picking this up, and was somehow picking up a VMware</p>



<div class="wp-block-image"><figure class="aligncenter size-full"><a href="https://virtuallyfun.com/wp-content/uploads/2021/10/vmware-graphics-1.png"><img decoding="async" width="436" height="418" src="https://virtuallyfun.com/wp-content/uploads/2021/10/vmware-graphics-1.png" alt="" class="wp-image-11422" srcset="https://virtuallyfun.com/wp-content/uploads/2021/10/vmware-graphics-1.png 436w, https://virtuallyfun.com/wp-content/uploads/2021/10/vmware-graphics-1-300x288.png 300w, https://virtuallyfun.com/wp-content/uploads/2021/10/vmware-graphics-1-313x300.png 313w" sizes="(max-width: 436px) 100vw, 436px" /></a><figcaption>VMware llvmpipe</figcaption></figure></div>



<p class="wp-block-paragraph">I have no idea how or why it was picking this up.  While I did have the VMware Player installed, the newer versions backend through Hyper-V.</p>



<p class="wp-block-paragraph">I did find <a rel="noreferrer noopener" href="https://devblogs.microsoft.com/commandline/wslg-architecture/" target="_blank">this article</a>, which gave me a path to get where I wanted, although the transition of an existing v2 instance didn&#8217;t work for me.  Maybe Debian 10 is too weird. I don&#8217;t know.</p>



<p class="wp-block-paragraph">Not sure where how to proceed I backed up my home directory and un-installed VMware Player and purged my existing Debian 10. I installed thatÂ <a href="https://ubuntu.com/blog/announcing-ubuntu-on-windows-community-preview-wsl-2">Ubuntu Community Preview</a> which promises to include all the new and exciting features.</p>



<pre class="wp-block-preformatted">$ glxinfo -B
name of display: :0
display: :0  screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: Microsoft Corporation (0xffffffff)
    Device: D3D12 (NVIDIA GeForce RTX 2070) (0xffffffff)
    Version: 21.0.3
    Accelerated: yes
    Video memory: 40710MB
    Unified memory: no
    Preferred profile: core (0x1)
    Max core profile version: 3.3
    Max compat profile version: 3.1
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.0
OpenGL vendor string: Microsoft Corporation
OpenGL renderer string: D3D12 (NVIDIA GeForce RTX 2070)
OpenGL core profile version string: 3.3 (Core Profile) Mesa 21.0.3
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 3.1 Mesa 21.0.3
OpenGL shading language version string: 1.40
OpenGL context flags: (none)

OpenGL ES profile version string: OpenGL ES 3.0 Mesa 21.0.3
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.00</pre>



<p class="wp-block-paragraph">Now this is looking MUCH better.</p>



<div class="wp-block-image"><figure class="aligncenter size-large"><a href="https://virtuallyfun.com/wp-content/uploads/2021/10/furmark-on-wslg.jpg"><img decoding="async" width="1024" height="672" src="https://virtuallyfun.com/wp-content/uploads/2021/10/furmark-on-wslg-1024x672.jpg" alt="" class="wp-image-11423" srcset="https://virtuallyfun.com/wp-content/uploads/2021/10/furmark-on-wslg-1024x672.jpg 1024w, https://virtuallyfun.com/wp-content/uploads/2021/10/furmark-on-wslg-300x197.jpg 300w, https://virtuallyfun.com/wp-content/uploads/2021/10/furmark-on-wslg-768x504.jpg 768w, https://virtuallyfun.com/wp-content/uploads/2021/10/furmark-on-wslg-457x300.jpg 457w, https://virtuallyfun.com/wp-content/uploads/2021/10/furmark-on-wslg.jpg 1051w" sizes="(max-width: 1024px) 100vw, 1024px" /></a><figcaption>224FPS! FurMark</figcaption></figure></div>



<p class="wp-block-paragraph">Now compare this to a native version of FuMark:</p>



<div class="wp-block-image"><figure class="aligncenter size-large"><a href="https://virtuallyfun.com/wp-content/uploads/2021/10/furmark-on-windows-11.jpg"><img loading="lazy" decoding="async" width="1024" height="671" src="https://virtuallyfun.com/wp-content/uploads/2021/10/furmark-on-windows-11-1024x671.jpg" alt="" class="wp-image-11424" srcset="https://virtuallyfun.com/wp-content/uploads/2021/10/furmark-on-windows-11-1024x671.jpg 1024w, https://virtuallyfun.com/wp-content/uploads/2021/10/furmark-on-windows-11-300x196.jpg 300w, https://virtuallyfun.com/wp-content/uploads/2021/10/furmark-on-windows-11-768x503.jpg 768w, https://virtuallyfun.com/wp-content/uploads/2021/10/furmark-on-windows-11-458x300.jpg 458w, https://virtuallyfun.com/wp-content/uploads/2021/10/furmark-on-windows-11.jpg 1026w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a><figcaption>500 FPS</figcaption></figure></div>



<p class="wp-block-paragraph">So it&#8217;s a 50% haircut.  Ouch.</p>



<p class="wp-block-paragraph">Gaming however using steam (yes steam runs!) reveals some other deeper issues.  The mouse tracking is WAY off.  So for FPS stuff you&#8217;ll spend a lot of time staring at the ceiling or the floors.  The next issue is there is no mouselock, so things that rely on being able to move the mouse far beyond a screen length is impossible to play.  To be fair it&#8217;s a preview, and so far I have to admit Windows 11 feels more like a technical preview.  Also I don&#8217;t know what the deal is or anything about profiling it but <a href="https://store.steampowered.com/app/208580/STAR_WARS_Knights_of_the_Old_Republic_II__The_Sith_Lords/" target="_blank" rel="noreferrer noopener">KOTOR2</a> is insanely slow.  Although at least with 3d acceleration running it&#8217;s not 1 frame every 5 seconds.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://virtuallyfun.com/2021/10/07/wslg-aka-the-killer-feature-of-windows-11/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>Ssystem 1.6</title>
		<link>https://virtuallyfun.com/2016/08/25/ssystem-1-6/</link>
					<comments>https://virtuallyfun.com/2016/08/25/ssystem-1-6/#comments</comments>
		
		<dc:creator><![CDATA[neozeed]]></dc:creator>
		<pubDate>Thu, 25 Aug 2016 05:05:11 +0000</pubDate>
				<category><![CDATA[NASA]]></category>
		<category><![CDATA[OpenGL]]></category>
		<category><![CDATA[space probe data]]></category>
		<category><![CDATA[Visual C++]]></category>
		<category><![CDATA[Win32]]></category>
		<category><![CDATA[Windows NT 3.5]]></category>
		<guid isPermaLink="false">https://virtuallyfun.com/?p=6359</guid>

					<description><![CDATA[With all the talk of a possible &#8216;rocky&#8217; earth like planet making the news, I thought it would be fun to seek out a really ancient (ha!) OpenGL program that did a basic simulation of our solar system.  I am &#8230; <a href="https://virtuallyfun.com/2016/08/25/ssystem-1-6/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p><a href="https://virtuallyfun.com/wp-content/uploads/2016/08/ssystem-logo.jpg"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-6362" src="https://virtuallyfun.com/wp-content/uploads/2016/08/ssystem-logo.jpg" alt="ssystem logo" width="424" height="132" /></a></p>
<p>With all the talk of <a href="http://www.nasa.gov/ames/kepler/nasas-kepler-discovers-first-earth-size-planet-in-the-habitable-zone-of-another-star">a possible &#8216;rocky&#8217; earth like planet</a> making the news, I thought it would be fun to seek out a really ancient (ha!) OpenGL program that did a basic simulation of our solar system.  I am of course talking about ssytem.</p>
<p>Back in the late 90&#8217;s I have to admit that this was pretty incredible to look at!  Although it was using OpenGL in software only, and to be honest the best and more stable way to use ssystem was on Windows of all things.</p>
<p>Microsoft had a deal with SGI around the 1993 timeline, and after the release of Windows NT 3.1 they were able to work out a deal to bring Windows NT to the SGI MIPS computers platform in exchange from OpenGL being made available on Windows NT.  SGI couldn&#8217;t see a way to monetize NT on their hardware and the port never actually shipped, evidence of it however is present in the leaked Windows NT 4.0 source code.  However OpenGL would prove very import for Microsoft as workstation style graphics could now run on &#8216;prosumer&#8217; grade OS Windows NT 3.5, and eventually there was even a runtime for Windows 95!</p>
<p>All the old websites, and archives of ssystem have been wiped out, however I did find a copy of the source code for version 1.6 on a HPUX site of all places.</p>
<p><a href="ftp://hpux.connect.org.uk/hpux/Physics/ssystem-1.6/ssystem-1.6-src-11.00.tar.gz">ssystem-1.6-src-11.00.tar.gz</a></p>
<p>With a filename tracked down, I was able to locate in archvie.org a partial backup of the main site here: <a href="https://web.archive.org/web/20000506002305/http://www1.las.es/~amil/ssystem/english.html">http://www1.las.es/~amil/ssystem/english.html</a></p>
<p>So I thought I could start there.  Ssystem needs the GLUT toolkit and I found a &#8216;pre-configured&#8217; version 3.7 that Microsoft Visual C++ 6.0 can build on the <a href="https://www.opengl.org/resources/libraries/glut/glut37.zip">command line here</a>. Naturally with all the textures, it does rely on the IJG JPEG library (libjpeg) and <a href="http://www.ijg.org/files/jpegsr6b.zip">I used version 6b</a> as ssystem itself dates from 1999.</p>
<p>There was a bit of work to be done with the source code, as I had to massage it to compile with Visual C++, lots of missing headers, and there were some collisions in the lex for parsing the config file, but they were trivial to clean up.  After a bit of going back and forth with a seemingly defective pre-built version of GLUT, re-building it myself got it to link a working executable:</p>
<div id="attachment_6363" style="width: 1690px" class="wp-caption aligncenter"><a href="https://virtuallyfun.com/wp-content/uploads/2016/08/ssystem-16-europa-orbit.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6363" class="size-full wp-image-6363" src="https://virtuallyfun.com/wp-content/uploads/2016/08/ssystem-16-europa-orbit.png" alt="ssystem in orbit around Europa." width="1680" height="1010" /></a><p id="caption-attachment-6363" class="wp-caption-text">ssystem in orbit around Europa.</p></div>
<p>Of course, in this day &amp; age, any machine these days has hardware OpenGL acceleration so it is pretty trivial to run this program.</p>
<p>The artifacts in the picture were common at the time, and it&#8217;s how I remember it all those years ago so I&#8217;m not to worried about it.</p>
<p style="padding-left: 30px;">I tried to compile with Visual C++ 4.0 however when trying to link I got this error:</p>
<p style="padding-left: 30px;">Microsoft (R) 32-Bit Incremental Linker Version 3.00.5270<br />Copyright (C) Microsoft Corp 1992-1995. All rights reserved.</p>
<p style="padding-left: 30px;">init.obj : error LNK2001: unresolved external symbol _glBindTexture<br />ssystem.obj : error LNK2001: unresolved external symbol _glBindTexture<br />stars.obj : error LNK2001: unresolved external symbol _glBindTexture<br />init.obj : error LNK2001: unresolved external symbol _glGenTextures<br />astrolib.exe : fatal error LNK1120: 2 unresolved externals<br />NMAKE : fatal error U1077: &#8216;link&#8217; : return code &#8216;0x19&#8217;<br />Stop.</p>
<p>I&#8217;m not sure why, as I re-compiled with Visual C++ 6.0 and I get a working executable.  More bizarre if I try to link the objects that were compiled with Visual C++ 4.0 with Visual C++ 6.0 it also fails in the same way.</p>
<p>I&#8217;ve placed in everything I could find into this archive: <a href="http://vpsland.superglobalmegacorp.com/install/WindowsNT4.0-i386/games/ssystem-1.6.7z">ssystem-1.6.7z</a> including a pre-compiled version, and the high resolution images.  Along the way I also did find a backup of the site <a href="https://web.archive.org/web/20010127031100/http://www.wam.umd.edu/~kamelkev/Ssystem">http://www.wam.umd.edu/~kamelkev/Ssystem</a> which actually has a much smaller download of ssystem 1.6 as <a href="https://web.archive.org/web/20010605110647/http://www.wam.umd.edu/~kamelkev/Ssystem/ssystem-1.6.zip">ssystem-1.6.zip</a>  You may need to play with ssystem.conf to get a more respectable display.  I have also tweeked it to work find on my machine, using the highest values I could get away with, without running over the 2GB per process limit on 32bit processes.<a href="https://virtuallyfun.com/wp-content/uploads/2016/08/SetiHomeBanner-1.gif"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-9418" src="https://virtuallyfun.com/wp-content/uploads/2016/08/SetiHomeBanner-1.gif" alt="" width="468" height="60" /></a></p>
<p><a href="https://virtuallyfun.com/wp-content/uploads/2016/08/SetiHomeBanner.gif"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-6360" src="https://virtuallyfun.com/wp-content/uploads/2016/08/SetiHomeBanner.gif" alt="SetiHomeBanner" width="468" height="60" /></a></p>

<div class="wp-block-image">
<figure class="aligncenter"><img loading="lazy" decoding="async" width="468" height="60" src="https://virtuallyfun.com/wp-content/uploads/2016/08/SetiHomeBanner-1.gif" alt="" class="wp-image-9418"/></figure>
</div>


<p class="wp-block-paragraph">

Let&#8217;s also not forget the SETI crazy of the 1990&#8217;s.

</p>
]]></content:encoded>
					
					<wfw:commentRss>https://virtuallyfun.com/2016/08/25/ssystem-1-6/feed/</wfw:commentRss>
			<slash:comments>7</slash:comments>
		
		
			</item>
	</channel>
</rss>
