By uss01
on Sun, 01/06/2013 - 19:38
Hi Team :
1) I have a new file meh.h and I moved it to Jni Folder on proyect. This file was build from file object (meh.obj) using perl script
2) On Eclipse Proyect I have replaced this lines :
glVertexAttribPointer(vertexHandle, 3, GL_FLOAT, GL_FALSE, 0, (const GLvoid*) &mehVerts[0]);
glVertexAttribPointer(normalHandle, 3, GL_FLOAT, GL_FALSE, 0, (const GLvoid*) &mehNormals[0]);
glVertexAttribPointer(textureCoordHandle, 2, GL_FLOAT, GL_FALSE, 0, (const GLvoid*) &mehTexCoords[0]);
and these lines too :
glDrawArrays(GL_TRIANGLES, 0, mehNumVerts);
#include meh.h
3) Save All & Close Eclipse Proyect
4) Run ndk-build on DOS prompt and throw this message:
C:\Development\Android\vuforia-sdk-android-2-0-30\samples\ImageTargets-2-0-6>ndk-build"Compile++ arm : ImageTargets <= ImageTargets.cppjni/ImageTargets.cpp: In function 'void Java_com_qualcomm_QCARSamples_ImageTargets_ImageTargetsRenderer_renderFrame(JNIEnv*, jobject)':jni/ImageTargets.cpp:405:48: error: 'mehVertices' was not declared in this scope jni/ImageTargets.cpp:409:48: error: 'mehTexCoords' was not declared in this scopejni/ImageTargets.cpp:422:50: error: too few arguments to function 'void glDrawElements(GLenum, GLsizei, GLenum, const GLvoid*)'C:/android-ndk-r8d/platforms/android-8/arch-arm/usr/include/GLES2/gl2.h:515:37:note: declared heremake: *** [obj/local/armeabi/objs/ImageTargets/ImageTargets.o] Error 1 Team: Please your tips to behave this event,Thanks in advanced, German Medina Neria
Hi, have you included the
Hi, have you included the meh.h header in ImageTargets.cpp, i.e. have you added this line:
#include "meh.h"
(see line of code where you have < #include "Teapot.h" >)
?
Replace the model used in ImageTargets
Hi:
Here is my code on ImageTargets.cpp
Can you send me the < meh.h
Can you send me the < meh.h > file to this address: aboccala@qti.qualcomm.com ?
Thanks for the file. The file
Thanks for the file. The file looks OK, however you need to pay attention to the following issues in your code:
Replace the model used in ImageTargets
Hi :
Here are my results :
1.- mehVerts is working, I saw this come from (was declared into meh.h)
2.- Please your asistance, about mehTexCoords, I do not find ( gl_FragColor = texture2D(texSampler2D, texCoord);) to replace it
3.- On this command line was :
Hi, gl_FragColor =
Hi,
Replace the model used in ImageTargets
Hi Alessandro B:
This is my Summary : (file inserted on jni folder is meh.h)
Hi, as I explained to you in
Hi,
as I explained to you in a previous message, your meh.h file is correct, but you have to do the following:
1- remove (or comment out) this line:
Replace the model used in ImageTargets
Hi AlessandroB again:
Following your indications, here is the update :
1) Running ndk-build command :
Hi, the fact that you get
Hi, the fact that you get errors when you run the app in Eclipse is normal, because the ndk-build failed for the C++ part, so you need first to fix the C++ code.
What I see is that there something else wrong in your ImageTargets.cpp, but I need you to send me the whole file;
And also could you specify if
And also could you specify if you are using OpenGL 1.1 or 2.0 ?
to verify that, check this flag in your Android.mk file:
USE_OPENGL_ES_1_1 := false (...or is it set to true ?)
Hi, this is the code that I
Hi, this is the code that I just tested (compield and run), which works:
Note: make sure to revert to the original clean ImageTargets.cpp (which compiles and works), and then make these changes:
Replace the model used in ImageTargets
Hi Alessandro;
Then I followed you with change
Hi, does the ndk-build
Hi, does the ndk-build results in a successfull build ? Have you also refreshed the project in Eclipse after that ?
Replace the model used in ImageTarget
Hi Alessadro B:
Hi, no need to apologize, I'm
Hi, no need to apologize, I'm glad that it now works!