Reputation: 30284
My question seems really silly. But I really headache with this question. For example you use canvas
to draw something on Screen (example: line, square) You just take one line of code. So, when debug, when you go through that line, and bad result ( nothing happened, not draw what you want,...) You totally know that something wrong with that line or parameter of its method.
But when I come to OpenGL, just a triangle (with color texture,...), you must use "many line of code" : create byteBuffer
, convert to floatBuffer
, enable some state that you will use... And when debug, something wrong, I cannot know why (It can be wrong parameter, or I missing something,...). Debugger just help me view flow-of-code and see how it work.
I need some advice of people here to overcome this. Please help me.
thanks :)
Upvotes: 1
Views: 2621
Reputation: 4011
Other than LogCat and tracing, there really isn't much more you can do other than trying to understand the fine grain details of what each line of the code does. Your question is quite open-ended, do you have a specific example of a problem that you ran into? Anyhow, I found this site as a good learning resource when I first started learning about OpenGL ES.
However, for game development,I tend to lean towards using open source frameworks that wraps around OpenGL ES like libgdx or AndEngine (for games).
Upvotes: 1
Reputation: 1352
The first thing I would do is look at Logcat output. Look for errors coming from your app.
To see Logcat output in Eclipse, find the DDMS view.
Otherwise, you can go to: Window > Show View > Other Then expand Android and then select Logcat
Upvotes: 2