• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

How to make Java OpenGL2 programs work (slowly) on Intel i915GM graphics (and more)

pyf

pyf

Level 32
Joined
Mar 21, 2016
Messages
2,985
The Problem:

Intel i915GM graphics has poor OpenGL compatibility (full hardware support for 1.4 at best).

The Solution:

Use a MESA 3D precompiled dll, since it is OpenGL compatible.

How:

Just copy that dll file into the appropriate folder (depending on your OS):

  • Program Files\Java\jre1.8.0_xx\bin\
  • Program Files (x86)\Java\jre1.8.0_xx\bin\


On my laptop (Pentium M, i915GM, XP SP3 32 bits), the MESA 3D dll 10.0.2-1 from the MSYS2 project works. But for unknown reasons, other, more recent versions, crash on my OS.

Direct link:
http://netcologne.dl.sourceforge.ne...6/mingw-w64-i686-mesa-10.0.2-1-any.pkg.tar.xz


A very close version of that dll can also be found in Stellarium 0.13.3. Stellarium is a free GPL software which renders realistic skies in real time with OpenGL.

Here is where you can find other pre-compiled MESA 3D dlls that have at least OpenGL2 support:
https://sourceforge.net/projects/msys2/files/REPOS/MINGW/
https://sourceforge.net/projects/msys2/files/REPOS/MINGW_GCC_4_9/

From there choose a 32 bit (i686) or a 64 bit (x86_64) file.
Then search for the word "mesa" to find archives to download.

It appears MSYS2 cleans up folders / reinjects files from time to time. So be sure to keep anything interesting on your HDD

Caveat: MESA 3D renders in *software* mode. Although I remember hardware rendering support for 3DFX cards with some builds, but that was a looong time ago.

Therefore this workaround is *not* suitable for any time-critical program. Software rendering is *slow*.

However, it is useful for other kinds of programs. This tutorial was written with Polygon Enhancer 0.01 by oger-lord in mind.

Additional Info:

I do not believe ATI or nVidia graphics users can benefit from using a MESA 3D dll. However, one might want to experiment for debugging/comparing renderings. Or just for the kicks of it. For example, who wants to (try to) play WC3 in glorious MESA 3D software OpenGL mode? In which case, copy the MESA 3D dll in your installed WC3 directory, and launch the game in OpenGL mode. Oh btw, did I previously tell you software OpenGL rendering is *slow*? Oh, yes, I did. :)

If your first try with a 3rd party software OpenGL dll makes your application crash or worse (BSOD), then do not despair and try another version. All software has its particular features / compilation / bugs, triggered by different programs. Save your stuff first, and then experiment. Those who wanted to get the most out of their S3 Virge DX video cards with OpenGL in ye olde days know what I mean. Boy those were the days...

As always, feedback welcome.

Enjoy and experiment.
 

Attachments

  • opengl intel i915GM hwaccel.png
    opengl intel i915GM hwaccel.png
    50.5 KB · Views: 242
  • mesa3D_10021_software.png
    mesa3D_10021_software.png
    53.2 KB · Views: 331
  • mesa3D stellarium 0-13-3.png
    mesa3D stellarium 0-13-3.png
    52.8 KB · Views: 489
Last edited by a moderator:
What do I need when and why?

Most users won't even understand what it's talked about, they just will see some provided graphics software.

You should introduce the topic to why things are related to Warcraft, or Hive-- what will be their benefit.

Some small bb code formatting can make things a lot more readable, like adding small topics, outlining important information with color or size.
 

pyf

pyf

Level 32
Joined
Mar 21, 2016
Messages
2,985
It might better fit the Computer Tech sub-forum, since it deals about a third-party middleware most people do not need. Please feel free to move it there if appropriate.

I wrote this... err... thing, the same month I joined THW. Hence the crude formatting. :hohum:

The MESA 3D dll is useful for those who are stuck with OpenGL 1.x graphic drivers.
The problem is, full OpenGL 2.1 compatibility is achieved by using software rendering only. Therefore, it is slow as hell. But it may be the only workaround available for laptop users with an Intel graphic chipset, like me.

This dll can be used with any software which has OpenGL support.
In this case, the OpenGL32.dll file goes in the software's folder.

Regarding THW, it can be used with @oger-lord's Polygon Enhancer 0.01.
In this case, the OpenGL32.dll file goes in the \bin\ sub-folder where Java is installed.
 

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,192
The MESA 3D dll is useful for those who are stuck with OpenGL 1.x graphic drivers.
And do not care about performance... The entire point of OpenGL is to use special purpose hardware designed for graphic calculations to do all the graphic calculations. Software rasters are useful but kind of defeat the point of that.

