상세 컨텐츠

본문 제목

android 안드로이드 ndk jni 오픈지엘 OpenGL ES 관련 EGL_DEFAULT_DISPLAY, eglCreateWindowSurface,glDrawTexfOES 등 에러 관련

스마트기기개발관련/OpenGL (그래픽, 게임)

by AlrepondTech 2020. 9. 18. 05:57

본문

반응형

 

 

 

=================================

=================================

=================================

 

 

 

 

 

 

출처: http://202psj.tistory.com/470

해당 프로젝트에 오른쪽 마우스로 속성에 들어간다음.

 "C/C++ General->Paths and Symbols"  란에 들어간다.

거기서 오른쪽에 보면 탭들이 보이는데 2번쨰 탭 Symbols 로 들어간다.

그리고 나서 add 버튼을 누른후 name에 __ANDROID__

을 그대로 적어주고 확인을 누루면 EGL_DEFAULT_DISPLAY, eglCreateWindowSurface 

등등 에러를 해결할 수 있다.

 

 

=================================

=================================

=================================

 

 

출처: http://202psj.tistory.com

 

glDrawTexfOES 에러 관련

 

만약 위에 api 에 에러가 난다면

 

//------------------------------------------------------------------------code

#define GL_GLEXT_PROTOTYPES 1

 

#include <GLES/gl.h>

#include <GLES/glext.h>

//------------------------------------------------------------------------

 

opengl 을 include 해준 바로 위에 #define GL_GLEXT_PROTOTYPES 1 을 써준다.

그렇게 해도 에러가 나면 

 

//------------------------------------------------------------------------code

#define GL_GLEXT_PROTOTYPES 1

 

#include <GLES/gl.h>

#include <GLES/glext.h>

 

GL_API void GL_APIENTRY glDrawTexfOES (GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height);

//------------------------------------------------------------------------

GLES/glext.h <- 으로 Ctrl+클릭 또는 F3 키로 들어가 glDrawTexfOES API 를 직접 복사해

위에 code 처럼 작성해 주면 된다.

 

 

=================================

=================================

=================================

 

 

출처:http://stackoverflow.com/questions/11644443/opengl-es-compile-errors

When trying to write these functions in eclipse with android NDK errors given that there are invalid arguments and such:
The errors:
  1. Invalid arguments ' Candidates are: void * eglGetDisplay(?)
  2. Type 'EGL_DEFAULT_DISPLAY' could not be resolved
  3. Invalid arguments ' Candidates are: void * eglCreateWindowSurface(void *, void *, ?, const int *)
The tooltip eclipse gives when hovering over these functions shows questionmarks as input variables. I think eclipse isn't finding some code it should be including but I don't know how to fix it.
eclipse opengl-es android-ndk


Was this post useful to you?     

1 Answer

activeoldestvotes

To fix this go to your projects properties and go to the "C/C++ General->Paths and Symbols" page, under the "Symbols" tab click on GNU C and then the "Add" button and put
in the NAME field (value leave blank) and click OK. You can do the same for GNU C++.

 

 

 

=================================

=================================

=================================

 

 

 

반응형


관련글 더보기

댓글 영역