Open in Windows

BlitzMax Forums/OpenGL Module/Open in Windows

Tricky(Posted 2009) [#1]
I've been thinking to do a project in which I might need 3D (there are ways to get around it, but 3D can be the best option, not yet decided, though). The only 3D module I got now at my disposal appears to be MiniB3D.

The demos I've seen with it are awesome, so that is surely not my problem. My problem is that it only supports OpenGL.

I've tried to make a few programs that access OpenGL. In MacOS no problem (as was to be expected), in Windows I never got anything working with OpenGL. Neither in XP nor Vista. Since if I am ever gonna release the project Windows is the biggest "market" (as far as you can speak of a "market" in a Freeware project) this does make me hesitate in using MiniB3D. (I'm only reconsidering it since Max3D is still not released, I don't wanna whine, but how much longer will that take? If it's anytime soon, I don't even need to ask about GL in Windows)

The reason why I ask it here (and not in the MiniB3D forum), is because this is something that handles mainly on OpenGL.

I've been on the OpenGL site many many times to see if there's a way to get it to work in Windows, but not one single strand of information came by.

This may be my last form of research in getting OpenGL to work in Windows. If I still can't get it done (and therefore also not properly document how to get my stuff working in OpenGL), there's nothing more to do for but to forget that MiniB3D even exists.


Oh, if you wanna know what happens when I run my programs using OpenGL. It just crashes as soon as the "Graphics" command is called. Sometimes I see with a little luck the Graphics screen appear, only to crash immediately afterwards. I am absolutely certain it's the call to OpenGL. Since when I use DX it works and on MacOS the same source just works in GL.


Bremer(Posted 2009) [#2]
What version of windows are you running? What sort of graphics card do you have, and what are the version of the drivers for it?

These are fairly imporatant information if anyone is going to be able to provide answers.

I have never had any OpenGL fail on me, and I use both WinXP and WinVista32bit. I use Nvidia cards and always latest drivers.

But try and provide us with more information, perhaps some code that works for you on the MacOS and crashes on the Windows so that we can try it out and see if we get the same problems.


Tricky(Posted 2009) [#3]
I cannot provide my project code (way to large to put on a forum anyway), but a simple code like this will already do the crash.

Framework BRL.GLMax2D

SetGraphicsDriver GLMax2DDriver()

Graphics 640,480

Waitkey



I know this kind of code does not even do any rendering, but it already crashes on me. Mostly the "Waitkey" is not even executed.

Sometimes when it does execute anything after the graphics command it'll crash as soon as I use the first DrawImage command or anything else that's used to produce any graphics.


When it comes to Windows, I'll look up the info as soon as I can, but my own Windows PC is broken, so I always use somebody else's PC to test the Windows Builds of my stuff. So I'll have to see if I can provide full information as soon as I have that machine at my disposal again.

I'm currently in the purchase of a new Mac for which I'm intending either a triple boot or to make virtual machine with Windows (and Linux). As soon as I got that machine in my possession I can check if the same problems are produced there with OpenGL in windows.

If you want you could download the game Erika E. Eppeley on http://go.to/erika

It's a nice platformer, but the reason why I put on that download is because the Windows Build will ask the player if he wants to use DirectX or OpenGL. If your projects always works in OpenGL and that game doesn't then it could be me who's doing something wrong (though I wonder what, if it doesn't work, I'll see if I can provide the code of that part to see what I did wrong), if it works in OpenGL, then I suppose it's clear it's Windows reacting allergic to OpenGL on the machine I had at my disposal.


Bremer(Posted 2009) [#4]
Your code snippet works fine on my Vista32bit computer, and so does your game, no problems at all.


Tricky(Posted 2009) [#5]
I see, then it's confirmed to me that it's the OpenGL Windows combo I cannot seem to get working on the machines I have. The day after tomorrow I may be able to dig out some info of the Windows machine I had at my disposal. I suppose it might clear up some points.

What is the fastest way to get that data onto the screen? (Since I doubt the owner of the Vista PC I can use actually knows which stuff in his machine, and I'm more into MacOS X than Windows these days).

I'll also try to get some data of my old XP machine, but that thing is broken now, and doesn't run any Max2D app at all, regardless if it uses DirectX or OpenGL. Some driver issues I cannot seem to get fixed. But before that issue came up, it never ran anything using OpenGL.


nawi(Posted 2009) [#6]
'(Since I doubt the owner of the Vista PC I can use actually knows which stuff in his machine'
This doesn't make sense either grammatically nor logically. What are you talking about?

'What is the fastest way to get that data onto the screen?'
Which data?


SLotman(Posted 2009) [#7]
OpenGL should work on windows "out of the box". Unless you have some corrupted files/libraries on your computer - or broken video drivers, everything should work.

So: Try installing latest drivers for your video card. If that doesn't fix it, then try a repair installation of XP or Vista.

If you're still having problems, check your computer: test the HD, the RAM... and even for spywares or virus.


Tricky(Posted 2009) [#8]
@nawi
The (graphics) hardware/drivers of that machine of course. If you read the entire tread thoroughly that was pretty obvious, since that was the data I was requested to give from the second post in this thread.
I really gotta repeat everything people say here, don't I?

@SLotman
I wonder. The Windows Vista PC I tried this on did refuse to run anything in OpenGL right after the owner reformatted the HD entirely and reinstalled Windows Vista (also before that), which makes me doubt that damaged files/libraries are the cause of the evil here. For the same reason I deem virusses also unlikely, but since that computer is not mine, I really don't know what kind of protection software is installed on it.
Since the PC isn't mine I also cannot just install new drivers on it.

I will also try this code by nawi on that Vista PC
If GL_VERSION_1_1
	If GL_VERSION_1_2
		If GL_VERSION_1_3
			If GL_VERSION_1_4
				If GL_VERSION_1_5
					If GL_VERSION_2_0
						Print "GL 2.0"
					Else
						Print "GL 1.5"
					EndIf
				Else
					Print "GL 1.4"
				EndIf
			Else
				Print "GL 1.3"
			EndIf
		Else
			Print "GL 1.2"
		EndIf
	Else
		Print "GL 1.1"
	EndIf
Else
	Print "GL ?.?"
EndIf

I'll see if that does provide me some info, but I expect it to output GL ?.? (same as I got on my Mac BTW). I really wonder if there's no easier (and more accurate) way to check the GL version though (since my data on MacOS states I got OpenGL 1.4 installed so that output doesn't appear quite correct on my Mac either).


Let's sum up what's all asked to me now:
- Windows Version
- Graphics hardware + drivers (where can I look that data up?)

Is there also a way to determine the OpenGL version in Vista?

Perhaps we can get a little closer to "fixing" the problem that way.


joncom2000(Posted 2009) [#9]
You were asked what Gpahics Card and Driver you had on the windows PC in the second post, you still havent answered that question, which makes it difficult for anyone to help you.

You need to find out what make and model the graphics card is, such as nvidia geforce 8500 or ati radeon x1600, it could be you have even an onboard graphics chipset which might not have opengl drivers installed. If the machine has never had a new driver install then out of the box vista didnt support opengl properly and would crash trying to open a screen.


Tricky(Posted 2009) [#10]
You were asked what Gpahics Card and Driver you had on the windows PC in the second post, you still havent answered that question, which makes it difficult for anyone to help you.

I know.
I can't answer since I don't know where to look up that data (as I said before).


You need to find out what make and model the graphics card is, such as nvidia geforce 8500 or ati radeon x1600, it could be you have even an onboard graphics chipset which might not have opengl drivers installed. If the machine has never had a new driver install then out of the box vista didnt support opengl properly and would crash trying to open a screen.


That's what I aim for. On Mac I know the feature "About this Mac" in which I can get all data I want about my Mac, including graphics cards and such. Is there a similar feature in Windows Vista? If so, things will be a lot easier on me. (Windows never ceases to make me search for hours for specific features. MicroSoft logic is not my logic I suppose).
As I said, I doubt the owner of that Windows PC knows the data we need to know to "solve" this problem, so that's why I've been asking if Windows has a feature to put that data on screen (since I probably won't be allowed to open the PC to see for myself).


Tricky(Posted 2009) [#11]
Ah found it:

I had to use the Dutch version of Windows to get this data, but I think you'll understand it nonetheless.
Naam	NVIDIA GeForce 7300 SE (Microsoft Corporation - WDDM)
PNP-apparaat-id	PCI\VEN_10DE&DEV_01D3&SUBSYS_034C1462&REV_A1\4&382AB56F&0&0010
Adaptertype	GeForce 7300 SE, compatibel met NVIDIA
Beschrijving	NVIDIA GeForce 7300 SE (Microsoft Corporation - WDDM)
RAM-geheugen	128,00 MB (134.217.728 bytes)
Geïnstalleerde stuurprogramma's	nvd3dum.dll,nvapi.dll
Versie van stuurprogramma	7.15.10.9686
INF-bestand	nv_lh.inf (nv_NV3x-gedeelte)
Kleurenvlakken	Niet beschikbaar
Vermeldingen in kleurentabel	4294967296
Resolutie	1440 x 900 x 59 Hz
Bits/Pixel	32
Geheugenadres	0xDC000000-0xDEFFFFFF
Geheugenadres	0xC0000000-0xCFFFFFFF
Geheugenadres	0xDD000000-0xDDFFFFFF
IRQ-kanaal	IRQ 24
I/O-poort	0x000003B0-0x000003BB
I/O-poort	0x000003C0-0x000003DF
Geheugenadres	0xA0000-0xBFFFF
Stuurprogramma	c:\windows\system32\drivers\nvlddmkm.sys (7.15.10.9686, 4,22 MB (4.422.560 bytes), 2-11-2006 11:25)


Oh yeah, I tried the game I posted earlier in this thread in OpenGL in Vista and it froze completely. I had to use Ctrl-Alt-Delete to terminate it.



Oh yeah, on the Windows Version I could use:
Naam van besturingssysteem	Microsoft® Windows Vista™ Home Premium
Versie	6.0.6000 Build 6000


Anything useful here to find the problem?


EDIT:

Strangely I also found this:
opengl32	6.0.6000.16386	691,00 kB (707.584 bytes)	2-11-2006 10:04	Microsoft Corporation	c:\windows\system32\opengl32.dll


Does that mean I got OpenGL here?


joncom2000(Posted 2009) [#12]
Stuurprogramma c:\windows\system32\drivers\nvlddmkm.sys (7.15.10.9686, 4,22 MB (4.422.560 bytes), 2-11-2006 11:25)

I am guessing from that line the driver is from 2006, its not been updated and the system is likely not running a driver with decent opengl support. As I mentioned, Vista's default and some early drivers had little to no opengl support.

I suggest downloading a new driver from the nvidia site, it should then be able to use opengl as the nvidia geforce 7300 certainly can do opengl.


Tricky(Posted 2009) [#13]
Stuurprogramma is the "official" Dutch word for driver (though I must say that the only Dutch people using that word are the guys who made the Dutch translation of Windows. Everybody else I know just calls it a driver, even when speaking Dutch).

If I recall correctly NVIDIA is also in the new iMacs which use OpenGL, so it was my guess NVIDIA should support GL. Now I won't be able to use that Windows Machine till Monday, but then I could try this out.
Which site should I download that driver from?


joncom2000(Posted 2009) [#14]
http://www.nvidia.com/Download/index.aspx?lang=en-us

Set the product series to geforce 7 series and ensure the operating system is set to windows vista.

Hopefully once you have downloaded and installed your opengl problems will be gone :)


Tricky(Posted 2009) [#15]
Well, I'll have to wait with that till Monday, since I won't be able to use that machine any sooner. But thanks anyway, I'll get to this as soon as I can (assuming the owner will allow me to install the new drivers).


Tricky(Posted 2009) [#16]
Thank you very much...

At last I could update the driver and now OpenGL works in Vista on me.

That has cleared up all my confusion on this matter!


Bremer(Posted 2009) [#17]
Good to hear that you got it working.