The problem is, full OpenGL 2.1 compatibility is achieved by using software rendering only. Therefore, it is slow as hell. But it may be the only workaround available for laptop users with an Intel graphic chipset, like me.
Software implementations have always existed, and are often used as references for hardware implementations to bug check and test feature functionality. D3D offers, or used to offer, an inbuilt software rasterizer for driver development and application testing back around the time of Windows 7. It was so good one could use almost all D3D11 features on a computer without any graphic card installed. This had to be explicitly selected during initialization and most applications did not support using it due to its use being pointless for performance graphics.

One can even use wrapper OpenGL libraries to log OpenGL calls. I did this for WC3 a while ago and found out why lighting bugs out with too many light sources and why WC3 performs very slowly at times.

Java does not natively support OpenGL from what I recall, except for a certain kind of applet. In most cases one has to use third party OpenGL wrapper or a higher level 3D library.
 

pyf

pyf

Level 32
Joined
Mar 21, 2016
Messages
2,985
And do not care about performance...
Some have no choice but to use a software-only implementation of OpenGL, when OpenGL 2.x is required. This is my case with Polygon Enhancer 0.01 on my laptop. Fortunately, there is no need for performance with this software.

Mobiles/Desktops with Intel GPUs supporting full hardware-accelerated OpenGL 2.1 on Windows, shipped only since 2010. It was with Intel's fifth generation of GPUs
List of Intel graphics processing units - Wikipedia

As a general rule, Intel focuses more on DirectX. Which may also be kinda quirky. For example, the GMA 900 GPU series lacks support for hardware TnL (implementation works in software only) :cry:
Intel GMA - Wikipedia

Software implementations have always existed, and are often used as references for hardware implementations to bug check and test feature functionality.
True.

I am wondering whether or not, rendering for 3D animation films is done in software mode, in order to avoid rendering issues due to buggy hardware drivers. This might partly explain why render farms exist...

D3D offers, or used to offer, an inbuilt software rasterizer for driver development and application testing back around the time of Windows 7.
Available at least on XP and below, by using Microsoft's DirectX Control Panel. It is not part of the End-user Runtime btw.

DX7 Control Panel - Direct3D.jpg

Never felt the urge to give this a try...

Java does not natively support OpenGL from what I recall, except for a certain kind of applet. In most cases one has to use third party OpenGL wrapper or a higher level 3D library.
Polygon Enhancer uses LWJGL 3. Due to my non-existent skills at programming, I was unable to make it work with LWJGL 2.


Nowadays, OpenGL 2.x is more and more the baseline. I am unsure Qt 5 supports OpenGL 1.x out of the box (probably not). And a source port like GZDoom now requires OpenGL 2.0 at the very least for its 3D-accelerated rendering mode to work.
 

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,192
I am wondering whether or not, rendering for 3D animation films is done in software mode, in order to avoid rendering issues due to buggy hardware drivers. This might partly explain why render farms exist...
Depends on implementation used.
Nowadays, OpenGL 2.x is more and more the baseline. I am unsure Qt 5 supports OpenGL 1.x out of the box (probably not). And a source port like GZDoom now requires OpenGL 2.0 at the very least for its 3D-accelerated rendering mode to work.
I thought the baseline was becoming OpenGL 4.5 with Vulcan for the really latest applications.
 
Seems really niche, since it is only for OpenGL java programs, and with wc3 they can just use DirectX 9, which this chipset apparently supports. :p

Buuut I'll approve it. It is cool info, and nice to know that there is a workaround (I would've assumed they were SOL). And it is kinda neat to know (altho I agree, it is more of a tech-support tutorial than a wc3 tutorial). Off to misc tutorials!
 

pyf

pyf

Level 32
Joined
Mar 21, 2016
Messages
2,985
The goal was to make PolygonEnhancer 0.01 work on my laptop. It is a Java application which also requires OpenGL 2 in order to run.

To use the MESA 3D dll with programs other than Java ones, one simply has to copy the dll in the folder where the application is installed.
 

pyf

pyf

Level 32
Joined
Mar 21, 2016
Messages
2,985
Also, possibly the last hope to run OpenGL applications which require OpenGL 2.x on a Netbook equipped with an Intel GMA 3150 GPU (because these graphics processors support hardware-accelerated OpenGL 1.4 at best on Windows).

Again, do not forget: OpenGL-based software 3D rendering is **sssslllloooowww**.

@Bribe

Intel GMA - Wikipedia
 

Bribe

Code Moderator
Level 50
Joined
Sep 26, 2009
Messages
9,464
I appreciate the sympathy - My plan is to replace the two super crap laptops I have with a Lenovo Ideapad convertible. They're 150euros on Amazon for 4GB and a quad-core Atom with HD400. It's enough to even play StarCraft II on Low settings, so it'll do more than fine with WC3.

For now, I use World Editor on my Acer, store my map progress on a NAS drive then open them on WC3 on my Mac when I need to test them. It adds about 30 seconds to the testing phase each time I have to switch to the Mac, but it gets the job done for now.
 
Top