Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 27 Oct 2006
Offline Last Active Jun 29 2016 10:11 AM

Posts I've Made

In Topic: Android - Passing errors to a user when opengl context fails to be created

04 March 2016 - 01:30 PM

Ah that makes more sense. I don't actually have any java side at all. I'm using the Visual Studio native application project. I'm not sure how I would go about making any java bits at all. This is unexplored territory for me. I would like to pursue this idea thoguh, there are a few things that would be so much easier if I could make on the java side rather than making so many jni calls.


If you're using the NDK then I would strongly recommend you learn the JNI stuff. Some stuff is WAY easier to do in Java. Using JNI you get the best of both worlds. The original glue code Google code included was really just a sample IIRC. I made my own glue code using theirs as a guide. The code starts a native thread and puts an exception handler around it. When a C++ exception is caught, I re-throw it using JNI to the JVM. So it gets logged as a normal Java exception and I get a crash report on the Google Play Developer Console. I even log Java exceptions that happened when my C++ code called some Java code.


The other thing I have is a custom build I give out if I have a user that is willing to work with me. The app logs everything to a file and makes sure it's flushed after each entry. Next time the app starts, if it sees a file it blocks while it sends it to my website. Then it deletes the file.

In Topic: Using GLES2/3 depending on hardware (Android)

19 December 2015 - 09:25 AM

There is also GL_OES_element_index_uint extension that allows u32 indices.


I still think you're making more work for yourself than needed. I would get it to run on ES 2.0 and then add and extensions or ES 3.0 as a bonus if time permits. It's pretty trivial to write and index buffer class that handles the breaking up for you as long as you're drawing the whole thing instead of ranges. If you're drawing ranges then you have already broken the index buffer up somehow.

In Topic: Your development workflow

18 December 2015 - 02:32 PM

While (task = tasks.pop()) task.perform();


That one is awesome but I have to say it's not thread safe. Are you telling me you only get tasks from one place!

In Topic: Using GLES2/3 depending on hardware (Android)

18 December 2015 - 02:22 PM

If you have managed to write support using ES 2.0 then why bother with 3.0? I'm still at ES 2.0 and won't change until I have no other choice or becomes the dominant version. Why limited your target audience?


What I do for this sort of thing is have abstract classes and then check extensions and make run-time choices. This is basically how I do my platform independence also.


The indices problem I solved off line by breaking the assets up as part of the asset pipeline. This rarely happens and I would somewhat question why you need that many indices on a mobile device.

VertexArrayObject* OpenGLGraphicsDevice::createVertexArrayObject( VertexBuffer& vb, const VertexFormat& vf )
	if ( isOpenGlES3() == true )
		return new OpenGLVertexArrayObject( vb, vf, vb.getTag() );

	if ( hasOES_vertex_array_object() == true )
		return new OpenGLVertexArrayObjectOES( vb, vf, vb.getTag() );

	return new OpenGLVertexArrayObjectEmulated( vb, vf, vb.getTag() );

In Topic: java.lang.NoClassDefFoundError:

09 November 2015 - 09:05 PM

Kinda offtopic but I'd just try with Android Studio instead.


Make no mistake, I use Eclipse for day to day Java, but Android Studio is a pretty hassle free experience for Android dev.

What about NDK these days? Is it well supported?