LWJGL Tutorials 1_1 crash

I downloaded the example code that ra4king wrote to accompany McKesson’s “Learning Modern 3D Graphics Programming” (as well as various other tutorials).

I just wanted to try running Example1_1 (have only scanned “Hello Triangle” chapter so far–am finding it a little scary), but found I got the following error:

java.lang.IllegalStateException: Function is not supported
	at org.lwjgl.BufferChecks.checkFunctionAddress(BufferChecks.java:58)
	at org.lwjgl.opengl.GL20.glCreateShader(GL20.java:221)

The problem seems to be that the following line is returning a 0 to function_pointer:

		ContextCapabilities caps = GLContext.getCapabilities();
		long function_pointer = caps.glCreateShader;
		BufferChecks.checkFunctionAddress(function_pointer);

I’m wondering if this is signalling a problem with my hardware. Here’s some more info I dug up:

when directly checking the DirectX diagnostic tool, I get this:
DirectX version is 9.C, which supposedly corresponds to Shader Model 3.0

But when the original graphics card crashed about a year ago, I replaced it with a cheapo to just get by. Stats on the configuration can be seen in the following:

http://hexara.com/Images/graphicsSettings.JPG

This is all new to me. Is the problem simply the graphics card? Or is there something awry with my configuration and code perhaps? I’ve been able to get the “basic” LWJGL tutorial programs running, but this is the first program that attempts to use the shaders.

Well your drivers are from 2006 and the 7000 series is legacy at this point so I’m not sure that your card actually supports OpenGL 2.0. According to this forum hardware supported OpenGL 2.0 started in the 9000 series.

Thank you!

I will look into replacing the current card with one that at the least supports OpenGL 2.1.

You need a card running at least OpenGL 3.3 to run the tutorials, by the way. With a bit of Googling, the earliest card by Nvidia that supports GL 3.3 is the GeForce 9400 GT. However, I am selling my Geforce GTX 580 for $200 if you want it :smiley:

To run Example1_1 in 2.1, you will need a bit of modification to the code, especially the shaders.

Figuring out these models and capabilities and even the order in which they were made is no mean feat. But fortunately I found this wikipedia site:

So perhaps GeForce 8000’s are also OpenGL 3.3.
And your GTX 580 would be OpenGL 4.4.

I also found this chart from about a year ago!
http://www.java-gaming.org/topics/new-project-so-early-in-development-i-have-no-name-for-it/28032/msg/255212/view.html#msg255212

It shows a breakdown of the graphics cards owned by MineCraft users, from sometime before December. Looks like a lot of people are still using cards with only OpenGL 2.1 capabilities.

There’s a local shop with an okay price for a GT430 W1G DVI/HDMI. The chart says this runs OpenGL 4.4. Is it still possible to write code that will run on a 4.4 OpenGL AND will run on all those “casual market” machines out there that can only handle 2.1? (Backwards compatible?) The game I’m trying to finish is a 2D game, and I was just hoping to pick up some processing help from OpenGL, not do anything too fancy.

Seems like a nice price on the GTX 580, ra4king. This wikipedia chart says they were $499 when they were first released. I’m on a bit of a budget, though. :frowning:

Yes, it’s possible. You can target your code for only GL 2.1 and the GL 4.4 cards will support it as OpenGL is fully backwards compatible.

And how tight of a budget are you on? I’ll find you a good card.

Thanks ra4king. You have been really helpful, as always!

I think I have all the info I need to work with my local dealer. I’ve put in cards before–know it’s not that big a deal. But I like working with him as his shop will do all the installation and provides a warranty, and he has always been helpful and patient with my questions, as well as provide fair prices.

Can probably take care of this all today. (Impatient! Excited!)

Alrighty good luck and have fun! :slight_smile:

Hope it works out, and have fun with your new card ;D I always love getting new parts for my rig, so exciting.

Thanks for good wishes! :slight_smile:

Unfortunately, we had troubles at the shop, with the inexpensive GeForce units with OpenGL 4.2 not working, and the highest OpenGL that DID work with my motherboard was 3.2. :frowning:

After some thought and discussion, I think the thing to do is put off the upgrade and just aim to get a whole new computer. This one is from 2004, and it’s probably just not worth trying to extend its life much further.

Meanwhile, I wanted to keep Hexara targeted for “casual users” (no more than OpenGL 2.1), and I can do that with the current board. (Patience. And a chance to digest the basics in the “Red Book” before getting to the advanced stuff.)

The shop I like to work with is currently selling an ASUS at a good price (they list as: P8H61-M LX2) with an integrated graphics card. I like ASUS in general, but am having trouble figuring out what level of OpenGL this model supports. (Probably ASUS should have sales staff online that can answer.)

No rush to figure it out–probably won’t get to buying a new computer for at least few months anyway. Maybe aim for Christmas! :slight_smile:

If you can get OpenGL 3.2 working, then that’s excellent. Most of the tutorials only need up to that. I have ported the first 4 tutorials to GL 3.2, but if you need the rest, I’ll be happy to do so!