I was developing a game in Java & OpenGL on Windows and yesterday I got a new Macbook Pro.
When I moved my code from the Windows machine to the OS X machine I got an error that said couldn't compile shaders. I read on the internet that it's because in OS X you have to turn ProfileCore to true which is only supported in OpenGL 3.2 + . Here is my problem: For my GUI and my Text I use GL10 functions and I use the Slick2D library. When-ever I set my OpenGL version to be 3.2 with core profile the game runs fine but I get an error on Slick2D code.
I wanted to know if there was a way to run OpenGL with core profile but not 3.2
Is there a library for text like Slick2D that supports OpenGL 3.2 or will I have to create my own support of texture atlases and stuff for the text.
I do not have enough reputation to comment, so I must write this as an answer.
The core profile is a configuration in OSX which sets the used OpenGL version.
https:// developer.apple.com/graphicsimaging/opengl/capabilities/
Slick2D should support lower OpenGL Versions. I have used it with OpenGL version 2.1 on Linux and Windows. My Application also ran in OSX.
Try out core profile version 2.1. This is the version that was most compatible to PCs (and Macs) in my testing.
I do not fully understand your second question. Are you looking for an alternative engine?
I can recommend libGDX for cross-platform game development with Java. (http://libgdx.badlogicgames.com/)
If you are open to non-Java Game Engines, you can use Unity3D of course. (http://unity3d.com/)
Related
I installed libGDX and wrote a simple code to display a window. But when I run it, I get an exception that says : OpenGL is not supported by video driver. Then I installed GLEW (OPENGL EXTENSION WRANGLER LIBRARY). Then I went to the installation folder, unzipped the contents to a new folder, went to the new folder, clicked on bin, release, win32, and finally glewinfo. It opened a notepad file that showed me that name of my video card and said that it supported OpenGL 2.1. But in eclipse (mars) and libgdx (gdx-setup tool) i cant get my program to run even if i set config.useGL30 = false. Pleaee help!
There is a difference between OpenGL ES and OpenGL.
OpenGL is the desktop version.
OpenGL ES is the mobile version.
libGDX uses OpenGL ES since it runs on mobile and desktop.
To run OpenGL ES 2.0 you need OpenGL 4.1 on a desktop.
To run OpenGL ES 3.0 you need OpenGL 4.3 on a desktop.
EDIT according to derhass
Note that this are only the specifications and actual implementations can provide full support for OpenGL ES 2.0/3.0 prior to these versions.
But this seems not to be the case for your setup.
I'm working with LibGDX 1.5.6 on Windows and had successfully exported my app to Desktop, Android and HTML5.
But..
Assuming that I had previously selected the iOS project when creating the Gradle projects in the libGDX setup. And that I have a registered Device, Developer License and Provisioning Certificates for iOS development.
Is there a way to export my app to iOS, working on Windows?
Since Robovm depends on XCode to be installed I don't think it would be possible to deploy to iOS within Windows.
See the prerequisites from the official libgdx documentation here.
However, I was able to do it by running a virtual machine with Mac OS X, but my experience with it was not very pleasant, it runs very slow, specially if you use the iOS simulator. You will need a machine with a lot of RAM (8 RAM minimum). So I ended up buying a Mac Mini.
I used to use VMWare Workstation for emulation, but I had to download patches to make it work on the latest OS X version since it is not supported officially. It is a little hard to find any Mac OS X images to install on a virtual machine. I do not have any links to OS X images since that was quite a while ago, but you might be able to find some.
I'm looking into running libGDX based app on a Ubuntu Server. The server has no GPU. The purpose is to render animations defined as libGDX "games". The perfect setup would pipe frames out to standard output. I'm OK with some kind of software-simulated GPU.
I'm aware of libGDX headless mode, but as far as I understand it will not render any graphics.
LibGDX on Linux depends upon the LWJGL library for setting up rendering support. So, what you want to find out is if/how LWJGL can run without a GPU. Both LibGDX and LWJGL expose fairly low-level OpenGL commands, so I think what you need is the Mesa library (it exposes OpenGL support, but does everything in software).
From this question:
Does LWJGL (bare) use software or hardware rendering? it looks like you can ask LWJGL to not require hardware support. But, I think you still need some software-support enabled (and I believe that would be Mesa).
If you get this stack working, I think the next step is to have your "game" render to a FrameBuffer and then use Libgdx to render the FrameBuffer to file inside libgdx or OpenGL. (There may be ways to get lower layers of the stack to render to a file, too.)
My Android OpenGL-ES 2.0 project don't even run on Android emulator (GPU host) or virtual machines (Androidx86.iso + VirtualBox), but no problem with physical android devices.
so, can i use libGdx desktop port for emulation of Android GLES20 without integrating other libGdx stuff in my android project?
if yes, then how to load shaders from android's RAW folder without libGdx framework?!
beside libGdx, i find a working wrapper
but if i have to maintain a wrapper by myself, then NDK+GLUT isn't faster option?
You can do something like that. It is what libgdx wiki says:
Clearly there's no OpenGL ES implementation on the desktop useable via
Java. Well, there is now. Libgdx emulates OpenGL ES via the standard
OpenGL API on Windows and Linux. Nearly all features are supported
such as fixed point math and so on. The only feature missing at the
moment is support for fixed point vertex buffer objects and some minor
getter methods.
Here is tutorial how you can use libgdx with lwjgl backend.
Here is how shader programs are initialized.
You can see from the link above how shaders are loaded from resources.
Here is what ShaderProgram does under the hood.
You can see what it calls some functions of gl object which contains methods emulating opengl es 2.0.
I have just started with Java and the first thing i did was to download the Java SE JDK 7u40 bundled with Netbeans.
I am on ubuntu 13.04.
When i tried out the samples from JavaFX on Netbeans specifically the Cube3D sample when i ran it strange results came out.I had an empty window with small yellow square on the top left of the window
rather than a 3d Cube on the window.
Similar problems occur with all the samples that have 3d in them.
However when i do this on windows enviroment everything runs properly (windows 7 to be precise).
Someone any reason of why is this happening?
I think this page contains the answer:
http://www.oracle.com/technetwork/java/javafx/downloads/supportedconfigurations-1506746.html
It states that: ...On Linux platforms, graphic hardware acceleration is only supported for Nvidia cards (proprietary drivers only).
Cheers.