자바 OpenGL
개발자 | JogAmp 커뮤니티 |
---|---|
안정화 버전 | 2.5.0 / 2023년 8월 18일(12개월 전)(2023-08-18) |
프로그래밍 언어 | 자바, C |
운영 체제 | 크로스 플랫폼 |
종류 | 3차원 컴퓨터 그래픽스 소프트웨어 (라이브러리/API) |
라이선스 | BSD 허가서 |
웹사이트 | jogamp |
자바 OpenGL(Java OpenGL, JOGL)은 OpenGL을자바 프로그래밍 언어에 사용될 수 있도록 하는 래퍼 라이브러리이다.[1][2] Kenneth Bradley Russell과 Christopher John Kline에 의해 처음 개발되었다가 이후 썬 마이크로시스템즈 게임 테크놀로지 그룹에 의해 추가 개발되었다. 2010년 이후로 BSD 허가서 하의 독립 오픈 소스 프로젝트로 유지되고 있다. Java Bindings for OpenGL(JSR-231)의 참조 구현체이다.
JOGL은 자바 네이티브 인터페이스(JNI)를 사용함으로써 C 언어 프로그램들에서 이용 가능한 대부분의 OpenGL 기능들에 접근할 수 있다.
코드 예제
@Override public void display(GLAutoDrawable drawable) { GL4 gl4 = drawable.getGL().getGL4(); gl4.glClearBufferfv(GL2ES3.GL_COLOR, 0, clearColor); gl4.glClearBufferfv(GL2ES3.GL_DEPTH, 0, clearDepth); { FloatUtil.makeLookAt(view, 0, eye, 0, at, 0, up, 0, tmp); FloatUtil.makePerspective(projection, 0, reset, 45f, aspect, near, far); FloatUtil.multMatrix(projection, view); // projection *= view transformPointer.asFloatBuffer().put(projection); } gl4.glUseProgram(programName); gl4.glBindVertexArray(vertexArrayName.get(0)); gl4.glBindBufferBase(GL2ES3.GL_UNIFORM_BUFFER /*target*/, 1 /*TRANSFORM0, index*/, bufferName.get(2) /*TRANSFORM, buffer*/); gl4.glBindTextureUnit(0 /*diffuse*/, textureName.get(0)); gl4.glBindSampler(0 /*diffuse*/, samplerName.get(0)); gl4.glDrawElements(GL.GL_TRIANGLES, elementCount, GL.GL_UNSIGNED_SHORT, 0); }
같이 보기
- Java Bindings for OpenGL
- Ardor3D
- Elflight Engine
- JMonkey Engine
- Poxnora
- 룬스케이프
- Jake2
- Scilab
- Jreality
- ClearVolume
- LWJGL
- 자바 OpenAL
- 자바 OpenCL
각주
- ↑ “Open source Java projects: Java Binding for OpenGL (JOGL)”. 인터내셔널 데이터 그룹. 2008년 9월 18일. 2010년 12월 3일에 원본 문서에서 보존된 문서. 2011년 2월 6일에 확인함.
JOGL originated as a project named Jungle, which was created by 3D graphics experts Ken Russell (of Sun Microsystems) and Chris Kline (of Irrational Games).
- ↑ “Hello JOGL”. 인터내셔널 데이터 그룹. 2005년 2월 21일. 2010년 3월 27일에 원본 문서에서 보존된 문서. 2011년 2월 6일에 확인함.
외부 링크
- 자바 OpenGL - 공식 웹사이트
- JOGL 2.3.x Specification
- JSR-231 Java Bindings for OpenGL website
- tool kiet Archived 2009년 2월 9일 - 웨이백 머신, The OpenGL Programming Guide examples using JOGL
- NeHe's tutorials and sample code
- Setting up a JogAmp JOGL project in your favorite IDE
- Viewer3D, an applet to display interactive 3D content with JOGL
- Eclipse OpenGL Pack OpenGL plugin for the Eclipse IDE