Have a couple of questions…I searched the forum and the net but couldnt find any answers, so hopefully someone more knowledgeable than me can give me an answer.
How do you get a computer’s specs using python?(mainly graphics card info) I’m fairly sure it can be done, just not sure how. I would basically like to write a short script which detects if fragment shaders are supported on the user’s computer.
Has anyone figured out a way to make a loading “progress bar” or atleast a simple throbber which would just animate while the game is loading? One of our projects has fairly long loading times(several seconds), so I would atleast like an animated throbber to be overlayed so the player doesnt think his machine has frozen. And no, overlay scene wouldnt work for this…if you simply used an overlay scene, it would freeze while the rest of the game was loaded.
Sorry i don’t know about your first problem.
About the second - you can’t make animated loading screen. GE stucks and loads the file. The only is to make the Level objects dynamic. But this can be useful only in a small game like Blendenzo’s Sokaban. Where the level is dynamicly created. you can add a animated loading screen.
I’m not neccasaraly looking for an internal blender solution for the second problem…If it could be done with blender functions, than that would be great, but if not…no big deal, as long as something can be loaded, doesnt neccasaraly have to be within blender. Anybody have any ideas?
The first problem is the one I’de like answered the most though…second problem really isnt that big of a problem.
To detect which opengl features (shaders and such) are available on a certain computer, you have to use OpenGL functions. BlenderGE already checks for the shader thingyfoo so maybe it sets some variables in the python bindings? dunno… But if it doesn’t: pyopengl.sourceforge.net, from there you can get opengl python bindings. Google for tutorials of how to check for certain opengl features ;).
I don’t know how to detect fragment shader support in-game, but GameLogic.PrintGLInfo() will print out a machine specific shader support list to the console. That’s the best I can do at the moment. If you need to test for shaders in-game, try PM’ing spike1907 about it. I believe he said he had written a script that would do that for his Bullet Effect game.
Well guys, I tried my best but I still have no clue how to write a script to detect fragment shader support while in-game.
GameLogic.PrintGLInfo() is pretty much useless since I cant really access that data or assign it to a variable.
To detect which opengl features (shaders and such) are available on a certain computer, you have to use OpenGL functions. BlenderGE already checks for the shader thingyfoo so maybe it sets some variables in the python bindings? dunno… But if it doesn’t: pyopengl.sourceforge.net, from there you can get opengl python bindings. Google for tutorials of how to check for certain opengl features
I checked out the site and did some searching but I simply couldnt find a way to implement any of that code into a blender python script…Im fairly experienced with ‘normal’ python scripting but this GLSL stuff is way over my head…If you know how to write a script like this yourself, could you explain how or give me specific examples?
I would basically like to write a short script which detects if fragment shaders are supported on the user’s computer.(in-game)
If anyone out there has any clue how this can be done, please share any insight! Thanks…
When I saw this topic I thought about to dig up a bit of pyOpenGL again to help and to do something I also never did before. I archived to find the OpenGL version and actually be able to turn it into a variable which I could use.
I’m not sure if OpenGL version is gfx card related or system related. It could be that someone with an very old gfx card got printed out the newest opengl version but still not be able to use GLSL because the hardware doesn’t support it. But I hope that opengl version is related to what gfx card you use, then it would work like a charm.
What I need it a few people that know they have a graphics card without GLSL support running my program and post here what it prints out. So I can check if I did it all right and I can tweak the program a bit to everyone’s desire.
Currently I only have a windows version as runtime, so people on Linux or another OS’es need to build it themself and ofcourse you can post a link here. The source is included for those people using another OS’es
hmm it would probally have to look at the graphics driver of each card… there is a free program on the ozone3d.net site that does exactly that… maybe you could ask them how they did it…?
Hey JD, thanks for the info! I might take another stab at figuring it out…kinda sucks that I have to install all those libraries, but oh well.
I think the idea behind this is to detect if the OpenGL extension, “GL_ARB_fragment_shader” is supported. The idea is to see if the player can support bump mapping/etc. , and if not, switch the mesh. Im not sure, but I think its possible that some old/cheap graphics cards can have newer OpenGL versions installed on them while still not supporting fragment shaders, so I think checking for the extension itself would be 100% accurate…just checking for the OpenGL version might not be as accurate. But like I said, im not an expert in this area, so maybe checking for the OpenGL version will actually work…anyone know for sure?
Anyways, think you could come up with a script that checks for the extension? Perhaps something which would assign that to a GameLogic variable in blender? I think that would be a bit more useable for everybody.
Thanks for the OpenGL version checker though! Im reading 2.0.1