|
From: <sp...@us...> - 2011-07-10 16:58:31
|
Revision: 3561
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3561&view=rev
Author: spasi
Date: 2011-07-10 16:58:16 +0000 (Sun, 10 Jul 2011)
Log Message:
-----------
Merged OpenGL ES branch.
Modified Paths:
--------------
trunk/LWJGL/build.xml
trunk/LWJGL/platform_build/build-definitions.xml
trunk/LWJGL/platform_build/build-generator.xml
trunk/LWJGL/platform_build/linux_ant/build.xml
trunk/LWJGL/platform_build/macosx_ant/build.xml
trunk/LWJGL/platform_build/mingw_ant/build.xml
trunk/LWJGL/platform_build/windows_ant/build.xml
trunk/LWJGL/src/java/org/lwjgl/opencl/APIUtil.java
trunk/LWJGL/src/java/org/lwjgl/opencl/CallbackUtil.java
trunk/LWJGL/src/java/org/lwjgl/opencl/InfoUtilFactory.java
trunk/LWJGL/src/java/org/lwjgl/opengl/AWTGLCanvas.java
trunk/LWJGL/src/java/org/lwjgl/opengl/CallbackUtil.java
trunk/LWJGL/src/java/org/lwjgl/opengl/Display.java
trunk/LWJGL/src/java/org/lwjgl/opengl/DisplayImplementation.java
trunk/LWJGL/src/java/org/lwjgl/opengl/DrawableLWJGL.java
trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxContextImplementation.java
trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java
trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplayPeerInfo.java
trunk/LWJGL/src/java/org/lwjgl/opengl/MacOSXContextImplementation.java
trunk/LWJGL/src/java/org/lwjgl/opengl/MacOSXDisplay.java
trunk/LWJGL/src/java/org/lwjgl/opengl/Pbuffer.java
trunk/LWJGL/src/java/org/lwjgl/opengl/PixelFormat.java
trunk/LWJGL/src/java/org/lwjgl/opengl/SharedDrawable.java
trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsContextImplementation.java
trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDisplay.java
trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDisplayPeerInfo.java
trunk/LWJGL/src/java/org/lwjgl/test/opengl/sprites/SpriteShootoutCL.java
trunk/LWJGL/src/java/org/lwjgl/util/generator/FieldsGenerator.java
trunk/LWJGL/src/java/org/lwjgl/util/generator/JavaMethodsGenerator.java
trunk/LWJGL/src/java/org/lwjgl/util/generator/NativeMethodStubsGenerator.java
trunk/LWJGL/src/java/org/lwjgl/util/generator/RegisterStubsGenerator.java
trunk/LWJGL/src/java/org/lwjgl/util/vector/Matrix4f.java
trunk/LWJGL/src/native/windows/org_lwjgl_opengl_Display.c
trunk/LWJGL/src/templates/org/lwjgl/opencl/CL10.java
trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_texture_lod_bias.java
Added Paths:
-----------
trunk/LWJGL/libs/linux/libEGL.so
trunk/LWJGL/libs/linux/libGLESv2.so
trunk/LWJGL/libs/linux/x64/
trunk/LWJGL/libs/linux/x64/libEGL.so
trunk/LWJGL/libs/linux/x64/libGLESv2.so
trunk/LWJGL/libs/windows/libEGL.dll
trunk/LWJGL/libs/windows/libEGL.lib
trunk/LWJGL/libs/windows/libGLESv2.dll
trunk/LWJGL/platform_build/linux_ant/build_es.xml
trunk/LWJGL/platform_build/windows_ant/build_es.xml
trunk/LWJGL/src/java/org/lwjgl/opengl/Context.java
trunk/LWJGL/src/java/org/lwjgl/opengl/ContextGL.java
trunk/LWJGL/src/java/org/lwjgl/opengl/ContextGLES.java
trunk/LWJGL/src/java/org/lwjgl/opengl/DrawableGL.java
trunk/LWJGL/src/java/org/lwjgl/opengl/DrawableGLES.java
trunk/LWJGL/src/java/org/lwjgl/opengl/NVPresentVideoUtil.java
trunk/LWJGL/src/java/org/lwjgl/opengl/NVVideoCaptureUtil.java
trunk/LWJGL/src/java/org/lwjgl/opengl/PixelFormatLWJGL.java
trunk/LWJGL/src/java/org/lwjgl/opengles/
trunk/LWJGL/src/java/org/lwjgl/opengles/APIUtil.java
trunk/LWJGL/src/java/org/lwjgl/opengles/ContextAttribs.java
trunk/LWJGL/src/java/org/lwjgl/opengles/EGL.java
trunk/LWJGL/src/java/org/lwjgl/opengles/EGLConfig.java
trunk/LWJGL/src/java/org/lwjgl/opengles/EGLContext.java
trunk/LWJGL/src/java/org/lwjgl/opengles/EGLDisplay.java
trunk/LWJGL/src/java/org/lwjgl/opengles/EGLImageOES.java
trunk/LWJGL/src/java/org/lwjgl/opengles/EGLKHRFenceSync.java
trunk/LWJGL/src/java/org/lwjgl/opengles/EGLKHRReusableSync.java
trunk/LWJGL/src/java/org/lwjgl/opengles/EGLNVSync.java
trunk/LWJGL/src/java/org/lwjgl/opengles/EGLSurface.java
trunk/LWJGL/src/java/org/lwjgl/opengles/EGLSyncKHR.java
trunk/LWJGL/src/java/org/lwjgl/opengles/EGLSyncNV.java
trunk/LWJGL/src/java/org/lwjgl/opengles/GLChecks.java
trunk/LWJGL/src/java/org/lwjgl/opengles/GLContext.java
trunk/LWJGL/src/java/org/lwjgl/opengles/PeerInfo.java
trunk/LWJGL/src/java/org/lwjgl/opengles/PixelFormat.java
trunk/LWJGL/src/java/org/lwjgl/opengles/PowerManagementEventException.java
trunk/LWJGL/src/java/org/lwjgl/opengles/StateTracker.java
trunk/LWJGL/src/java/org/lwjgl/opengles/Util.java
trunk/LWJGL/src/java/org/lwjgl/test/opengles/
trunk/LWJGL/src/java/org/lwjgl/test/opengles/FullScreenWindowedTest.java
trunk/LWJGL/src/java/org/lwjgl/test/opengles/Gears.java
trunk/LWJGL/src/java/org/lwjgl/test/opengles/MappedIndexedVBOTest.java
trunk/LWJGL/src/java/org/lwjgl/test/opengles/QuadRenderer.java
trunk/LWJGL/src/java/org/lwjgl/test/opengles/util/
trunk/LWJGL/src/java/org/lwjgl/test/opengles/util/BufferObject.java
trunk/LWJGL/src/java/org/lwjgl/test/opengles/util/BufferObjectArray.java
trunk/LWJGL/src/java/org/lwjgl/test/opengles/util/BufferObjectElement.java
trunk/LWJGL/src/java/org/lwjgl/test/opengles/util/GLLight.java
trunk/LWJGL/src/java/org/lwjgl/test/opengles/util/GLMatrix.java
trunk/LWJGL/src/java/org/lwjgl/test/opengles/util/GLObject.java
trunk/LWJGL/src/java/org/lwjgl/test/opengles/util/Geometry.java
trunk/LWJGL/src/java/org/lwjgl/test/opengles/util/ImmediateModeBuffer.java
trunk/LWJGL/src/java/org/lwjgl/test/opengles/util/Shader.java
trunk/LWJGL/src/java/org/lwjgl/test/opengles/util/ShaderProgram.java
trunk/LWJGL/src/java/org/lwjgl/test/opengles/util/Sphere.java
trunk/LWJGL/src/java/org/lwjgl/util/generator/opengl/EGLint64NV.java
trunk/LWJGL/src/java/org/lwjgl/util/generator/opengl/EGLuint64NV.java
trunk/LWJGL/src/java/org/lwjgl/util/generator/opengl/GLESCapabilitiesGenerator.java
trunk/LWJGL/src/java/org/lwjgl/util/generator/opengl/GLESGeneratorProcessorFactory.java
trunk/LWJGL/src/java/org/lwjgl/util/generator/opengl/GLESTypeMap.java
trunk/LWJGL/src/native/common/EGL/
trunk/LWJGL/src/native/common/EGL/egl.h
trunk/LWJGL/src/native/common/EGL/eglext.h
trunk/LWJGL/src/native/common/EGL/eglplatform.h
trunk/LWJGL/src/native/common/GLES2/
trunk/LWJGL/src/native/common/GLES2/gl2.h
trunk/LWJGL/src/native/common/GLES2/gl2ext.h
trunk/LWJGL/src/native/common/GLES2/gl2extimg.h
trunk/LWJGL/src/native/common/GLES2/gl2platform.h
trunk/LWJGL/src/native/common/KHR/
trunk/LWJGL/src/native/common/KHR/khrplatform.h
trunk/LWJGL/src/native/common/opengl/
trunk/LWJGL/src/native/common/opengl/extgl.c
trunk/LWJGL/src/native/common/opengl/extgl.h
trunk/LWJGL/src/native/common/opengl/extgl_types.h
trunk/LWJGL/src/native/common/opengl/org_lwjgl_opengl_CallbackUtil.c
trunk/LWJGL/src/native/common/opengl/org_lwjgl_opengl_GLContext.c
trunk/LWJGL/src/native/common/opengl/org_lwjgl_opengl_NVPresentVideoUtil.c
trunk/LWJGL/src/native/common/opengl/org_lwjgl_opengl_NVVideoCaptureUtil.c
trunk/LWJGL/src/native/common/opengles/
trunk/LWJGL/src/native/common/opengles/extgl.c
trunk/LWJGL/src/native/common/opengles/extgl.h
trunk/LWJGL/src/native/common/opengles/extgl_egl.c
trunk/LWJGL/src/native/common/opengles/extgl_egl.h
trunk/LWJGL/src/native/common/opengles/extgl_types.h
trunk/LWJGL/src/native/common/opengles/org_lwjgl_opengles_EGL.c
trunk/LWJGL/src/native/common/opengles/org_lwjgl_opengles_EGLKHRFenceSync.c
trunk/LWJGL/src/native/common/opengles/org_lwjgl_opengles_EGLKHRReusableSync.c
trunk/LWJGL/src/native/common/opengles/org_lwjgl_opengles_EGLNVSync.c
trunk/LWJGL/src/native/common/opengles/org_lwjgl_opengles_GLContext.c
trunk/LWJGL/src/native/linux/opengl/
trunk/LWJGL/src/native/linux/opengl/GLX.c
trunk/LWJGL/src/native/linux/opengl/GLX.h
trunk/LWJGL/src/native/linux/opengl/context.c
trunk/LWJGL/src/native/linux/opengl/context.h
trunk/LWJGL/src/native/linux/opengl/display.c
trunk/LWJGL/src/native/linux/opengl/extgl_glx.c
trunk/LWJGL/src/native/linux/opengl/extgl_glx.h
trunk/LWJGL/src/native/linux/opengl/org_lwjgl_opengl_Display.c
trunk/LWJGL/src/native/linux/opengl/org_lwjgl_opengl_LinuxAWTGLCanvasPeerInfo.c
trunk/LWJGL/src/native/linux/opengl/org_lwjgl_opengl_LinuxCanvasImplementation.c
trunk/LWJGL/src/native/linux/opengl/org_lwjgl_opengl_LinuxContextImplementation.c
trunk/LWJGL/src/native/linux/opengl/org_lwjgl_opengl_Pbuffer.c
trunk/LWJGL/src/native/linux/opengles/
trunk/LWJGL/src/native/linux/opengles/context.c
trunk/LWJGL/src/native/linux/opengles/context.h
trunk/LWJGL/src/native/linux/opengles/display.c
trunk/LWJGL/src/native/linux/opengles/extgl_glx.c
trunk/LWJGL/src/native/linux/opengles/org_lwjgl_opengl_Display.c
trunk/LWJGL/src/native/windows/opengl/
trunk/LWJGL/src/native/windows/opengl/WGL.c
trunk/LWJGL/src/native/windows/opengl/WGL.h
trunk/LWJGL/src/native/windows/opengl/context.c
trunk/LWJGL/src/native/windows/opengl/context.h
trunk/LWJGL/src/native/windows/opengl/extgl_wgl.c
trunk/LWJGL/src/native/windows/opengl/extgl_wgl.h
trunk/LWJGL/src/native/windows/opengl/org_lwjgl_opengl_Pbuffer.c
trunk/LWJGL/src/native/windows/opengl/org_lwjgl_opengl_WindowsContextImplementation.c
trunk/LWJGL/src/native/windows/opengl/org_lwjgl_opengl_WindowsPeerInfo.c
trunk/LWJGL/src/native/windows/opengles/
trunk/LWJGL/src/native/windows/opengles/context.c
trunk/LWJGL/src/native/windows/opengles/context.h
trunk/LWJGL/src/native/windows/opengles/extgl_wgl.c
trunk/LWJGL/src/native/windows/opengles/org_lwjgl_opengl_WindowsPeerInfo.c
trunk/LWJGL/src/templates/org/lwjgl/opencl/AMD_device_memory_flags.java
trunk/LWJGL/src/templates/org/lwjgl/opencl/AMD_offline_devices.java
trunk/LWJGL/src/templates/org/lwjgl/opencl/AMD_popcnt.java
trunk/LWJGL/src/templates/org/lwjgl/opengl/AMD_multi_draw_indirect.java
trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_present_video.java
trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_video_capture.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/
trunk/LWJGL/src/templates/org/lwjgl/opengles/AMD_compressed_3DC_texture.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/AMD_compressed_ATC_texture.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/AMD_performance_monitor.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/AMD_program_binary_Z400.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/ANGLE_framebuffer_blit.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/ANGLE_framebuffer_multisample.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/APPLE_framebuffer_multisample.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/APPLE_rgb_422.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/APPLE_texture_format_BGRA8888.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/APPLE_texture_max_level.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/ARB_draw_buffers.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/ARB_half_float_pixel.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/ARB_texture_rectangle.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/ARM_mali_shader_binary.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/ARM_rgba8.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/DMP_shader_binary.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/EXT_Cg_shader.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/EXT_bgra.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/EXT_blend_minmax.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/EXT_discard_framebuffer.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/EXT_frag_depth.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/EXT_multi_draw_arrays.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/EXT_packed_float.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/EXT_read_format_bgra.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/EXT_shader_texture_lod.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/EXT_texture_array.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/EXT_texture_compression_dxt1.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/EXT_texture_compression_latc.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/EXT_texture_compression_s3tc.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/EXT_texture_filter_anisotropic.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/EXT_texture_format_BGRA8888.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/EXT_texture_lod_bias.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/EXT_texture_type_2_10_10_10_REV.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/GLES20.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/IMG_multisamples_render_to_texture.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/IMG_program_binary.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/IMG_shader_binary.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/IMG_texture_compression_pvrtc.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/NV_coverage_sample.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/NV_depth_nonlinear.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/NV_draw_path.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/NV_fbo_color_attachments.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/NV_fence.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/NV_framebuffer_vertex_attrib_array.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/NV_get_tex_image.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/NV_read_buffer.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/NV_shader_framebuffer_fetch.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/NV_system_time.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/OES_EGL_image.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/OES_EGL_image_external.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/OES_EGL_sync.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/OES_blend_equation_separate.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/OES_blend_func_separate.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/OES_blend_subtract.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/OES_compressed_ETC1_RGB8_texture.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/OES_compressed_paletted_texture.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/OES_depth24.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/OES_depth32.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/OES_depth_texture.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/OES_element_index_uint.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/OES_fbo_render_mipmap.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/OES_framebuffer_object.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/OES_get_program_binary.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/OES_mapbuffer.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/OES_packed_depth_stencil.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/OES_rgb8_rgba8.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/OES_standard_derivatives.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/OES_stencil1.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/OES_stencil4.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/OES_stencil8.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/OES_texture_3D.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/OES_texture_float.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/OES_texture_float_linear.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/OES_texture_half_float.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/OES_texture_half_float_linear.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/OES_texture_npot.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/OES_vertex_array_object.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/OES_vertex_half_float.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/OES_vertex_type_10_10_10_2.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/QCOM_driver_control.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/QCOM_extended_get.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/QCOM_extended_get2.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/QCOM_performance_monitor_global_mode.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/QCOM_tiled_rendering.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/QCOM_writeonly_rendering.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/VIV_shader_binary.java
Removed Paths:
-------------
trunk/LWJGL/libs/linux/x64/libEGL.so
trunk/LWJGL/libs/linux/x64/libGLESv2.so
trunk/LWJGL/src/java/org/lwjgl/opengl/AbstractDrawable.java
trunk/LWJGL/src/java/org/lwjgl/opengl/Context.java
trunk/LWJGL/src/java/org/lwjgl/opengles/APIUtil.java
trunk/LWJGL/src/java/org/lwjgl/opengles/ContextAttribs.java
trunk/LWJGL/src/java/org/lwjgl/opengles/EGL.java
trunk/LWJGL/src/java/org/lwjgl/opengles/EGLConfig.java
trunk/LWJGL/src/java/org/lwjgl/opengles/EGLContext.java
trunk/LWJGL/src/java/org/lwjgl/opengles/EGLDisplay.java
trunk/LWJGL/src/java/org/lwjgl/opengles/EGLImageOES.java
trunk/LWJGL/src/java/org/lwjgl/opengles/EGLKHRFenceSync.java
trunk/LWJGL/src/java/org/lwjgl/opengles/EGLKHRReusableSync.java
trunk/LWJGL/src/java/org/lwjgl/opengles/EGLNVSync.java
trunk/LWJGL/src/java/org/lwjgl/opengles/EGLSurface.java
trunk/LWJGL/src/java/org/lwjgl/opengles/EGLSyncKHR.java
trunk/LWJGL/src/java/org/lwjgl/opengles/EGLSyncNV.java
trunk/LWJGL/src/java/org/lwjgl/opengles/GLChecks.java
trunk/LWJGL/src/java/org/lwjgl/opengles/GLContext.java
trunk/LWJGL/src/java/org/lwjgl/opengles/PeerInfo.java
trunk/LWJGL/src/java/org/lwjgl/opengles/PixelFormat.java
trunk/LWJGL/src/java/org/lwjgl/opengles/PowerManagementEventException.java
trunk/LWJGL/src/java/org/lwjgl/opengles/StateTracker.java
trunk/LWJGL/src/java/org/lwjgl/opengles/Util.java
trunk/LWJGL/src/java/org/lwjgl/test/opengles/FullScreenWindowedTest.java
trunk/LWJGL/src/java/org/lwjgl/test/opengles/Gears.java
trunk/LWJGL/src/java/org/lwjgl/test/opengles/MappedIndexedVBOTest.java
trunk/LWJGL/src/java/org/lwjgl/test/opengles/QuadRenderer.java
trunk/LWJGL/src/java/org/lwjgl/test/opengles/util/
trunk/LWJGL/src/java/org/lwjgl/test/opengles/util/BufferObject.java
trunk/LWJGL/src/java/org/lwjgl/test/opengles/util/BufferObjectArray.java
trunk/LWJGL/src/java/org/lwjgl/test/opengles/util/BufferObjectElement.java
trunk/LWJGL/src/java/org/lwjgl/test/opengles/util/GLLight.java
trunk/LWJGL/src/java/org/lwjgl/test/opengles/util/GLMatrix.java
trunk/LWJGL/src/java/org/lwjgl/test/opengles/util/GLObject.java
trunk/LWJGL/src/java/org/lwjgl/test/opengles/util/Geometry.java
trunk/LWJGL/src/java/org/lwjgl/test/opengles/util/ImmediateModeBuffer.java
trunk/LWJGL/src/java/org/lwjgl/test/opengles/util/Shader.java
trunk/LWJGL/src/java/org/lwjgl/test/opengles/util/ShaderProgram.java
trunk/LWJGL/src/java/org/lwjgl/test/opengles/util/Sphere.java
trunk/LWJGL/src/native/common/EGL/egl.h
trunk/LWJGL/src/native/common/EGL/eglext.h
trunk/LWJGL/src/native/common/EGL/eglplatform.h
trunk/LWJGL/src/native/common/GLES2/gl2.h
trunk/LWJGL/src/native/common/GLES2/gl2ext.h
trunk/LWJGL/src/native/common/GLES2/gl2extimg.h
trunk/LWJGL/src/native/common/GLES2/gl2platform.h
trunk/LWJGL/src/native/common/KHR/khrplatform.h
trunk/LWJGL/src/native/common/extgl.c
trunk/LWJGL/src/native/common/extgl.h
trunk/LWJGL/src/native/common/extgl_types.h
trunk/LWJGL/src/native/common/opengl/extgl.c
trunk/LWJGL/src/native/common/opengl/extgl.h
trunk/LWJGL/src/native/common/opengl/extgl_types.h
trunk/LWJGL/src/native/common/opengl/org_lwjgl_opengl_CallbackUtil.c
trunk/LWJGL/src/native/common/opengl/org_lwjgl_opengl_GLContext.c
trunk/LWJGL/src/native/common/opengl/org_lwjgl_opengl_NVPresentVideoUtil.c
trunk/LWJGL/src/native/common/opengl/org_lwjgl_opengl_NVVideoCaptureUtil.c
trunk/LWJGL/src/native/common/opengles/extgl.c
trunk/LWJGL/src/native/common/opengles/extgl.h
trunk/LWJGL/src/native/common/opengles/extgl_egl.c
trunk/LWJGL/src/native/common/opengles/extgl_egl.h
trunk/LWJGL/src/native/common/opengles/extgl_types.h
trunk/LWJGL/src/native/common/opengles/org_lwjgl_opengles_EGL.c
trunk/LWJGL/src/native/common/opengles/org_lwjgl_opengles_EGLKHRFenceSync.c
trunk/LWJGL/src/native/common/opengles/org_lwjgl_opengles_EGLKHRReusableSync.c
trunk/LWJGL/src/native/common/opengles/org_lwjgl_opengles_EGLNVSync.c
trunk/LWJGL/src/native/common/opengles/org_lwjgl_opengles_GLContext.c
trunk/LWJGL/src/native/common/org_lwjgl_opengl_CallbackUtil.c
trunk/LWJGL/src/native/common/org_lwjgl_opengl_GLContext.c
trunk/LWJGL/src/native/linux/context.c
trunk/LWJGL/src/native/linux/context.h
trunk/LWJGL/src/native/linux/display.c
trunk/LWJGL/src/native/linux/extgl_glx.c
trunk/LWJGL/src/native/linux/extgl_glx.h
trunk/LWJGL/src/native/linux/opengl/GLX.c
trunk/LWJGL/src/native/linux/opengl/GLX.h
trunk/LWJGL/src/native/linux/opengl/context.c
trunk/LWJGL/src/native/linux/opengl/context.h
trunk/LWJGL/src/native/linux/opengl/display.c
trunk/LWJGL/src/native/linux/opengl/extgl_glx.c
trunk/LWJGL/src/native/linux/opengl/extgl_glx.h
trunk/LWJGL/src/native/linux/opengl/org_lwjgl_opengl_Display.c
trunk/LWJGL/src/native/linux/opengl/org_lwjgl_opengl_LinuxAWTGLCanvasPeerInfo.c
trunk/LWJGL/src/native/linux/opengl/org_lwjgl_opengl_LinuxCanvasImplementation.c
trunk/LWJGL/src/native/linux/opengl/org_lwjgl_opengl_LinuxContextImplementation.c
trunk/LWJGL/src/native/linux/opengl/org_lwjgl_opengl_Pbuffer.c
trunk/LWJGL/src/native/linux/opengles/context.c
trunk/LWJGL/src/native/linux/opengles/context.h
trunk/LWJGL/src/native/linux/opengles/display.c
trunk/LWJGL/src/native/linux/opengles/extgl_glx.c
trunk/LWJGL/src/native/linux/opengles/org_lwjgl_opengl_Display.c
trunk/LWJGL/src/native/linux/org_lwjgl_opengl_Display.c
trunk/LWJGL/src/native/linux/org_lwjgl_opengl_LinuxAWTGLCanvasPeerInfo.c
trunk/LWJGL/src/native/linux/org_lwjgl_opengl_LinuxCanvasImplementation.c
trunk/LWJGL/src/native/linux/org_lwjgl_opengl_LinuxContextImplementation.c
trunk/LWJGL/src/native/linux/org_lwjgl_opengl_Pbuffer.c
trunk/LWJGL/src/native/windows/context.c
trunk/LWJGL/src/native/windows/context.h
trunk/LWJGL/src/native/windows/extgl_wgl.c
trunk/LWJGL/src/native/windows/extgl_wgl.h
trunk/LWJGL/src/native/windows/opengl/WGL.c
trunk/LWJGL/src/native/windows/opengl/WGL.h
trunk/LWJGL/src/native/windows/opengl/context.c
trunk/LWJGL/src/native/windows/opengl/context.h
trunk/LWJGL/src/native/windows/opengl/extgl_wgl.c
trunk/LWJGL/src/native/windows/opengl/extgl_wgl.h
trunk/LWJGL/src/native/windows/opengl/org_lwjgl_opengl_Pbuffer.c
trunk/LWJGL/src/native/windows/opengl/org_lwjgl_opengl_WindowsContextImplementation.c
trunk/LWJGL/src/native/windows/opengl/org_lwjgl_opengl_WindowsPeerInfo.c
trunk/LWJGL/src/native/windows/opengles/context.c
trunk/LWJGL/src/native/windows/opengles/context.h
trunk/LWJGL/src/native/windows/opengles/extgl_wgl.c
trunk/LWJGL/src/native/windows/opengles/org_lwjgl_opengl_WindowsPeerInfo.c
trunk/LWJGL/src/native/windows/org_lwjgl_opengl_Pbuffer.c
trunk/LWJGL/src/native/windows/org_lwjgl_opengl_WindowsContextImplementation.c
trunk/LWJGL/src/native/windows/org_lwjgl_opengl_WindowsPeerInfo.c
trunk/LWJGL/src/templates/org/lwjgl/opengles/AMD_compressed_3DC_texture.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/AMD_compressed_ATC_texture.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/AMD_performance_monitor.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/AMD_program_binary_Z400.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/ANGLE_framebuffer_blit.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/ANGLE_framebuffer_multisample.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/APPLE_framebuffer_multisample.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/APPLE_rgb_422.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/APPLE_texture_format_BGRA8888.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/APPLE_texture_max_level.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/ARB_draw_buffers.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/ARB_half_float_pixel.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/ARB_texture_rectangle.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/ARM_mali_shader_binary.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/ARM_rgba8.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/DMP_shader_binary.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/EXT_Cg_shader.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/EXT_bgra.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/EXT_blend_minmax.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/EXT_discard_framebuffer.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/EXT_frag_depth.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/EXT_multi_draw_arrays.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/EXT_packed_float.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/EXT_read_format_bgra.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/EXT_shader_texture_lod.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/EXT_texture_array.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/EXT_texture_compression_dxt1.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/EXT_texture_compression_latc.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/EXT_texture_compression_s3tc.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/EXT_texture_filter_anisotropic.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/EXT_texture_format_BGRA8888.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/EXT_texture_lod_bias.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/EXT_texture_type_2_10_10_10_REV.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/GLES20.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/IMG_multisamples_render_to_texture.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/IMG_program_binary.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/IMG_shader_binary.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/IMG_texture_compression_pvrtc.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/NV_coverage_sample.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/NV_depth_nonlinear.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/NV_draw_path.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/NV_fbo_color_attachments.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/NV_fence.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/NV_framebuffer_vertex_attrib_array.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/NV_get_tex_image.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/NV_read_buffer.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/NV_shader_framebuffer_fetch.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/NV_system_time.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/OES_EGL_image.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/OES_EGL_image_external.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/OES_EGL_sync.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/OES_blend_equation_separate.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/OES_blend_func_separate.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/OES_blend_subtract.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/OES_compressed_ETC1_RGB8_texture.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/OES_compressed_paletted_texture.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/OES_depth24.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/OES_depth32.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/OES_depth_texture.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/OES_element_index_uint.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/OES_fbo_render_mipmap.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/OES_framebuffer_object.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/OES_get_program_binary.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/OES_mapbuffer.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/OES_packed_depth_stencil.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/OES_rgb8_rgba8.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/OES_standard_derivatives.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/OES_stencil1.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/OES_stencil4.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/OES_stencil8.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/OES_texture_3D.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/OES_texture_float.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/OES_texture_float_linear.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/OES_texture_half_float.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/OES_texture_half_float_linear.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/OES_texture_npot.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/OES_vertex_array_object.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/OES_vertex_half_float.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/OES_vertex_type_10_10_10_2.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/QCOM_driver_control.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/QCOM_extended_get.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/QCOM_extended_get2.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/QCOM_performance_monitor_global_mode.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/QCOM_tiled_rendering.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/QCOM_writeonly_rendering.java
trunk/...
[truncated message content] |
|
From: <riv...@us...> - 2011-07-11 21:46:08
|
Revision: 3568
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3568&view=rev
Author: riven-lwjgl
Date: 2011-07-11 21:46:00 +0000 (Mon, 11 Jul 2011)
Log Message:
-----------
Initial release of mapped objects library (v0.10) in LWJGL.
Added Paths:
-----------
trunk/LWJGL/libs/asm-util.jar
trunk/LWJGL/libs/asm.jar
trunk/LWJGL/src/java/org/lwjgl/util/mapped/
trunk/LWJGL/src/java/org/lwjgl/util/mapped/MappedField.java
trunk/LWJGL/src/java/org/lwjgl/util/mapped/MappedForeach.java
trunk/LWJGL/src/java/org/lwjgl/util/mapped/MappedHelper.java
trunk/LWJGL/src/java/org/lwjgl/util/mapped/MappedObject.java
trunk/LWJGL/src/java/org/lwjgl/util/mapped/MappedObjectClassLoader.java
trunk/LWJGL/src/java/org/lwjgl/util/mapped/MappedObjectTransformer.java
trunk/LWJGL/src/java/org/lwjgl/util/mapped/MappedObjectUnsafe.java
trunk/LWJGL/src/java/org/lwjgl/util/mapped/MappedSet.java
trunk/LWJGL/src/java/org/lwjgl/util/mapped/MappedSet2.java
trunk/LWJGL/src/java/org/lwjgl/util/mapped/MappedSet3.java
trunk/LWJGL/src/java/org/lwjgl/util/mapped/MappedSet4.java
trunk/LWJGL/src/java/org/lwjgl/util/mapped/MappedType.java
Added: trunk/LWJGL/libs/asm-util.jar
===================================================================
(Binary files differ)
Property changes on: trunk/LWJGL/libs/asm-util.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/LWJGL/libs/asm.jar
===================================================================
(Binary files differ)
Property changes on: trunk/LWJGL/libs/asm.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Property changes on: trunk/LWJGL/src/java/org/lwjgl/util/mapped
___________________________________________________________________
Added: bugtraq:number
+ true
Added: trunk/LWJGL/src/java/org/lwjgl/util/mapped/MappedField.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/util/mapped/MappedField.java (rev 0)
+++ trunk/LWJGL/src/java/org/lwjgl/util/mapped/MappedField.java 2011-07-11 21:46:00 UTC (rev 3568)
@@ -0,0 +1,19 @@
+/*
+ * Created on Jun 24, 2011
+ */
+
+package org.lwjgl.util.mapped;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+/**
+ * @author Riven
+ */
+
+@Retention(RetentionPolicy.RUNTIME)
+public @interface MappedField {
+ long byteOffset();
+
+ long byteLength() default -1;
+}
Added: trunk/LWJGL/src/java/org/lwjgl/util/mapped/MappedForeach.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/util/mapped/MappedForeach.java (rev 0)
+++ trunk/LWJGL/src/java/org/lwjgl/util/mapped/MappedForeach.java 2011-07-11 21:46:00 UTC (rev 3568)
@@ -0,0 +1,52 @@
+/*
+ * Created on Jul 4, 2011
+ */
+
+package org.lwjgl.util.mapped;
+
+import java.util.Iterator;
+
+/**
+ * @author Riven
+ */
+
+public class MappedForeach<T extends MappedObject> implements Iterable<T>
+{
+ final T mapped;
+ final int elementCount;
+
+ MappedForeach(T mapped, int elementCount)
+ {
+ this.mapped = mapped;
+ this.elementCount = elementCount;
+ }
+
+ @Override
+ public Iterator<T> iterator()
+ {
+ return new Iterator<T>()
+ {
+ private int index = 0;
+
+ @Override
+ public boolean hasNext()
+ {
+ return this.index < (MappedForeach.this.elementCount);
+ }
+
+ @Override
+ public T next()
+ {
+ mapped.viewAddress = mapped.baseAddress + (this.index++) * mapped.stride;
+
+ return mapped;
+ }
+
+ @Override
+ public void remove()
+ {
+ throw new UnsupportedOperationException();
+ }
+ };
+ }
+}
Added: trunk/LWJGL/src/java/org/lwjgl/util/mapped/MappedHelper.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/util/mapped/MappedHelper.java (rev 0)
+++ trunk/LWJGL/src/java/org/lwjgl/util/mapped/MappedHelper.java 2011-07-11 21:46:00 UTC (rev 3568)
@@ -0,0 +1,181 @@
+/*
+ * Created on Jun 28, 2011
+ */
+
+package org.lwjgl.util.mapped;
+
+import java.nio.ByteBuffer;
+
+/**
+ * @author Riven
+ */
+
+public class MappedHelper
+{
+ public static void setup(MappedObject mo, ByteBuffer buffer, int align, int sizeof)
+ {
+ if (mo.baseAddress != 0L)
+ throw new IllegalStateException("this method should not be called by user-code");
+
+ if (buffer == null)
+ throw new NullPointerException("buffer");
+ if (!buffer.isDirect())
+ throw new IllegalArgumentException("bytebuffer must be direct");
+ mo.preventGC = buffer;
+
+ if (align <= 0)
+ throw new IllegalArgumentException("invalid alignment");
+ mo.align = align;
+
+ if (sizeof % align != 0)
+ throw new IllegalStateException("sizeof not a multiple of alignment");
+ mo.stride = sizeof;
+
+ long addr = MappedObjectUnsafe.getBufferBaseAddress(buffer);
+ if (addr % align != 0)
+ throw new IllegalStateException("buffer address not aligned on " + align + " bytes");
+
+ mo.baseAddress = mo.viewAddress = addr;
+ }
+
+ public static void put_views(MappedSet2 set, int view)
+ {
+ set.view(view);
+ }
+
+ public static void put_views(MappedSet3 set, int view)
+ {
+ set.view(view);
+ }
+
+ public static void put_views(MappedSet4 set, int view)
+ {
+ set.view(view);
+ }
+
+ public static void put_view(MappedObject mapped, int view)
+ {
+ mapped.viewAddress = mapped.baseAddress + view * mapped.stride;
+ }
+
+ public static int get_view(MappedObject mapped)
+ {
+ return (int) (mapped.viewAddress - mapped.baseAddress) / mapped.stride;
+ }
+
+ public static MappedObject dup(MappedObject src, MappedObject dst)
+ {
+ dst.baseAddress = src.baseAddress;
+ dst.viewAddress = src.viewAddress;
+ dst.stride = src.stride;
+ dst.align = src.align;
+ dst.preventGC = src.preventGC;
+ return dst;
+ }
+
+ public static MappedObject slice(MappedObject src, MappedObject dst)
+ {
+ dst.baseAddress = src.viewAddress; // !
+ dst.viewAddress = src.viewAddress;
+ dst.stride = src.stride;
+ dst.align = src.align;
+ dst.preventGC = src.preventGC;
+ return dst;
+ }
+
+ public static void copy(MappedObject src, MappedObject dst, int bytes)
+ {
+ MappedObjectUnsafe.INSTANCE.copyMemory(src.viewAddress, dst.viewAddress, bytes);
+ }
+
+ public static ByteBuffer newBuffer(long address, int capacity)
+ {
+ return MappedObjectUnsafe.newBuffer(address, capacity);
+ }
+
+ // ---- primitive fields read/write
+
+ // byte
+
+ public static void bput(byte value, long addr)
+ {
+ MappedObjectUnsafe.INSTANCE.putByte(addr, value);
+ }
+
+ public static byte bget(long addr)
+ {
+ return MappedObjectUnsafe.INSTANCE.getByte(addr);
+ }
+
+ // short
+
+ public static void sput(short value, long addr)
+ {
+ MappedObjectUnsafe.INSTANCE.putShort(addr, value);
+ }
+
+ public static short sget(long addr)
+ {
+ return MappedObjectUnsafe.INSTANCE.getShort(addr);
+ }
+
+ // char
+
+ public static void cput(char value, long addr)
+ {
+ MappedObjectUnsafe.INSTANCE.putChar(addr, value);
+ }
+
+ public static char cget(long addr)
+ {
+ return MappedObjectUnsafe.INSTANCE.getChar(addr);
+ }
+
+ // int
+
+ public static void iput(int value, long addr)
+ {
+ MappedObjectUnsafe.INSTANCE.putInt(addr, value);
+ }
+
+ public static int iget(long addr)
+ {
+ return MappedObjectUnsafe.INSTANCE.getInt(addr);
+ }
+
+ // float
+
+ public static void fput(float value, long addr)
+ {
+ MappedObjectUnsafe.INSTANCE.putFloat(addr, value);
+ }
+
+ public static float fget(long addr)
+ {
+ return MappedObjectUnsafe.INSTANCE.getFloat(addr);
+ }
+
+ // long
+
+ public static void jput(long value, long addr)
+ {
+ MappedObjectUnsafe.INSTANCE.putLong(addr, value);
+ }
+
+ public static long jget(long addr)
+ {
+ return MappedObjectUnsafe.INSTANCE.getLong(addr);
+ }
+
+ // double
+
+ public static void dput(double value, long addr)
+ {
+ MappedObjectUnsafe.INSTANCE.putDouble(addr, value);
+ }
+
+ public static double dget(long addr)
+ {
+ return MappedObjectUnsafe.INSTANCE.getDouble(addr);
+ }
+}
\ No newline at end of file
Added: trunk/LWJGL/src/java/org/lwjgl/util/mapped/MappedObject.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/util/mapped/MappedObject.java (rev 0)
+++ trunk/LWJGL/src/java/org/lwjgl/util/mapped/MappedObject.java 2011-07-11 21:46:00 UTC (rev 3568)
@@ -0,0 +1,185 @@
+/*
+ * Created on Jun 25, 2011
+ */
+
+package org.lwjgl.util.mapped;
+
+import java.nio.ByteBuffer;
+
+/**
+ * @author Riven
+ */
+
+public class MappedObject
+{
+ public MappedObject()
+ {
+ //
+ }
+
+ // these fields are not assignable/writable by user-code
+ public long baseAddress;
+ public long viewAddress;
+ public int stride;
+ public int align;
+
+ /**
+ * Holds the value of sizeof of the sub-type of this MappedObject<br>
+ * <br>
+ * The behavior of this (transformed) method does not follow the normal Java behavior.<br>
+ * <code>Vec2.SIZEOF</code> will yield 8 (2 floats)<br>
+ * <code>Vec3.SIZEOF</code> will yield 12 (3 floats)<br>
+ * This (required) notation might cause compiler warnings, which can be suppressed with @SuppressWarnings("static-access").<br>
+ * Using Java 5.0's static-import on this method will break functionality.
+ */
+
+ // any method that calls these field will have its call-site modified
+ public static int SIZEOF = -1; // 'final' per subtype
+ public int view; // read/write
+
+ public final void next()
+ {
+ this.viewAddress += this.stride;
+ }
+
+ /**
+ * Creates a MappedObject instance, mapping the memory region of the specified direct ByteBuffer.<br>
+ * <br>
+ * The behavior of this (transformed) method does not follow the normal Java behavior.<br>
+ * <code>Vec2.map(buffer)</code> will return a mapped Vec2 instance.<br>
+ * <code>Vec3.map(buffer)</code> will return a mapped Vec3 instance.<br>
+ * This (required) notation might cause compiler warnings, which can be suppressed with @SuppressWarnings("static-access").<br>
+ * Using Java 5.0's static-import on this method will break functionality.
+ */
+
+ @SuppressWarnings("unused")
+ public static <T extends MappedObject> T map(ByteBuffer bb)
+ {
+ // any method that calls this method will have its call-site modified
+ throw new InternalError("type not registered");
+ }
+
+ @SuppressWarnings("unused")
+ public static <T extends MappedObject> T map(long address, int capacity)
+ {
+ // any method that calls this method will have its call-site modified
+ throw new InternalError("type not registered");
+ }
+
+ /**
+ * Creates a MappedObject instance, mapping the memory region of an allocated direct ByteBuffer with a capacity of <code>elementCount*SIZEOF</code>
+ * <br>
+ * The behavior of this (transformed) method does not follow the normal Java behavior.<br>
+ * <code>Vec2.malloc(int)</code> will return a mapped Vec2 instance.<br>
+ * <code>Vec3.malloc(int)</code> will return a mapped Vec3 instance.<br>
+ * This (required) notation might cause compiler warnings, which can be suppressed with @SuppressWarnings("static-access").<br>
+ * Using Java 5.0's static-import on this method will break functionality.
+ */
+
+ @SuppressWarnings("unused")
+ public static <T extends MappedObject> T malloc(int elementCount)
+ {
+ // any method that calls this method will have its call-site modified
+ throw new InternalError("type not registered");
+ }
+
+ /**
+ * Creates an identical new MappedObject instance, comparable to the
+ * contract of ByteBuffer.duplicate()
+ */
+
+ public final <T extends MappedObject> T dup()
+ {
+ // any method that calls this method will have its call-site modified
+ throw new InternalError("type not registered");
+ }
+
+ /**
+ * Creates a new MappedObject instance, with a base offset equal to
+ * the offset of the current view, comparable to the contract of ByteBuffer.slice()
+ */
+
+ public final <T extends MappedObject> T slice()
+ {
+ // any method that calls this method will have its call-site modified
+ throw new InternalError("type not registered");
+ }
+
+ public final <T extends MappedObject> void runViewConstructor()
+ {
+ // any method that calls this method will have its call-site modified
+ throw new InternalError("type not registered");
+ }
+
+ /**
+ * Copies and amount of <code>SIZEOF</code> bytes, from the current
+ * mapped object, to the specified mapped object.
+ */
+
+ @SuppressWarnings("unused")
+ public final <T extends MappedObject> void copyTo(T target)
+ {
+ // any method that calls this method will have its call-site modified
+ throw new InternalError("type not registered");
+ }
+
+ /**
+ * Copies and amount of <code>SIZEOF*instances<c/ode> bytes, from the
+ * current mapped object, to the specified mapped object.
+ */
+
+ @SuppressWarnings("unused")
+ public final <T extends MappedObject> void copyRange(T target, int instances)
+ {
+ // any method that calls this method will have its call-site modified
+ throw new InternalError("type not registered");
+ }
+
+ /**
+ * Creates an Iterable<MappedObject> that will step through
+ * <code>elementCount</code> views, leaving the <code>view</code> at
+ * the last valid value.<br>
+ * <br>
+ * For convenience you are encouraged to static-import this specific method:
+ * <code>import static org.lwjgl.util.mapped.MappedObject.foreach;</code>
+ */
+
+ public static <T extends MappedObject> MappedForeach<T> foreach(T mapped, int elementCount)
+ {
+ return new MappedForeach<T>(mapped, elementCount);
+ }
+
+ /**
+ * Configures a newly initiated mapped object with the specified stride and offset.
+ * @throws IllegalStateException if view is not at index 0
+ */
+
+ public static final <T extends MappedObject> T configure(T mapped, int stride, int offset)
+ {
+ if (mapped.baseAddress != mapped.viewAddress)
+ throw new IllegalStateException("view must be zero");
+
+ if (offset < 0)
+ throw new IllegalStateException("offset must not be negative: " + offset);
+ if (offset % mapped.align != 0)
+ throw new IllegalStateException("offset not a multiple of alignment: " + offset);
+
+ if (stride < mapped.stride)
+ throw new IllegalStateException("new stride must not be smaller than current stride: " + stride);
+ if (stride % mapped.align != 0)
+ throw new IllegalStateException("stride not a multiple of alignment: " + stride);
+
+ mapped.baseAddress += offset;
+ mapped.viewAddress += offset;
+ mapped.stride = stride;
+
+ return mapped;
+ }
+
+ ByteBuffer preventGC;
+
+ public ByteBuffer backingByteBuffer()
+ {
+ return this.preventGC;
+ }
+}
Added: trunk/LWJGL/src/java/org/lwjgl/util/mapped/MappedObjectClassLoader.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/util/mapped/MappedObjectClassLoader.java (rev 0)
+++ trunk/LWJGL/src/java/org/lwjgl/util/mapped/MappedObjectClassLoader.java 2011-07-11 21:46:00 UTC (rev 3568)
@@ -0,0 +1,136 @@
+/*
+ * Created on Jun 24, 2011
+ */
+
+package org.lwjgl.util.mapped;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.net.URLClassLoader;
+import java.util.Arrays;
+
+/**
+ * @author Riven
+ */
+
+public class MappedObjectClassLoader extends URLClassLoader
+{
+ static final String MAPPEDOBJECT_PACKAGE_PREFIX;
+
+ static
+ {
+ MAPPEDOBJECT_PACKAGE_PREFIX = MappedObjectClassLoader.class.getPackage().getName() + ".";
+ }
+
+ static boolean FORKED = false;
+
+ public static boolean fork(Class< ? > mainClass, String[] args)
+ {
+ if (FORKED)
+ {
+ return false;
+ }
+
+ FORKED = true;
+
+ try
+ {
+ URLClassLoader loader = new MappedObjectClassLoader(mainClass);
+ Class< ? > replacedMainClass = loader.loadClass(mainClass.getName());
+ Method mainMethod = replacedMainClass.getMethod("main", String[].class);
+ mainMethod.invoke(null, new Object[] { args });
+ }
+ catch (InvocationTargetException exc)
+ {
+ Thread.currentThread().getUncaughtExceptionHandler().uncaughtException(Thread.currentThread(), exc.getCause());
+ }
+ catch (Throwable cause)
+ {
+ throw new Error("failed to fork", cause);
+ }
+
+ return true;
+ }
+
+ private MappedObjectClassLoader(Class< ? > mainClass)
+ {
+ super(((URLClassLoader) mainClass.getClassLoader()).getURLs());
+ }
+
+ private static long total_time_transforming;
+
+ @Override
+ protected synchronized Class< ? > loadClass(String name, boolean resolve) throws ClassNotFoundException
+ {
+ if (name.startsWith("java."))
+ return super.loadClass(name, resolve);
+ if (name.startsWith("javax."))
+ return super.loadClass(name, resolve);
+
+ if (name.startsWith("sun."))
+ return super.loadClass(name, resolve);
+ if (name.startsWith("sunw."))
+ return super.loadClass(name, resolve);
+
+ // never transform classes in this very package, sub-packages should be transformed
+ if (name.startsWith(MAPPEDOBJECT_PACKAGE_PREFIX))
+ if (name.substring(MAPPEDOBJECT_PACKAGE_PREFIX.length()).indexOf('.') == -1)
+ return super.loadClass(name, resolve);
+
+ String className = name.replace('.', '/');
+
+ if (MappedObjectTransformer.PRINT_ACTIVITY)
+ System.out.println(MappedObjectClassLoader.class.getSimpleName() + ": " + className);
+
+ byte[] bytecode = readStream(this.getResourceAsStream(className.concat(".class")));
+
+ long t0 = System.nanoTime();
+ bytecode = MappedObjectTransformer.transformFieldAccess(className, bytecode);
+ long t1 = System.nanoTime();
+ total_time_transforming += (t1 - t0);
+
+ if (MappedObjectTransformer.PRINT_TIMING)
+ System.out.println("transforming " + className + " took " + (t1 - t0) / 1000 + " micros (total: " + (total_time_transforming / 1000 / 1000) + "ms)");
+
+ Class< ? > clazz = super.defineClass(name, bytecode, 0, bytecode.length);
+ if (resolve)
+ resolveClass(clazz);
+ return clazz;
+ }
+
+ static byte[] readStream(InputStream in)
+ {
+ byte[] bytecode = new byte[256];
+ int len = 0;
+ try
+ {
+ while (true)
+ {
+ if (bytecode.length == len)
+ bytecode = Arrays.copyOf(bytecode, len * 2);
+ int got = in.read(bytecode, len, bytecode.length - len);
+ if (got == -1)
+ break;
+ len += got;
+ }
+ }
+ catch (IOException exc)
+ {
+ // stop!
+ }
+ finally
+ {
+ try
+ {
+ in.close();
+ }
+ catch (IOException exc)
+ {
+ // ignore...
+ }
+ }
+ return Arrays.copyOf(bytecode, len);
+ }
+}
Added: trunk/LWJGL/src/java/org/lwjgl/util/mapped/MappedObjectTransformer.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/util/mapped/MappedObjectTransformer.java (rev 0)
+++ trunk/LWJGL/src/java/org/lwjgl/util/mapped/MappedObjectTransformer.java 2011-07-11 21:46:00 UTC (rev 3568)
@@ -0,0 +1,588 @@
+/*
+ * Created on Jun 23, 2011
+ */
+
+package org.lwjgl.util.mapped;
+
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.lang.reflect.Field;
+import java.lang.reflect.Modifier;
+import java.nio.ByteBuffer;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.objectweb.asm.*;
+import org.objectweb.asm.util.TraceClassVisitor;
+import static org.objectweb.asm.Opcodes.*;
+
+/**
+ * @author Riven
+ */
+
+public class MappedObjectTransformer
+{
+ static final boolean PRINT_TIMING = true;
+ static final boolean PRINT_ACTIVITY = false;
+ static final boolean PRINT_BYTECODE = false;
+ static final Map<String, MappedSubtypeInfo> className_to_subtype;
+
+ static
+ {
+ className_to_subtype = new HashMap<String, MappedSubtypeInfo>();
+
+ {
+ // HACK: required for mapped.view++
+ //
+ // because the compiler generates:
+ // => GETFIELD MappedObject.view
+ // => ICONST_1
+ // => IADD
+ // => PUTFIELD MyMappedType.view
+ //
+ // instead of:
+ // => GETFIELD MyMappedType.view
+ // => ICONST_1
+ // => IADD
+ // => PUTFIELD MyMappedType.view
+ //
+ MappedSubtypeInfo info = new MappedSubtypeInfo(jvmClassName(MappedObject.class), -1, -1);
+ className_to_subtype.put(info.className, info);
+ }
+
+ String vmName = System.getProperty("java.vm.name");
+ if (vmName != null && !vmName.contains("Server"))
+ {
+ System.err.println("Warning: " + MappedObject.class.getSimpleName() + "s have inferiour performance on Client VMs, please consider switching to a Server VM.");
+ }
+ }
+
+ public static void register(Class< ? > type)
+ {
+ if (MappedObjectClassLoader.FORKED)
+ return;
+
+ MappedType mapped = type.getAnnotation(MappedType.class);
+ if (mapped == null)
+ throw new InternalError("missing " + MappedType.class.getName() + " annotation");
+
+ String className = jvmClassName(type);
+
+ MappedSubtypeInfo mappedType = new MappedSubtypeInfo(className, mapped.sizeof(), mapped.align());
+
+ int advancingOffset = 0;
+
+ for (Field field : type.getDeclaredFields())
+ {
+ // static fields are never mapped
+ if ((field.getModifiers() & Modifier.STATIC) != 0)
+ continue;
+
+ // we only support primitives and ByteBuffers
+ if (!field.getType().isPrimitive() && field.getType() != ByteBuffer.class)
+ throw new InternalError("field '" + className + "." + field.getName() + "' not supported: " + field.getType());
+
+ MappedField meta = field.getAnnotation(MappedField.class);
+ if (meta == null && !mapped.autoGenerateOffsets())
+ throw new InternalError("field '" + className + "." + field.getName() + "' missing annotation " + MappedField.class.getName() + ": " + className);
+
+ // quick hack
+ long byteOffset = meta == null ? advancingOffset : meta.byteOffset();
+ long byteLength;
+ if (field.getType() == long.class || field.getType() == double.class)
+ byteLength = 8;
+ else if (field.getType() == int.class || field.getType() == float.class)
+ byteLength = 4;
+ else if (field.getType() == char.class || field.getType() == short.class)
+ byteLength = 2;
+ else if (field.getType() == byte.class)
+ byteLength = 1;
+ else if (field.getType() == ByteBuffer.class)
+ byteLength = meta.byteLength();
+ else
+ throw new IllegalStateException(field.getType().getName());
+
+ if (field.getType() != ByteBuffer.class)
+ if ((advancingOffset % byteLength) != 0)
+ throw new IllegalStateException("misaligned mapped type: " + className + "." + field.getName());
+
+ if (PRINT_ACTIVITY)
+ System.out.println(MappedObjectTransformer.class.getSimpleName() + ": " + className + "." + field.getName() + " [type=" + field.getType().getSimpleName() + ", offset=" + byteOffset + "]");
+
+ mappedType.fieldToOffset.put(field.getName(), Long.valueOf(byteOffset));
+ mappedType.fieldToLength.put(field.getName(), Long.valueOf(byteLength));
+
+ advancingOffset += byteLength;
+ }
+
+ if (className_to_subtype.put(className, mappedType) != null)
+ {
+ throw new InternalError("duplicate mapped type: " + className);
+ }
+ }
+
+ public static final String view_constructor_method = "_construct_view_";
+
+ public static byte[] transformFieldAccess(final String className, byte[] bytecode)
+ {
+ int flags = ClassWriter.COMPUTE_FRAMES;
+
+ ClassWriter writer = new ClassWriter(flags);
+
+ ClassAdapter adapter = new ClassAdapter(writer)
+ {
+ @Override
+ public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions)
+ {
+ {
+ MappedSubtypeInfo mappedSubtype = className_to_subtype.get(className);
+
+ if (mappedSubtype != null && !mappedSubtype.className.equals(jvmClassName(MappedObject.class)))
+ {
+ if (name.equals("<init>"))
+ {
+ if (!desc.equals("()V"))
+ throw new IllegalStateException(className + " can only have a default constructor, found: " + desc);
+
+ MethodVisitor mv = super.visitMethod(access, name, desc, signature, exceptions);
+ mv.visitCode();
+ mv.visitVarInsn(ALOAD, 0);
+ mv.visitMethodInsn(INVOKESPECIAL, jvmClassName(MappedObject.class), "<init>", "()V");
+ mv.visitInsn(RETURN);
+ mv.visitMaxs(1, 1);
+ mv.visitEnd();
+
+ // put the method body in another method
+ name = view_constructor_method;
+ }
+ }
+ }
+
+ return new MappedInstanceMethodAdapter(className, name, desc, super.visitMethod(access, name, desc, signature, exceptions));
+ }
+
+ @Override
+ public FieldVisitor visitField(int access, String fieldName, String typeName, String dunno, Object value)
+ {
+ // remove redirected fields
+ MappedSubtypeInfo mappedSubtype = className_to_subtype.get(className);
+
+ if (mappedSubtype != null && mappedSubtype.fieldToOffset.containsKey(fieldName))
+ {
+ if (PRINT_ACTIVITY)
+ System.out.println(MappedObjectTransformer.class.getSimpleName() + ": discarding field: " + className + "." + fieldName + ":" + typeName);
+ return null;
+ }
+
+ return super.visitField(access, fieldName, typeName, dunno, value);
+ }
+ };
+
+ new ClassReader(bytecode).accept(adapter, 0);
+ bytecode = writer.toByteArray();
+
+ if (PRINT_BYTECODE)
+ printBytecode(bytecode, adapter);
+
+ return bytecode;
+ }
+
+ static void printBytecode(byte[] bytecode, ClassAdapter adapter)
+ {
+ StringWriter sw = new StringWriter();
+ ClassVisitor tracer = new TraceClassVisitor(adapter, new PrintWriter(sw));
+ new ClassReader(bytecode).accept(tracer, 0);
+ String dump = sw.toString();
+
+ System.out.println(dump);
+ }
+
+ static void throwException0(MethodVisitor visitor, Class< ? > type, String msg)
+ {
+ String errorType = jvmClassName(type);
+
+ visitor.visitTypeInsn(NEW, errorType);
+ visitor.visitInsn(DUP);
+ visitor.visitLdcInsn(msg);
+ visitor.visitMethodInsn(INVOKESPECIAL, errorType, "<init>", "(Ljava/lang/String;)V");
+ visitor.visitInsn(ATHROW);
+ }
+
+ static class MappedInstanceMethodAdapter extends MethodAdapter
+ {
+ private final String className;
+ private final String methodName;
+ private final String descr;
+
+ public MappedInstanceMethodAdapter(String className, String methodName, String descr, MethodVisitor backing)
+ {
+ super(backing);
+ this.className = className;
+ this.methodName = methodName;
+ this.descr = descr;
+ }
+
+ @Override
+ public void visitTypeInsn(int opcode, String typeName)
+ {
+ if (opcode == NEW && className_to_subtype.containsKey(typeName))
+ {
+ throw new IllegalAccessError("must not manually create instances of " + typeName + " in method " + this.className + "." + this.methodName + this.descr);
+ }
+
+ super.visitTypeInsn(opcode, typeName);
+ }
+
+ @Override
+ public void visitMethodInsn(int opcode, String className, String methodName, String signature)
+ {
+ if (opcode == INVOKESPECIAL && className.equals(jvmClassName(MappedObject.class)) && methodName.equals("<init>") && signature.equals("()V"))
+ {
+ // stack: instance
+ visitInsn(POP);
+ // stack: -
+ return;
+ }
+
+ for (MappedSubtypeInfo mappedType : className_to_subtype.values())
+ {
+ boolean isMapDirectMethod = (opcode == INVOKESTATIC && methodName.equals("map") && className.equals(mappedType.className) && signature.equals("(JI)L" + jvmClassName(MappedObject.class) + ";"));
+ boolean isMapBufferMethod = (opcode == INVOKESTATIC && methodName.equals("map") && className.equals(mappedType.className) && signature.equals("(Ljava/nio/ByteBuffer;)L" + jvmClassName(MappedObject.class) + ";"));
+ boolean isMallocMethod = (opcode == INVOKESTATIC && methodName.equals("malloc") && className.equals(mappedType.className) && signature.equals("(I)L" + jvmClassName(MappedObjec...
[truncated message content] |
|
From: <sp...@us...> - 2011-07-12 15:36:22
|
Revision: 3574
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3574&view=rev
Author: spasi
Date: 2011-07-12 15:36:16 +0000 (Tue, 12 Jul 2011)
Log Message:
-----------
Added GLES classes on which Display depends to the main jar.
Modified Paths:
--------------
trunk/LWJGL/build.xml
trunk/LWJGL/src/java/org/lwjgl/opengl/DrawableGL.java
trunk/LWJGL/src/java/org/lwjgl/opengl/DrawableGLES.java
trunk/LWJGL/src/java/org/lwjgl/opengl/DrawableLWJGL.java
trunk/LWJGL/src/java/org/lwjgl/opengl/PixelFormatLWJGL.java
Modified: trunk/LWJGL/build.xml
===================================================================
--- trunk/LWJGL/build.xml 2011-07-12 14:21:29 UTC (rev 3573)
+++ trunk/LWJGL/build.xml 2011-07-12 15:36:16 UTC (rev 3574)
@@ -143,6 +143,12 @@
<!-- Create lwjgl.jar -->
<jar destfile="${lwjgl.temp}/jar/lwjgl.jar" taskname="lwjgl.jar">
<fileset refid="lwjgl.fileset" />
+ <fileset dir="${lwjgl.bin}"> <!-- Display has a dependency on these -->
+ <patternset>
+ <include name="org/lwjgl/opengles/ContextAttribs.*"/>
+ <include name="org/lwjgl/opengles/PixelFormat.*"/>
+ </patternset>
+ </fileset>
<manifest>
<attribute name="Sealed" value="true"/>
</manifest>
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/DrawableGL.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/DrawableGL.java 2011-07-12 14:21:29 UTC (rev 3573)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/DrawableGL.java 2011-07-12 15:36:16 UTC (rev 3574)
@@ -1,3 +1,34 @@
+/*
+ * Copyright (c) 2002-2011 LWJGL Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * * Neither the name of 'LWJGL' nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
package org.lwjgl.opengl;
import org.lwjgl.LWJGLException;
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/DrawableGLES.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/DrawableGLES.java 2011-07-12 14:21:29 UTC (rev 3573)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/DrawableGLES.java 2011-07-12 15:36:16 UTC (rev 3574)
@@ -1,3 +1,34 @@
+/*
+ * Copyright (c) 2002-2011 LWJGL Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * * Neither the name of 'LWJGL' nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
package org.lwjgl.opengl;
import org.lwjgl.LWJGLException;
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/DrawableLWJGL.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/DrawableLWJGL.java 2011-07-12 14:21:29 UTC (rev 3573)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/DrawableLWJGL.java 2011-07-12 15:36:16 UTC (rev 3574)
@@ -1,3 +1,34 @@
+/*
+ * Copyright (c) 2002-2011 LWJGL Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * * Neither the name of 'LWJGL' nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
package org.lwjgl.opengl;
import org.lwjgl.LWJGLException;
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/PixelFormatLWJGL.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/PixelFormatLWJGL.java 2011-07-12 14:21:29 UTC (rev 3573)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/PixelFormatLWJGL.java 2011-07-12 15:36:16 UTC (rev 3574)
@@ -1,3 +1,34 @@
+/*
+ * Copyright (c) 2002-2011 LWJGL Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * * Neither the name of 'LWJGL' nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
package org.lwjgl.opengl;
/**
@@ -4,7 +35,6 @@
* [INTERNAL USE ONLY]
*
* @author Spasi
- * @since 15/5/2011
*/
public interface PixelFormatLWJGL {
// Marker interface
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sp...@us...> - 2011-07-22 02:02:05
|
Revision: 3597
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3597&view=rev
Author: spasi
Date: 2011-07-22 02:01:56 +0000 (Fri, 22 Jul 2011)
Log Message:
-----------
Added support for array access to mapped objects.
Added SpriteShootout test that uses mapped objects.
Modified Paths:
--------------
trunk/LWJGL/build.xml
trunk/LWJGL/src/java/org/lwjgl/test/mapped/MappedObjectBench.java
trunk/LWJGL/src/java/org/lwjgl/test/mapped/MappedObjectTests1.java
trunk/LWJGL/src/java/org/lwjgl/test/mapped/MappedObjectTests3.java
trunk/LWJGL/src/java/org/lwjgl/test/mapped/TestMappedObject.java
trunk/LWJGL/src/java/org/lwjgl/util/mapped/MappedHelper.java
trunk/LWJGL/src/java/org/lwjgl/util/mapped/MappedObject.java
trunk/LWJGL/src/java/org/lwjgl/util/mapped/MappedObjectClassLoader.java
trunk/LWJGL/src/java/org/lwjgl/util/mapped/MappedObjectTransformer.java
trunk/LWJGL/src/java/org/lwjgl/util/mapped/MappedObjectUnsafe.java
trunk/LWJGL/src/java/org/lwjgl/util/mapped/MappedSet2.java
trunk/LWJGL/src/java/org/lwjgl/util/mapped/MappedSet3.java
trunk/LWJGL/src/java/org/lwjgl/util/mapped/MappedSet4.java
Added Paths:
-----------
trunk/LWJGL/libs/asm-debug-all.jar
trunk/LWJGL/src/java/org/lwjgl/test/mapped/MappedObjectTests4.java
trunk/LWJGL/src/java/org/lwjgl/test/opengl/sprites/SpriteShootoutMapped.java
Removed Paths:
-------------
trunk/LWJGL/libs/asm-util.jar
trunk/LWJGL/libs/asm.jar
Modified: trunk/LWJGL/build.xml
===================================================================
--- trunk/LWJGL/build.xml 2011-07-21 22:52:16 UTC (rev 3596)
+++ trunk/LWJGL/build.xml 2011-07-22 02:01:56 UTC (rev 3597)
@@ -410,7 +410,7 @@
<!-- Compiles the Java source code -->
<target name="compile" description="Compiles the java source code" depends="-initialize">
- <javac debug="yes" destdir="${lwjgl.bin}" source="1.5" target="1.5" classpath="${lwjgl.lib}/jinput.jar:${lwjgl.lib}/AppleJavaExtensions.jar;${lwjgl.lib}/asm.jar;${lwjgl.lib}/asm-util.jar" taskname="core">
+ <javac debug="yes" destdir="${lwjgl.bin}" source="1.5" target="1.5" classpath="${lwjgl.lib}/jinput.jar:${lwjgl.lib}/AppleJavaExtensions.jar:${lwjgl.lib}/asm-debug-all.jar" taskname="core">
<!--<compilerarg value="-Xlint:unchecked"/>-->
<src path="${lwjgl.src}/java/"/>
<src path="${lwjgl.src}/generated/"/>
Added: trunk/LWJGL/libs/asm-debug-all.jar
===================================================================
(Binary files differ)
Property changes on: trunk/LWJGL/libs/asm-debug-all.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Deleted: trunk/LWJGL/libs/asm-util.jar
===================================================================
(Binary files differ)
Deleted: trunk/LWJGL/libs/asm.jar
===================================================================
(Binary files differ)
Modified: trunk/LWJGL/src/java/org/lwjgl/test/mapped/MappedObjectBench.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/test/mapped/MappedObjectBench.java 2011-07-21 22:52:16 UTC (rev 3596)
+++ trunk/LWJGL/src/java/org/lwjgl/test/mapped/MappedObjectBench.java 2011-07-22 02:01:56 UTC (rev 3597)
@@ -31,6 +31,7 @@
*/
package org.lwjgl.test.mapped;
+import org.lwjgl.MemoryUtil;
import org.lwjgl.util.mapped.MappedObjectUnsafe;
import java.nio.ByteBuffer;
@@ -212,7 +213,7 @@
final int iterations = 64 * 1024;
ByteBuffer bb = ByteBuffer.allocateDirect(200);
- long addr = MappedObjectUnsafe.getBufferBaseAddress(bb);
+ long addr = MemoryUtil.getAddress(bb);
long[] took = new long[runs];
for ( int run = 0; run < runs; run++ ) {
Modified: trunk/LWJGL/src/java/org/lwjgl/test/mapped/MappedObjectTests1.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/test/mapped/MappedObjectTests1.java 2011-07-21 22:52:16 UTC (rev 3596)
+++ trunk/LWJGL/src/java/org/lwjgl/test/mapped/MappedObjectTests1.java 2011-07-22 02:01:56 UTC (rev 3597)
@@ -31,6 +31,7 @@
*/
package org.lwjgl.test.mapped;
+import org.lwjgl.MemoryUtil;
import org.lwjgl.util.mapped.MappedHelper;
import org.lwjgl.util.mapped.MappedObjectUnsafe;
@@ -143,9 +144,9 @@
// test newBuffer
{
- long addr1 = MappedObjectUnsafe.getBufferBaseAddress(bb);
+ long addr1 = MemoryUtil.getAddress(bb);
ByteBuffer bb2 = MappedHelper.newBuffer(addr1, bb.capacity());
- long addr2 = MappedObjectUnsafe.getBufferBaseAddress(bb);
+ long addr2 = MemoryUtil.getAddress(bb);
System.out.println(bb);
System.out.println(bb2);
Modified: trunk/LWJGL/src/java/org/lwjgl/test/mapped/MappedObjectTests3.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/test/mapped/MappedObjectTests3.java 2011-07-21 22:52:16 UTC (rev 3596)
+++ trunk/LWJGL/src/java/org/lwjgl/test/mapped/MappedObjectTests3.java 2011-07-22 02:01:56 UTC (rev 3597)
@@ -31,7 +31,11 @@
*/
package org.lwjgl.test.mapped;
-import org.lwjgl.util.mapped.*;
+import org.lwjgl.MemoryUtil;
+import org.lwjgl.util.mapped.MappedObject;
+import org.lwjgl.util.mapped.MappedSet;
+import org.lwjgl.util.mapped.MappedSet2;
+import org.lwjgl.util.mapped.MappedType;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
@@ -49,10 +53,10 @@
assert (some.data != some.data);
- long addr1 = MappedObjectUnsafe.getBufferBaseAddress(some.backingByteBuffer());
+ long addr1 = MemoryUtil.getAddress(some.backingByteBuffer());
ByteBuffer mapped = some.data; // creates new ByteBuffer instance
- long addr2 = MappedObjectUnsafe.getBufferBaseAddress(mapped);
+ long addr2 = MemoryUtil.getAddress(mapped);
assert (addr2 - addr1 == 4);
assert (mapped.capacity() == MappedSomething.SIZEOF - 4);
@@ -60,7 +64,7 @@
some.view++;
mapped = some.data; // creates new ByteBuffer instance
- long addr3 = MappedObjectUnsafe.getBufferBaseAddress(mapped);
+ long addr3 = MemoryUtil.getAddress(mapped);
assert (addr3 - addr1 == 4 + MappedSomething.SIZEOF);
assert (addr3 - addr2 == 0 + MappedSomething.SIZEOF);
assert (mapped.capacity() == MappedSomething.SIZEOF - 4);
@@ -87,7 +91,7 @@
static void testConstructor() {
int capacity = 1024;
ByteBuffer bb = ByteBuffer.allocateDirect(capacity).order(ByteOrder.nativeOrder());
- long address = MappedObjectUnsafe.getBufferBaseAddress(bb);
+ long address = MemoryUtil.getAddress(bb);
MappedFloat mf = MappedFloat.map(address, capacity);
Added: trunk/LWJGL/src/java/org/lwjgl/test/mapped/MappedObjectTests4.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/test/mapped/MappedObjectTests4.java (rev 0)
+++ trunk/LWJGL/src/java/org/lwjgl/test/mapped/MappedObjectTests4.java 2011-07-22 02:01:56 UTC (rev 3597)
@@ -0,0 +1,115 @@
+/*
+ * Copyright (c) 2002-2011 LWJGL Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * * Neither the name of 'LWJGL' nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package org.lwjgl.test.mapped;
+
+import org.lwjgl.MemoryUtil;
+import org.lwjgl.opengl.Display;
+
+import java.io.File;
+import java.nio.ByteBuffer;
+
+/** @author Riven */
+@SuppressWarnings("static-access")
+public class MappedObjectTests4 {
+
+ public static void testLWJGL() throws Exception {
+ System.out.println(new File(System.getProperty("java.library.path")).getCanonicalPath());
+ Display.create();
+ }
+
+ public static void testLocalView() {
+ MappedFloat mapped1 = MappedFloat.malloc(5);
+ MappedFloat mapped2 = MappedFloat.malloc(5);
+
+ testLocalView(mapped1);
+ testLocalView(mapped1, mapped2);
+
+ MappedSomething some = MappedSomething.malloc(5);
+ testLocalView(some);
+ }
+
+ private static void testLocalView(MappedFloat mapped1) {
+ final MappedFloat[] array = mapped1.asArray();
+
+ assert (array.length == 5);
+
+ int l = 10 * array.length;
+ for ( int localView1 = 0; localView1 < 5; localView1++ ) {
+ array[localView1].value = localView1 * 5;
+ array[localView1].value *= 2.0f;
+ }
+ System.out.println();
+ float x = 0.0f;
+ for ( int localView1 = 0; localView1 < 5; localView1++ ) {
+ System.out.println("[" + localView1 + "] =>" + array[localView1].value);
+ x += array[localView1].value;
+ }
+ System.out.println("x = " + x);
+ }
+
+ private static void testLocalView(MappedFloat mo1, MappedFloat mo2) {
+ final MappedFloat[] array1 = mo1.<MappedFloat>asArray();
+ for ( int v1 = 0; v1 < 5; v1++ ) {
+ array1[v1].value = (float)Math.random();
+ array1[v1].value *= 2.0f;
+ }
+ final MappedFloat[] array2 = mo2.<MappedFloat>asArray();
+ for ( int v2 = 0; v2 < 5; v2++ ) {
+ array2[v2].value = (float)Math.random();
+ array2[v2].value *= 2.0f;
+ }
+
+ System.out.println();
+
+ for ( int v1 = 0; v1 < 5; v1++ ) {
+ System.out.println("[" + v1 + "] =>" + array1[v1].value);
+ }
+ for ( int v2 = 0; v2 < 5; v2++ ) {
+ System.out.println("[" + v2 + "] =>" + array2[v2].value);
+ }
+ }
+
+ private static void testLocalView(MappedSomething some) {
+ final MappedSomething[] array = some.asArray();
+
+ assert (array.length == 5);
+
+ final long baseAddress = MemoryUtil.getAddress(some.backingByteBuffer());
+ for ( int i = 0; i < array.length; i++ ) {
+ ByteBuffer data = array[i].data;
+
+ assert (data.capacity() == (64 - 4));
+ assert (MemoryUtil.getAddress(data) == baseAddress + i * MappedSomething.SIZEOF + 4);
+ }
+ }
+
+}
\ No newline at end of file
Modified: trunk/LWJGL/src/java/org/lwjgl/test/mapped/TestMappedObject.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/test/mapped/TestMappedObject.java 2011-07-21 22:52:16 UTC (rev 3596)
+++ trunk/LWJGL/src/java/org/lwjgl/test/mapped/TestMappedObject.java 2011-07-22 02:01:56 UTC (rev 3597)
@@ -71,6 +71,11 @@
MappedObjectTests3.testConstructor();
MappedObjectTests3.testMappedSet();
+ MappedObjectTests4.testLocalView();
+
+ //MappedObjectTests4.testLWJGL();
+
+
System.out.println("done");
}
Added: trunk/LWJGL/src/java/org/lwjgl/test/opengl/sprites/SpriteShootoutMapped.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/test/opengl/sprites/SpriteShootoutMapped.java (rev 0)
+++ trunk/LWJGL/src/java/org/lwjgl/test/opengl/sprites/SpriteShootoutMapped.java 2011-07-22 02:01:56 UTC (rev 3597)
@@ -0,0 +1,831 @@
+/*
+ * Copyright (c) 2002-2011 LWJGL Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * * Neither the name of 'LWJGL' nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package org.lwjgl.test.opengl.sprites;
+
+import org.lwjgl.BufferUtils;
+import org.lwjgl.LWJGLException;
+import org.lwjgl.Sys;
+import org.lwjgl.input.Keyboard;
+import org.lwjgl.input.Mouse;
+import org.lwjgl.opengl.*;
+import org.lwjgl.util.mapped.MappedObject;
+import org.lwjgl.util.mapped.MappedObjectClassLoader;
+import org.lwjgl.util.mapped.MappedObjectTransformer;
+import org.lwjgl.util.mapped.MappedType;
+
+import java.awt.image.BufferedImage;
+import java.awt.image.Raster;
+import java.io.IOException;
+import java.nio.ByteBuffer;
+import java.util.Random;
+import javax.imageio.ImageIO;
+
+import static org.lwjgl.opengl.EXTTransformFeedback.*;
+import static org.lwjgl.opengl.GL11.*;
+import static org.lwjgl.opengl.GL12.*;
+import static org.lwjgl.opengl.GL15.*;
+import static org.lwjgl.opengl.GL20.*;
+import static org.lwjgl.opengl.GL30.*;
+
+/**
+ * Sprite rendering demo. Three implementations are supported:
+ * a) CPU animation + BufferData VBO update.
+ * b) CPU animation + MapBufferRange VBO update.
+ * c) GPU animation using transform feedback with a vertex shader.
+ *
+ * @author Spasi
+ * @since 18/3/2011
+ */
+public final class SpriteShootoutMapped {
+
+ static final int SCREEN_WIDTH = 800;
+ static final int SCREEN_HEIGHT = 600;
+
+ private static final int ANIMATION_TICKS = 60;
+
+ private boolean run = true;
+ private boolean render = true;
+ private boolean colorMask = true;
+ private boolean animate = true;
+ private boolean smooth;
+ private boolean vsync;
+
+ int ballSize = 42;
+ int ballCount = 100 * 1000;
+
+ private SpriteRenderer renderer;
+
+ // OpenGL stuff
+ private int texID;
+ private int texBigID;
+ private int texSmallID;
+
+ private SpriteShootoutMapped() {
+ }
+
+ public static void main(String[] args) {
+ MappedObjectTransformer.register(Pixel4b.class);
+ MappedObjectTransformer.register(Pixel3b.class);
+ MappedObjectTransformer.register(Sprite.class);
+ MappedObjectTransformer.register(SpriteRender.class);
+
+ if ( MappedObjectClassLoader.fork(SpriteShootoutMapped.class, args) )
+ return;
+
+ try {
+ new SpriteShootoutMapped().start();
+ } catch (LWJGLException e) {
+ e.printStackTrace();
+ }
+ }
+
+ private void start() throws LWJGLException {
+ try {
+ initGL();
+
+ final ContextCapabilities caps = GLContext.getCapabilities();
+ if ( !true && (caps.OpenGL30 || caps.GL_EXT_transform_feedback) )
+ renderer = new SpriteRendererTF();
+ else if ( true && caps.GL_ARB_map_buffer_range )
+ renderer = new SpriteRendererMapped();
+ else
+ renderer = new SpriteRendererPlain();
+
+ updateBalls(ballCount);
+ run();
+ } catch (Throwable t) {
+ t.printStackTrace();
+ } finally {
+ destroy();
+ }
+ }
+
+ private void initGL() throws LWJGLException {
+ Display.setLocation((Display.getDisplayMode().getWidth() - SCREEN_WIDTH) / 2,
+ (Display.getDisplayMode().getHeight() - SCREEN_HEIGHT) / 2);
+ Display.setDisplayMode(new DisplayMode(SCREEN_WIDTH, SCREEN_HEIGHT));
+ Display.setTitle("Sprite Shootout");
+ Display.create();
+ //Display.create(new PixelFormat(), new ContextAttribs(4, 1).withProfileCompatibility(true).withDebug(true));
+ //AMDDebugOutput.glDebugMessageCallbackAMD(new AMDDebugOutputCallback());
+
+ if ( !GLContext.getCapabilities().OpenGL20 )
+ throw new RuntimeException("OpenGL 2.0 is required for this demo.");
+
+ // Setup viewport
+
+ glMatrixMode(GL_PROJECTION);
+ glLoadIdentity();
+ glOrtho(0, SCREEN_WIDTH, 0, SCREEN_HEIGHT, -1.0, 1.0);
+
+ glMatrixMode(GL_MODELVIEW);
+ glLoadIdentity();
+ glViewport(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
+
+ glClearColor(1.0f, 1.0f, 1.0f, 0.0f);
+
+ // Create textures
+
+ try {
+ texSmallID = createTexture("res/ball_sm.png");
+ texBigID = createTexture("res/ball.png");
+ } catch (IOException e) {
+ e.printStackTrace();
+ System.exit(-1);
+ }
+ texID = texBigID;
+
+ // Setup rendering state
+
+ glEnable(GL_BLEND);
+ glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
+
+ glEnable(GL_ALPHA_TEST);
+ glAlphaFunc(GL_GREATER, 0.0f);
+
+ glColorMask(colorMask, colorMask, colorMask, false);
+ glDepthMask(false);
+ glDisable(GL_DEPTH_TEST);
+
+ // Setup geometry
+
+ glEnableClientState(GL_VERTEX_ARRAY);
+ glEnableClientState(GL_TEXTURE_COORD_ARRAY);
+
+ Util.checkGLError();
+ }
+
+ private static int createTexture(final String path) throws IOException {
+ final BufferedImage img = ImageIO.read(SpriteShootoutMapped.class.getClassLoader().getResource(path));
+
+ final int w = img.getWidth();
+ final int h = img.getHeight();
+
+ final ByteBuffer buffer = readImage(img);
+
+ final int texID = glGenTextures();
+
+ glBindTexture(GL_TEXTURE_2D, texID);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
+ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, w, h, 0, GL_BGRA, GL_UNSIGNED_BYTE, buffer);
+
+ return texID;
+ }
+
+ @MappedType(sizeof = 4)
+ public static class Pixel4b extends MappedObject {
+
+ public byte r, g, b, a;
+
+ }
+
+ @MappedType(sizeof = 3, align = 3)
+ public static class Pixel3b extends MappedObject {
+
+ public byte r, g, b;
+
+ }
+
+ private static ByteBuffer readImage(final BufferedImage img) throws IOException {
+ final Raster raster = img.getRaster();
+
+ final int bands = raster.getNumBands();
+
+ final int w = img.getWidth();
+ final int h = img.getHeight();
+
+ final int count = w * h;
+
+ final byte[] pixels = new byte[count * bands];
+ raster.getDataElements(0, 0, w, h, pixels);
+
+ if ( bands == 4 ) {
+ Pixel4b p = Pixel4b.malloc(count);
+
+ int b = 0;
+ for ( int i = 0; i < count; i++, b += 4 ) {
+ // Pre-multiply alpha
+ final float a = unpackUByte01(pixels[b + 3]);
+
+ p.view = i;
+ p.r = packUByte01(unpackUByte01(pixels[b + 2]) * a);
+ p.g = packUByte01(unpackUByte01(pixels[b + 1]) * a);
+ p.b = packUByte01(unpackUByte01(pixels[b + 0]) * a);
+ p.a = pixels[b + 3];
+ }
+
+ return p.backingByteBuffer();
+ } else if ( bands == 3 ) {
+ Pixel3b p = Pixel3b.malloc(count);
+
+ int b = 0;
+ for ( int i = 0; i < count; i++, b += 3 ) {
+ p.view = i;
+ p.r = pixels[b + 2];
+ p.g = pixels[b + 1];
+ p.b = pixels[b + 0];
+ }
+
+ return p.backingByteBuffer();
+ } else {
+ ByteBuffer p = BufferUtils.createByteBuffer(count * bands);
+ p.put(pixels, 0, p.capacity());
+ p.flip();
+ return p;
+ }
+
+ }
+
+ private static float unpackUByte01(final byte x) {
+ return (x & 0xFF) / 255.0f;
+ }
+
+ private static byte packUByte01(final float x) {
+ return (byte)(x * 255.0f);
+ }
+
+ private void updateBalls(final int count) {
+ System.out.println("NUMBER OF BALLS: " + count);
+ renderer.updateBalls(ballCount);
+ }
+
+ private void run() {
+ long startTime = System.currentTimeMillis() + 5000;
+ long fps = 0;
+
+ long time = Sys.getTime();
+ final int ticksPerUpdate = (int)(Sys.getTimerResolution() / ANIMATION_TICKS);
+
+ renderer.render(false, true, 0);
+
+ while ( run ) {
+ Display.processMessages();
+ handleInput();
+
+ glClear(GL_COLOR_BUFFER_BIT);
+
+ final long currTime = Sys.getTime();
+ final int delta = (int)(currTime - time);
+ if ( smooth || delta >= ticksPerUpdate ) {
+ renderer.render(render, animate, delta);
+ time = currTime;
+ } else
+ renderer.render(render, false, 0);
+
+ Display.update(false);
+ //Display.sync(60);
+
+ if ( startTime > System.currentTimeMillis() ) {
+ fps++;
+ } else {
+ long timeUsed = 5000 + (startTime - System.currentTimeMillis());
+ startTime = System.currentTimeMillis() + 5000;
+ System.out.println("FPS: " + (Math.round(fps / (timeUsed / 1000.0) * 10) / 10.0) + ", Balls: " + ballCount);
+ fps = 0;
+ }
+ }
+ }
+
+ private void handleInput() {
+ if ( Display.isCloseRequested() )
+ run = false;
+
+ while ( Keyboard.next() ) {
+ if ( Keyboard.getEventKeyState() )
+ continue;
+
+ switch ( Keyboard.getEventKey() ) {
+ case Keyboard.KEY_1:
+ case Keyboard.KEY_2:
+ case Keyboard.KEY_3:
+ case Keyboard.KEY_4:
+ case Keyboard.KEY_5:
+ case Keyboard.KEY_6:
+ case Keyboard.KEY_7:
+ case Keyboard.KEY_8:
+ case Keyboard.KEY_9:
+ case Keyboard.KEY_0:
+ ballCount = 1 << (Keyboard.getEventKey() - Keyboard.KEY_1);
+ updateBalls(ballCount);
+ break;
+ case Keyboard.KEY_ADD:
+ case Keyboard.KEY_SUBTRACT:
+ int mult;
+ if ( Keyboard.isKeyDown(Keyboard.KEY_LSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_RSHIFT) )
+ mult = 1000;
+ else if ( Keyboard.isKeyDown(Keyboard.KEY_LMENU) || Keyboard.isKeyDown(Keyboard.KEY_RMENU) )
+ mult = 100;
+ else if ( Keyboard.isKeyDown(Keyboard.KEY_LCONTROL) || Keyboard.isKeyDown(Keyboard.KEY_RCONTROL) )
+ mult = 10;
+ else
+ mult = 1;
+ if ( Keyboard.getEventKey() == Keyboard.KEY_SUBTRACT )
+ mult = -mult;
+ ballCount += mult * 100;
+ if ( ballCount <= 0 )
+ ballCount = 1;
+ updateBalls(ballCount);
+ break;
+ case Keyboard.KEY_ESCAPE:
+ run = false;
+ break;
+ case Keyboard.KEY_A:
+ animate = !animate;
+ System.out.println("Animation is now " + (animate ? "on" : "off") + ".");
+ break;
+ case Keyboard.KEY_C:
+ colorMask = !colorMask;
+ glColorMask(colorMask, colorMask, colorMask, false);
+ System.out.println("Color mask is now " + (colorMask ? "on" : "off") + ".");
+ // Disable alpha test when color mask is off, else we get no benefit.
+ if ( colorMask ) {
+ glEnable(GL_BLEND);
+ glEnable(GL_ALPHA_TEST);
+ } else {
+ glDisable(GL_BLEND);
+ glDisable(GL_ALPHA_TEST);
+ }
+ break;
+ case Keyboard.KEY_R:
+ render = !render;
+ System.out.println("Rendering is now " + (render ? "on" : "off") + ".");
+ break;
+ case Keyboard.KEY_S:
+ smooth = !smooth;
+ System.out.println("Smooth animation is now " + (smooth ? "on" : "off") + ".");
+ break;
+ case Keyboard.KEY_T:
+ if ( texID == texBigID ) {
+ texID = texSmallID;
+ ballSize = 16;
+ } else {
+ texID = texBigID;
+ ballSize = 42;
+ }
+ renderer.updateBallSize();
+ glBindTexture(GL_TEXTURE_2D, texID);
+ System.out.println("Now using the " + (texID == texBigID ? "big" : "small") + " texture.");
+ break;
+ case Keyboard.KEY_V:
+ vsync = !vsync;
+ Display.setVSyncEnabled(vsync);
+ System.out.println("VSYNC is now " + (vsync ? "enabled" : "disabled") + ".");
+ break;
+ }
+ }
+
+ while ( Mouse.next() ) ;
+ }
+
+ private void destroy() {
+ Display.destroy();
+ }
+
+ @MappedType(sizeof = 4 * 4)
+ public static class Sprite extends MappedObject {
+
+ public float x, y;
+ public float dx, dy;
+
+ }
+
+ @MappedType(sizeof = 2 * 4)
+ public static class SpriteRender extends MappedObject {
+
+ public float x, y;
+
+ }
+
+ private abstract class SpriteRenderer {
+
+ protected Sprite sprites;
+
+ protected int spriteCount;
+
+ protected int vshID;
+ protected int progID;
+
+ protected void createProgram() {
+ final int fshID = glCreateShader(GL_FRAGMENT_SHADER);
+ glShaderSource(fshID, "uniform sampler2D COLOR_MAP;\n" +
+ "void main(void) {\n" +
+ " gl_FragColor = texture2D(COLOR_MAP, gl_PointCoord);\n" +
+ "}");
+ glCompileShader(fshID);
+ if ( glGetShader(fshID, GL_COMPILE_STATUS) == GL_FALSE ) {
+ System.out.println(glGetShaderInfoLog(fshID, glGetShader(fshID, GL_INFO_LOG_LENGTH)));
+ throw new RuntimeException("Failed to compile fragment shader.");
+ }
+
+ progID = glCreateProgram();
+ glAttachShader(progID, vshID);
+ glAttachShader(progID, fshID);
+ glLinkProgram(progID);
+ if ( glGetProgram(progID, GL_LINK_STATUS) == GL_FALSE ) {
+ System.out.println(glGetProgramInfoLog(progID, glGetProgram(progID, GL_INFO_LOG_LENGTH)));
+ throw new RuntimeException("Failed to link shader program.");
+ }
+
+ glUseProgram(progID);
+ glUniform1i(glGetUniformLocation(progID, "COLOR_MAP"), 0);
+
+ updateBallSize();
+
+ glEnableClientState(GL_VERTEX_ARRAY);
+ }
+
+ public void updateBallSize() {
+ glPointSize(ballSize);
+ }
+
+ public abstract void updateBalls(int count);
+
+ protected abstract void render(boolean render, boolean animate, int delta);
+
+ }
+
+ private abstract class SpriteRendererBatched extends SpriteRenderer {
+
+ protected static final int BALLS_PER_BATCH = 10 * 1000;
+
+ SpriteRendererBatched() {
+ vshID = glCreateShader(GL_VERTEX_SHADER);
+ glShaderSource(vshID, "void main(void) {\n" +
+ " gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;\n" +
+ "}");
+ glCompileShader(vshID);
+ if ( glGetShader(vshID, GL_COMPILE_STATUS) == GL_FALSE ) {
+ System.out.println(glGetShaderInfoLog(vshID, glGetShader(vshID, GL_INFO_LOG_LENGTH)));
+ throw new RuntimeException("Failed to compile vertex shader.");
+ }
+
+ createProgram();
+ }
+
+ public void updateBalls(final int count) {
+ final Random random = new Random();
+
+ final Sprite newSprites = Sprite.malloc(count);
+ if ( sprites != null ) {
+ sprites.view = 0;
+ sprites.copyRange(newSprites, Math.min(count, spriteCount));
+ }
+
+ if ( count > spriteCount ) {
+ for ( int i = spriteCount; i < count; i++ ) {
+ newSprites.view = i;
+
+ newSprites.x = (int)(random.nextFloat() * (SCREEN_WIDTH - ballSize) + ballSize * 0.5f);
+ newSprites.y = (int)(random.nextFloat() * (SCREEN_HEIGHT - ballSize) + ballSize * 0.5f);
+ newSprites.dx = random.nextFloat() * 0.4f - 0.2f;
+ newSprites.dy = random.nextFloat() * 0.4f - 0.2f;
+ }
+ }
+
+ sprites = newSprites;
+ spriteCount = count;
+ }
+
+ protected void animate(
+ final Sprite sprite,
+ final SpriteRender spriteRender,
+ final int ballSize, final int ballIndex, final int batchSize, final int delta
+ ) {
+ final float ballRadius = ballSize * 0.5f;
+ final float boundW = SCREEN_WIDTH - ballRadius;
+ final float boundH = SCREEN_HEIGHT - ballRadius;
+
+ final Sprite[] sprites = sprite.asArray();
+ final SpriteRender[] spritesRender = spriteRender.asArray();
+ for ( int b = ballIndex, r = 0, len = (ballIndex + batchSize); b < len; b++, r++ ) {
+ float x = sprites[b].x;
+ float dx = sprites[b].dx;
+
+ x += dx * delta;
+ if ( x < ballRadius ) {
+ x = ballRadius;
+ sprites[b].dx = -dx;
+ } else if ( x > boundW ) {
+ x = boundW;
+ sprites[b].dx = -dx;
+ }
+ sprites[b].x = x;
+
+ float y = sprites[b].y;
+ float dy = sprites[b].dy;
+
+ y += dy * delta;
+ if ( y < ballRadius ) {
+ y = ballRadius;
+ sprites[b].dy = -dy;
+ } else if ( y > boundH ) {
+ y = boundH;
+ sprites[b].dy = -dy;
+ }
+ sprites[b].y = y;
+
+ spritesRender[r].x = x;
+ spritesRender[r].y = y;
+ }
+ }
+
+ }
+
+ private class SpriteRendererPlain extends SpriteRendererBatched {
+
+ private final int DATA_PER_BATCH = BALLS_PER_BATCH * 2 * 4; // balls * 2 floats * 4 bytes
+
+ protected int[] animVBO;
+
+ private SpriteRender spritesRender;
+
+ SpriteRendererPlain() {
+ System.out.println("Shootout Implementation: CPU animation & BufferData");
+ spritesRender = SpriteRender.malloc(BALLS_PER_BATCH);
+ }
+
+ public void updateBalls(final int count) {
+ super.updateBalls(count);
+
+ final int batchCount = count / BALLS_PER_BATCH + (count % BALLS_PER_BATCH == 0 ? 0 : 1);
+ if ( animVBO != null && batchCount == animVBO.length )
+ return;
+
+ final int[] newAnimVBO = new int[batchCount];
+ if ( animVBO != null ) {
+ System.arraycopy(animVBO, 0, newAnimVBO, 0, Math.min(animVBO.length, newAnimVBO.length));
+ for ( int i = newAnimVBO.length; i < animVBO.length; i++ )
+ glDeleteBuffers(animVBO[i]);
+ }
+ for ( int i = animVBO == null ? 0 : animVBO.length; i < newAnimVBO.length; i++ ) {
+ newAnimVBO[i] = glGenBuffers();
+ glBindBuffer(GL_ARRAY_BUFFER, newAnimVBO[i]);
+ }
+
+ animVBO = newAnimVBO;
+ }
+
+ public void render(final boolean render, final boolean animate, final int delta) {
+ int batchSize = Math.min(ballCount, BALLS_PER_BATCH);
+ int ballIndex = 0;
+ int batchIndex = 0;
+ while ( ballIndex < ballCount ) {
+ glBindBuffer(GL_ARRAY_BUFFER, animVBO[batchIndex]);
+
+ if ( animate )
+ animate(ballIndex, batchSize, delta);
+
+ if ( render ) {
+ glVertexPointer(2, GL_FLOAT, 0, 0);
+ glDrawArrays(GL_POINTS, 0, batchSize);
+ }
+
+ ballIndex += batchSize;
+ batchSize = M...
[truncated message content] |
|
From: <ka...@us...> - 2011-08-14 17:07:29
|
Revision: 3614
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3614&view=rev
Author: kappa1
Date: 2011-08-14 17:07:23 +0000 (Sun, 14 Aug 2011)
Log Message:
-----------
AppletLoader: al_version tag now uses a case insensitive String (instead of float), much nicer for specifying application versions (e.g. "10.3.3.1 Beta"), still backwards compatible too :)
Modified Paths:
--------------
trunk/LWJGL/applet/advance/appletloader.html
trunk/LWJGL/applet/basic/basicapplet.html
trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java
Modified: trunk/LWJGL/applet/advance/appletloader.html
===================================================================
--- trunk/LWJGL/applet/advance/appletloader.html 2011-08-14 10:46:00 UTC (rev 3613)
+++ trunk/LWJGL/applet/advance/appletloader.html 2011-08-14 17:07:23 UTC (rev 3614)
@@ -32,12 +32,12 @@
<!-- Tags under here are optional -->
- <!-- Version of Applet, important otherwise applet won't be cached, version change will update applet, must be int or float -->
- <!-- <param name="al_version" value="0.1"> -->
-
<!-- whether to use cache - defaults to true -->
<!-- <param name="al_cache" value="true"> -->
+ <!-- Version of Applet (case insensitive String), applet files not redownloaded if same version already in cache -->
+ <!-- <param name="al_version" value="0.1"> -->
+
<!-- background color to paint with, defaults to white -->
<!-- <param name="boxbgcolor" value="#000000"> -->
Modified: trunk/LWJGL/applet/basic/basicapplet.html
===================================================================
--- trunk/LWJGL/applet/basic/basicapplet.html 2011-08-14 10:46:00 UTC (rev 3613)
+++ trunk/LWJGL/applet/basic/basicapplet.html 2011-08-14 17:07:23 UTC (rev 3614)
@@ -32,12 +32,12 @@
<!-- Tags under here are optional -->
- <!-- Version of Applet, important otherwise applet won't be cached, version change will update applet, must be int or float -->
- <!-- <param name="al_version" value="0.1"> -->
-
<!-- whether to use cache - defaults to true -->
<!-- <param name="al_cache" value="true"> -->
+ <!-- Version of Applet (case insensitive String), applet files not redownloaded if same version already in cache -->
+ <!-- <param name="al_version" value="0.1"> -->
+
<!-- background color to paint with, defaults to white -->
<!-- <param name="boxbgcolor" value="#000000"> -->
Modified: trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java 2011-08-14 10:46:00 UTC (rev 3613)
+++ trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java 2011-08-14 17:07:23 UTC (rev 3614)
@@ -144,6 +144,7 @@
* <li>Bobjob</li>
* <li>Dashiva</li>
* <li>Dr_evil</li>
+ * <li>Elias Naur</li>
* <li>Kevin Glass</li>
* <li>Matthias Mann</li>
* <li>Mickelukas</li>
@@ -808,14 +809,12 @@
// if specified applet version already available don't download anything
boolean versionAvailable = false;
- // version of applet
+ // version string of applet
String version = getParameter("al_version");
- float latestVersion = 0;
-
+
// if applet version specifed, compare with version in the cache
if (version != null) {
- latestVersion = Float.parseFloat(version);
- versionAvailable = compareVersion(versionFile, latestVersion);
+ versionAvailable = compareVersion(versionFile, version.toLowerCase());
}
// if jars not available or need updating download them
@@ -838,7 +837,7 @@
// save version information once jars downloaded successfully
if (version != null) {
percentage = 90;
- writeObjectFile(versionFile, latestVersion);
+ writeObjectFile(versionFile, version.toLowerCase());
}
// save file names with last modified info once downloaded successfully
@@ -883,21 +882,23 @@
/**
* This method will return true if the version stored in the file
- * matches the supplied float version.
+ * matches the supplied String version.
*
* @param versionFile - location to file containing version information
- * @param version - float version that needs to be compared
+ * @param version - String version that needs to be compared
* @return returns true if the version in file matches specified version
*/
- protected boolean compareVersion(File versionFile, float version) {
+ protected boolean compareVersion(File versionFile, String version) {
// if version file exists
if (versionFile.exists()) {
+ String s = readStringFile(versionFile);
+
// compare to version with file
- if (version == readFloatFile(versionFile)) {
+ if (s != null && s.equals(version)) {
percentage = 90; // not need to download cache files again
if(debugMode) {
- System.out.println("Loading Cached Applet Version " + version);
+ System.out.println("Loading Cached Applet Version: " + version);
}
debug_sleep(2000);
@@ -980,22 +981,21 @@
}
/**
- * read float from File
+ * read String object from File
*
* @param file to be read
- * @return the float stored in the file or 0 if it fails
+ * @return the String stored in the file or null if it fails
*/
- protected float readFloatFile(File file) {
+ protected String readStringFile(File file) {
try {
- Float version = (Float)readObjectFile(file);
- return version.floatValue();
+ return (String)readObjectFile(file);
} catch (Exception e) {
// failed to read version file
e.printStackTrace();
}
- // return 0 if failed to read file
- return 0;
+ // return null if failed to read file
+ return null;
}
/**
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2011-08-15 19:24:45
|
Revision: 3615
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3615&view=rev
Author: matzon
Date: 2011-08-15 19:24:39 +0000 (Mon, 15 Aug 2011)
Log Message:
-----------
Updating version to 2.8.0, still some stuff to do tho
Modified Paths:
--------------
trunk/LWJGL/platform_build/build-definitions.xml
trunk/LWJGL/src/java/org/lwjgl/Sys.java
Modified: trunk/LWJGL/platform_build/build-definitions.xml
===================================================================
--- trunk/LWJGL/platform_build/build-definitions.xml 2011-08-14 17:07:23 UTC (rev 3614)
+++ trunk/LWJGL/platform_build/build-definitions.xml 2011-08-15 19:24:39 UTC (rev 3615)
@@ -12,7 +12,7 @@
<property name="lwjgl.docs" location="doc" />
<property name="lwjgl.temp" location="temp" />
<property name="lwjgl.res" location="res" />
- <property name="lwjgl.version" value="2.7.1" />
+ <property name="lwjgl.version" value="2.8.0" />
<property name="lwjgl.web" location="www" />
<property name="opengl-template-pattern" value="org/lwjgl/opengl/GL*.java,org/lwjgl/opengl/ARB*.java,org/lwjgl/opengl/AMD*.java,org/lwjgl/opengl/APPLE*.java,org/lwjgl/opengl/ATI*.java,org/lwjgl/opengl/EXT*.java,org/lwjgl/opengl/NV*.java,org/lwjgl/opengl/NVX*.java,org/lwjgl/opengl/HP*.java,org/lwjgl/opengl/IBM*.java,org/lwjgl/opengl/SUN*.java,org/lwjgl/opengl/SGIS*.java,org/lwjgl/opengl/GREMEDY*.java"/>
Modified: trunk/LWJGL/src/java/org/lwjgl/Sys.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/Sys.java 2011-08-14 17:07:23 UTC (rev 3614)
+++ trunk/LWJGL/src/java/org/lwjgl/Sys.java 2011-08-15 19:24:39 UTC (rev 3615)
@@ -54,7 +54,7 @@
private static final String JNI_LIBRARY_NAME = "lwjgl";
/** Current version of library */
- private static final String VERSION = "2.7.1";
+ private static final String VERSION = "2.8.0";
private static final String POSTFIX64BIT = "64";
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2011-08-29 13:34:24
|
Revision: 3625
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3625&view=rev
Author: kappa1
Date: 2011-08-29 13:34:17 +0000 (Mon, 29 Aug 2011)
Log Message:
-----------
apply patch to enable applets on OS X using the java plugin2, credits to pjohnson for creating patch.
Modified Paths:
--------------
trunk/LWJGL/platform_build/macosx_ant/build.xml
trunk/LWJGL/src/java/org/lwjgl/opengl/AWTSurfaceLock.java
trunk/LWJGL/src/native/common/org_lwjgl_opengl_AWTSurfaceLock.c
trunk/LWJGL/src/native/macosx/context.h
trunk/LWJGL/src/native/macosx/org_lwjgl_opengl_MacOSXCanvasPeerInfo.m
trunk/LWJGL/src/native/macosx/org_lwjgl_opengl_MacOSXContextImplementation.m
Modified: trunk/LWJGL/platform_build/macosx_ant/build.xml
===================================================================
--- trunk/LWJGL/platform_build/macosx_ant/build.xml 2011-08-29 00:54:54 UTC (rev 3624)
+++ trunk/LWJGL/platform_build/macosx_ant/build.xml 2011-08-29 13:34:17 UTC (rev 3625)
@@ -7,7 +7,7 @@
<mkdir dir="i386"/>
<mkdir dir="x86_64"/>
</target>
-
+
<target name="clean">
<delete failonerror="false">
<fileset dir="i386"/>
@@ -20,22 +20,19 @@
<target name="compile">
<apply dir="${dstdir}" executable="${compiler}" os="Mac OS X" skipemptyfilesets="true" failonerror="true" dest="${dstdir}">
- <arg line="${cflags} -ObjC -O2 -Wall -Wunused -c -fPIC -I${sdkroot}/System/Library/Frameworks/JavaVM.framework/Versions/A/Headers -I${sdkroot}/System/Library/Frameworks/JavaVM.framework/Versions/A/Frameworks/JavaNativeFoundation.framework/Headers -I${native}/common -I${native}/common/opengl -I${native}/macosx"/>
+ <arg line="${cflags} -ObjC -O2 -Wall -Wunused -c -fPIC -I/System/Library/Frameworks/JavaVM.framework/Versions/A/Headers -I${native}/common -I${native}/macosx -I/System/Library/Frameworks/JavaVM.framework/Versions/A/Frameworks/JavaNativeFoundation.framework/Versions/A/Headers"/>
<!-- Map from *.m and *.c to .o -->
<mapper type="regexp" from="^(.*)\.(c|m)" to="\1.o"/>
<fileset dir="${native}/macosx" includes="*.m"/>
<fileset dir="${native}/macosx" includes="*.c"/>
<fileset dir="${native}/common" includes="*.c"/>
- <fileset dir="${native}/common/opengl" includes="*.c"/>
- <fileset dir="${native}/generated/openal" includes="*.c"/>
- <fileset dir="${native}/generated/opencl" includes="*.c"/>
- <fileset dir="${native}/generated/opengl" includes="*.c"/>
+ <fileset dir="${native}/generated" includes="*.c"/>
</apply>
</target>
-
+
<target name="link">
<apply dir="${objdir}" parallel="true" executable="${linker}" os="Mac OS X" failonerror="true" skipemptyfilesets="true">
- <arg line="${linkerflags} -exported_symbols_list ../lwjgl.symbols -dynamiclib -o ${libname} -framework Foundation -framework AppKit -framework JavaVM -framework Carbon -framework OpenGL"/>
+ <arg line="${linkerflags} -exported_symbols_list ../lwjgl.symbols -dynamiclib -o ${libname} -framework Foundation -framework AppKit -framework JavaVM -framework Carbon -framework OpenGL -framework JavaNativeFoundation -F/System/Library/Frameworks/JavaVM.framework/Frameworks"/>
<fileset dir="${objdir}" includes="*.o"/>
</apply>
<apply dir="${objdir}" executable="strip" os="Mac OS X" failonerror="true">
@@ -43,7 +40,7 @@
<fileset dir="." file="${libname}"/>
</apply>
</target>
-
+
<target name="nativelibrary" depends="init">
<property name="universal_sdkroot" location="/Developer/SDKs/MacOSX10.6.sdk"/>
<property name="ppc_sdkroot" location="/Developer/SDKs/MacOSX10.6.sdk"/>
@@ -52,19 +49,19 @@
<property name="ppc_flags" value="-isysroot ${ppc_sdkroot}"/>
<antcall target="compile">
<param name="dstdir" location="ppc"/>
- <param name="compiler" value="gcc-4.0"/>
+ <param name="compiler" value="gcc-4.2"/>
<param name="sdkroot" location="${ppc_sdkroot}"/>
<param name="cflags" value="${universal_flags} -arch ppc -mmacosx-version-min=10.3"/>
</antcall>
<antcall target="compile">
<param name="dstdir" location="i386"/>
- <param name="compiler" value="gcc-4.0"/>
+ <param name="compiler" value="gcc-4.2"/>
<param name="sdkroot" location="${universal_sdkroot}"/>
<param name="cflags" value="${universal_flags} -arch i386 -mmacosx-version-min=10.4"/>
</antcall>
<antcall target="compile">
<param name="dstdir" location="x86_64"/>
- <param name="compiler" value="gcc-4.0"/>
+ <param name="compiler" value="gcc-4.2"/>
<param name="sdkroot" location="${universal_sdkroot}"/>
<param name="cflags" value="-isysroot ${x86_64_sdkroot} -arch x86_64 -mmacosx-version-min=10.5"/>
</antcall>
@@ -75,19 +72,19 @@
<antcall target="link">
<param name="objdir" location="ppc"/>
<param name="libname" value="liblwjgl-ppc.jnilib"/>
- <param name="linker" value="gcc-4.0"/>
+ <param name="linker" value="gcc-4.2"/>
<param name="linkerflags" value="${universal_flags} -arch ppc -mmacosx-version-min=10.3"/>
</antcall>
<antcall target="link">
<param name="objdir" location="i386"/>
<param name="libname" value="liblwjgl-i386.jnilib"/>
- <param name="linker" value="gcc-4.0"/>
+ <param name="linker" value="gcc-4.2"/>
<param name="linkerflags" value="${universal_flags} -arch i386 -mmacosx-version-min=10.4"/>
</antcall>
<antcall target="link">
<param name="objdir" location="x86_64"/>
<param name="libname" value="liblwjgl-i86_64.jnilib"/>
- <param name="linker" value="gcc-4.0"/>
+ <param name="linker" value="gcc-4.2"/>
<param name="linkerflags" value="-isysroot ${x86_64_sdkroot} -arch x86_64 -mmacosx-version-min=10.5"/>
</antcall>
<apply dir="." parallel="true" executable="lipo" os="Mac OS X" failonerror="true" skipemptyfilesets="true" >
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/AWTSurfaceLock.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/AWTSurfaceLock.java 2011-08-29 00:54:54 UTC (rev 3624)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/AWTSurfaceLock.java 2011-08-29 13:34:17 UTC (rev 3625)
@@ -78,14 +78,15 @@
// We need to elevate privileges because of an AWT bug. Please see
// http://192.18.37.44/forums/index.php?topic=10572 for a discussion.
// It is only needed on first call, so we avoid it on all subsequent calls
- // due to performance.
+ // due to performance..
+ final Canvas parent = component instanceof AWTGLCanvas ? component : Display.getParent();
if (firstLockSucceeded)
- return lockAndInitHandle(lock_buffer, component);
+ return lockAndInitHandle(lock_buffer, component, parent);
else
try {
firstLockSucceeded = AccessController.doPrivileged(new PrivilegedExceptionAction<Boolean>() {
public Boolean run() throws LWJGLException {
- return lockAndInitHandle(lock_buffer, component);
+ return lockAndInitHandle(lock_buffer, component, parent);
}
});
return firstLockSucceeded;
@@ -94,7 +95,7 @@
}
}
- private static native boolean lockAndInitHandle(ByteBuffer lock_buffer, Canvas component) throws LWJGLException;
+ private static native boolean lockAndInitHandle(ByteBuffer lock_buffer, Canvas component, Canvas display_parent) throws LWJGLException;
void unlock() throws LWJGLException {
nUnlock(lock_buffer);
Modified: trunk/LWJGL/src/native/common/org_lwjgl_opengl_AWTSurfaceLock.c
===================================================================
--- trunk/LWJGL/src/native/common/org_lwjgl_opengl_AWTSurfaceLock.c 2011-08-29 00:54:54 UTC (rev 3624)
+++ trunk/LWJGL/src/native/common/org_lwjgl_opengl_AWTSurfaceLock.c 2011-08-29 13:34:17 UTC (rev 3625)
@@ -49,15 +49,29 @@
}
JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_AWTSurfaceLock_lockAndInitHandle
- (JNIEnv *env, jclass clazz, jobject lock_buffer_handle, jobject canvas) {
+ (JNIEnv *env, jclass clazz, jobject lock_buffer_handle, jobject canvas, jobject display_parent) {
JAWT awt;
JAWT_DrawingSurface* ds;
JAWT_DrawingSurfaceInfo *dsi;
AWTSurfaceLock *awt_lock = (AWTSurfaceLock *)(*env)->GetDirectBufferAddress(env, lock_buffer_handle);
- awt.version = JAWT_VERSION_1_4;
- if (JAWT_GetAWT(env, &awt) == JNI_FALSE) {
- throwException(env, "Could not get the JAWT interface");
- return JNI_FALSE;
+
+ jboolean result = JNI_FALSE;
+
+ #ifdef __MACH__
+ if (display_parent) {
+ //first try CALAYER
+ awt.version = JAWT_VERSION_1_4 | JAWT_MACOSX_USE_CALAYER;
+ result = JAWT_GetAWT(env, &awt);
+ }
+ #endif
+
+ if (result == JNI_FALSE) {
+ // now try without CALAYER
+ awt.version = JAWT_VERSION_1_4;
+ if (JAWT_GetAWT(env, &awt) == JNI_FALSE) {
+ throwException(env, "Could not get the JAWT interface");
+ return JNI_FALSE;
+ }
}
ds = awt.GetDrawingSurface(env, canvas);
Modified: trunk/LWJGL/src/native/macosx/context.h
===================================================================
--- trunk/LWJGL/src/native/macosx/context.h 2011-08-29 00:54:54 UTC (rev 3624)
+++ trunk/LWJGL/src/native/macosx/context.h 2011-08-29 13:34:17 UTC (rev 3625)
@@ -50,6 +50,7 @@
typedef struct {
NSOpenGLPixelFormat *pixel_format;
bool window;
+ bool canDrawGL;
union {
NSView *nsview;
NSOpenGLPixelBuffer *pbuffer;
Modified: trunk/LWJGL/src/native/macosx/org_lwjgl_opengl_MacOSXCanvasPeerInfo.m
===================================================================
--- trunk/LWJGL/src/native/macosx/org_lwjgl_opengl_MacOSXCanvasPeerInfo.m 2011-08-29 00:54:54 UTC (rev 3624)
+++ trunk/LWJGL/src/native/macosx/org_lwjgl_opengl_MacOSXCanvasPeerInfo.m 2011-08-29 13:34:17 UTC (rev 3625)
@@ -37,6 +37,9 @@
* @version $Revision$
*/
+#import <Cocoa/Cocoa.h>
+#import <JavaNativeFoundation.h>
+
#include <jni.h>
#include <jawt_md.h>
#include "awt_tools.h"
@@ -44,13 +47,147 @@
#include "context.h"
#include "common_tools.h"
+// forward declaration
+@interface PBufferGLLayer : NSOpenGLLayer {
+ MacOSXPeerInfo *peer_info;
+ GLuint textureID;
+ BOOL canDraw;
+}
+
+@property (nonatomic) MacOSXPeerInfo *peer_info;
+@property (nonatomic) GLuint textureID;
+@end
+
+
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXCanvasPeerInfo_nInitHandle
- (JNIEnv *env, jclass clazz, jobject lock_buffer_handle, jobject peer_info_handle) {
- NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+(JNIEnv *env, jclass clazz, jobject lock_buffer_handle, jobject peer_info_handle) {
+ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+
MacOSXPeerInfo *peer_info = (MacOSXPeerInfo *)(*env)->GetDirectBufferAddress(env, peer_info_handle);
AWTSurfaceLock *surface = (AWTSurfaceLock *)(*env)->GetDirectBufferAddress(env, lock_buffer_handle);
JAWT_MacOSXDrawingSurfaceInfo *macosx_dsi = (JAWT_MacOSXDrawingSurfaceInfo *)surface->dsi->platformInfo;
- peer_info->nsview = macosx_dsi->cocoaViewRef;
- peer_info->window = true;
+
+ // check for CALayer support
+ if(surface->awt.version & JAWT_MACOSX_USE_CALAYER) {
+ jint width = surface->dsi->bounds.width;
+ jint height = surface->dsi->bounds.height;
+
+ if(peer_info->pbuffer == NULL ||
+ width != [peer_info->pbuffer pixelsWide] || height != [peer_info->pbuffer pixelsHigh]) {
+ if(peer_info->pbuffer != NULL) {
+ [peer_info->pbuffer release];
+ }
+
+ // make pbuffer
+ NSOpenGLPixelBuffer *pbuffer = nil;
+ NSLog(@"Make pbuffer: %d x %d", width, height);
+ pbuffer = [[NSOpenGLPixelBuffer alloc] initWithTextureTarget:GL_TEXTURE_RECTANGLE_EXT
+ textureInternalFormat:GL_RGBA
+ textureMaxMipMapLevel:0
+ pixelsWide:width
+ pixelsHigh:height];
+
+ peer_info->pbuffer = pbuffer;
+ peer_info->window = false;
+ peer_info->canDrawGL = true;
+ }
+
+ if (macosx_dsi != NULL) {
+ [JNFRunLoop performOnMainThreadWaiting:YES withBlock:^(){
+ // attach the "root layer" to the AWT Canvas surface layers
+ id <JAWT_SurfaceLayers> surfaceLayers = (id <JAWT_SurfaceLayers>)macosx_dsi;//dsi->platformInfo;
+ if(surfaceLayers.layer == NULL) {
+ PBufferGLLayer *caGLLayer = [[PBufferGLLayer new] autorelease];
+ caGLLayer.peer_info = peer_info;
+ caGLLayer.asynchronous = YES;
+ caGLLayer.needsDisplayOnBoundsChange = YES;
+ caGLLayer.opaque = YES;
+ surfaceLayers.layer = caGLLayer;
+ }
+ }];
+ }
+ } else {
+ peer_info->nsview = macosx_dsi->cocoaViewRef;
+ peer_info->window = true;
+ }
+
[pool release];
}
+
+// rotates a red square when asked to draw
+@implementation PBufferGLLayer
+
+@synthesize peer_info;
+@synthesize textureID;
+
+// override to draw custom GL content
+-(void)drawInCGLContext:(CGLContextObj)glContext
+ pixelFormat:(CGLPixelFormatObj)pixelFormat
+ forLayerTime:(CFTimeInterval)timeInterval
+ displayTime:(const CVTimeStamp *)timeStamp {
+
+ if(!peer_info || !peer_info->pbuffer) {
+ return;
+ }
+
+ peer_info->canDrawGL = false;
+
+ NSOpenGLPixelBuffer *pbuffer = self.peer_info->pbuffer;
+
+ // set the current context
+ CGLSetCurrentContext(glContext);
+
+ GLsizei width = [pbuffer pixelsWide];
+ GLsizei height = [pbuffer pixelsHigh];
+
+ if(textureID == 0) {
+ glGenTextures(1, &textureID);
+ }
+ glBindTexture(GL_TEXTURE_RECTANGLE_EXT, self.textureID);
+ CGLTexImagePBuffer(glContext,[pbuffer CGLPBufferObj], GL_FRONT);
+
+ glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+ glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
+ glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
+ glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+
+ glEnable(GL_TEXTURE_RECTANGLE_EXT);
+
+ static GLfloat verts[] = {
+ -1.0, -1.0,
+ -1.0, 1.0,
+ 1.0, 1.0,
+ 1.0, -1.0
+ };
+
+ GLfloat tex[] = {
+ 0.0, 0.0,
+ 0.0, height,
+ width, height,
+ width, 0.0
+ };
+
+ glEnableClientState(GL_VERTEX_ARRAY);
+ glEnableClientState(GL_TEXTURE_COORD_ARRAY);
+ glVertexPointer(2, GL_FLOAT, 0, verts);
+ glTexCoordPointer(2, GL_FLOAT, 0, tex);
+
+ glDrawArrays(GL_QUADS, 0, 4);
+
+ glDisableClientState(GL_VERTEX_ARRAY);
+ glDisableClientState(GL_TEXTURE_COORD_ARRAY);
+
+ glDisable(GL_TEXTURE_RECTANGLE_EXT);
+
+ // call super to finalize the drawing - by default all it does is call glFlush()
+ [super drawInCGLContext:glContext pixelFormat:pixelFormat forLayerTime:timeInterval displayTime:timeStamp];
+}
+
+-(BOOL)canDrawInCGLContext:(CGLContextObj)glContext
+ pixelFormat:(CGLPixelFormatObj)pixelFormat
+ forLayerTime:(CFTimeInterval)timeInterval
+ displayTime:(const CVTimeStamp *)timeStamp {
+ return peer_info->canDrawGL ? YES : NO;
+}
+
+@end
\ No newline at end of file
Modified: trunk/LWJGL/src/native/macosx/org_lwjgl_opengl_MacOSXContextImplementation.m
===================================================================
--- trunk/LWJGL/src/native/macosx/org_lwjgl_opengl_MacOSXContextImplementation.m 2011-08-29 00:54:54 UTC (rev 3624)
+++ trunk/LWJGL/src/native/macosx/org_lwjgl_opengl_MacOSXContextImplementation.m 2011-08-29 13:34:17 UTC (rev 3625)
@@ -45,6 +45,7 @@
typedef struct {
NSOpenGLContext *context;
+ MacOSXPeerInfo *peer_info;
} MacOSXContext;
JNIEXPORT jobject JNICALL Java_org_lwjgl_opengl_MacOSXContextImplementation_nCreate
@@ -72,6 +73,7 @@
}
context_info = (MacOSXContext *)(*env)->GetDirectBufferAddress(env, context_handle);
context_info->context = context;
+ context_info->peer_info = peer_info;
[pool release];
return context_handle;
}
@@ -79,8 +81,9 @@
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXContextImplementation_nSwapBuffers
(JNIEnv *env, jclass clazz, jobject context_handle) {
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
- MacOSXContext *peer_info = (MacOSXContext *)(*env)->GetDirectBufferAddress(env, context_handle);
- [peer_info->context flushBuffer];
+ MacOSXContext *context_info = (MacOSXContext *)(*env)->GetDirectBufferAddress(env, context_handle);
+ [context_info->context flushBuffer];
+ context_info->peer_info->canDrawGL = true;
[pool release];
}
@@ -90,6 +93,7 @@
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
MacOSXContext *context_info = (MacOSXContext *)(*env)->GetDirectBufferAddress(env, context_handle);
[context_info->context update];
+ context_info->peer_info->canDrawGL = true;
[pool release];
}
@@ -118,6 +122,7 @@
} else {
[context_info->context setPixelBuffer:peer_info->pbuffer cubeMapFace:0 mipMapLevel:0 currentVirtualScreen:0];
}
+ peer_info->canDrawGL = true;
[pool release];
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2011-09-03 14:47:17
|
Revision: 3630
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3630&view=rev
Author: kappa1
Date: 2011-09-03 14:47:11 +0000 (Sat, 03 Sep 2011)
Log Message:
-----------
update credits
Modified Paths:
--------------
trunk/LWJGL/doc/CREDITS
trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java
trunk/LWJGL/src/native/macosx/org_lwjgl_opengl_MacOSXCanvasPeerInfo.m
trunk/LWJGL/www/credits.php
Modified: trunk/LWJGL/doc/CREDITS
===================================================================
--- trunk/LWJGL/doc/CREDITS 2011-09-03 11:04:04 UTC (rev 3629)
+++ trunk/LWJGL/doc/CREDITS 2011-09-03 14:47:11 UTC (rev 3630)
@@ -12,12 +12,13 @@
- Jos Hirth <jh...@ka...>
- Kevin Glass <ke...@co...>
- Atsuya Takagi
- - kappaOne
+ - kappaOne <one...@gm...>
- Simon Felix
- Ryan McNally
- Ciardhubh <ciardhubh[at]ciardhubh.de>
- Jens von Pilgrim
- Ruben Garat
+ - Pelle Johnsen <pel...@gm...>
additional credits goes to:
- Joseph I. Valenzuela [OpenAL stuff]
Modified: trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java 2011-09-03 11:04:04 UTC (rev 3629)
+++ trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java 2011-09-03 14:47:11 UTC (rev 3630)
@@ -151,7 +151,7 @@
* <li>Matthias Mann</li>
* <li>Mickelukas</li>
* <li>NateS</li>
- * <li>pjohnsen</li>
+ * <li>Pelle Johnsen</li>
* <li>Riven</li>
* <li>Ruben01</li>
* <li>Shannon Smith</li>
Modified: trunk/LWJGL/src/native/macosx/org_lwjgl_opengl_MacOSXCanvasPeerInfo.m
===================================================================
--- trunk/LWJGL/src/native/macosx/org_lwjgl_opengl_MacOSXCanvasPeerInfo.m 2011-09-03 11:04:04 UTC (rev 3629)
+++ trunk/LWJGL/src/native/macosx/org_lwjgl_opengl_MacOSXCanvasPeerInfo.m 2011-09-03 14:47:11 UTC (rev 3630)
@@ -34,6 +34,7 @@
* $Id$
*
* @author elias_naur <eli...@us...>
+ * @author Pelle Johnsen
* @version $Revision$
*/
Modified: trunk/LWJGL/www/credits.php
===================================================================
--- trunk/LWJGL/www/credits.php 2011-09-03 11:04:04 UTC (rev 3629)
+++ trunk/LWJGL/www/credits.php 2011-09-03 14:47:11 UTC (rev 3630)
@@ -22,6 +22,7 @@
<li>Simon Felix</li>
<li>Ryan McNally</li>
<li>Ciardhubh</li>
+ <li>Pelle Johnsen</li>
</ul>
<p>
<b>Additional credits goes to</b>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2011-09-08 21:36:01
|
Revision: 3637
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3637&view=rev
Author: matzon
Date: 2011-09-08 21:35:54 +0000 (Thu, 08 Sep 2011)
Log Message:
-----------
applied maven patch by ruben01
Modified Paths:
--------------
trunk/LWJGL/maven/build.xml
trunk/LWJGL/maven/lwjgl.pom
trunk/LWJGL/platform_build/build-maven.xml
Removed Paths:
-------------
trunk/LWJGL/maven/jinput-platform.pom
trunk/LWJGL/maven/jinput.pom
Modified: trunk/LWJGL/maven/build.xml
===================================================================
--- trunk/LWJGL/maven/build.xml 2011-09-07 21:28:01 UTC (rev 3636)
+++ trunk/LWJGL/maven/build.xml 2011-09-08 21:35:54 UTC (rev 3637)
@@ -4,198 +4,240 @@
<property name="mavenrepoId" value="tmprepoid" />
<target name="install">
- <antcall target="execute">
+ <antcall target="execute-install">
<param name="mvncommand" value="org.apache.maven.plugins:maven-install-plugin:2.3.1:install-file"/>
</antcall>
</target>
+
<target name="deploy">
<antcall target="execute">
- <param name="mvncommand" value="org.apache.maven.plugins:maven-gpg-plugin:1.1:sign-and-deploy-file"/>
+ <param name="mvncommand" value="org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy-file"/>
</antcall>
</target>
+ <target name="deploy-gpg">
+ <antcall target="execute">
+ <param name="mvncommand" value="org.apache.maven.plugins:maven-gpg-plugin:1.4:sign-and-deploy-file"/>
+ </antcall>
+ </target>
+
+
+
<target name="execute">
+
+ <!-- parent.pom -->
+
+ <artifact:mvn>
+ <arg value="${mvncommand}" />
+ <arg value="-Durl=${mavenrepo}" />
+ <arg value="-DrepositoryId=${mavenrepoId}" />
+ <arg value="-DpomFile=lwjgl-parent.pom" />
+ <arg value="-Dfile=lwjgl-parent.pom" />
+ <arg value="-Plwjglgpg" />
+ </artifact:mvn>
+
+ <!-- lwjgl.jar -->
+
+ <artifact:mvn>
+ <arg value="${mvncommand}" />
+ <arg value="-Durl=${mavenrepo}" />
+ <arg value="-DrepositoryId=${mavenrepoId}" />
+ <arg value="-DpomFile=lwjgl.pom" />
+ <arg value="-Dfile=lwjgl.jar" />
+ <arg value="-Dtypes=jar,jar" />
+ <arg value="-Dclassifiers=sources,javadoc" />
+ <arg value="-Dfiles=lwjgl-sources.jar,lwjgl-javadoc.jar" />
+ <arg value="-Plwjglgpg" />
+ </artifact:mvn>
+
+
+ <!-- lwjgl natives -->
+
+ <artifact:mvn>
+ <arg value="${mvncommand}" />
+ <arg value="-Durl=${mavenrepo}" />
+ <arg value="-DrepositoryId=${mavenrepoId}" />
+ <arg value="-DpomFile=lwjgl-platform.pom" />
+ <arg value="-Dfile=lwjgl-platform-natives-windows.jar" />
+ <arg value="-Dclassifier=natives-windows" />
+ <arg value="-Dtypes=jar,jar" />
+ <arg value="-Dclassifiers=natives-linux,natives-osx" />
+ <arg value="-Dfiles=lwjgl-platform-natives-linux.jar,lwjgl-platform-natives-osx.jar" />
+ <arg value="-Plwjglgpg" />
+ </artifact:mvn>
+
+
+ <!-- lwjgl_util.jar -->
+
+ <artifact:mvn>
+ <arg value="${mvncommand}" />
+ <arg value="-Durl=${mavenrepo}" />
+ <arg value="-DrepositoryId=${mavenrepoId}" />
+ <arg value="-DpomFile=lwjgl_util.pom" />
+ <arg value="-Dfile=lwjgl_util.jar" />
+ <arg value="-Dtypes=jar,jar" />
+ <arg value="-Dclassifiers=sources,javadoc" />
+ <arg value="-Dfiles=lwjgl_util-sources.jar,lwjgl_util-javadoc.jar" />
+ <arg value="-Plwjglgpg" />
+ </artifact:mvn>
+
+ <!-- lwjgl_util_applet.jar -->
+
+ <artifact:mvn>
+ <arg value="${mvncommand}" />
+ <arg value="-Durl=${mavenrepo}" />
+ <arg value="-DrepositoryId=${mavenrepoId}" />
+ <arg value="-DpomFile=lwjgl_util_applet.pom" />
+ <arg value="-Dfile=lwjgl_util_applet.jar" />
+ <arg value="-Dtypes=jar,jar" />
+ <arg value="-Dclassifiers=sources,javadoc" />
+ <arg value="-Dfiles=lwjgl_util_applet-sources.jar,lwjgl_util_applet-javadoc.jar" />
+ <arg value="-Plwjglgpg" />
+ </artifact:mvn>
+
+ </target>
+
+
+ <target name="execute-install">
+
+ <!-- parent.pom -->
+
+ <artifact:mvn>
+ <arg value="${mvncommand}" />
+ <arg value="-Durl=${mavenrepo}" />
+ <arg value="-DrepositoryId=${mavenrepoId}" />
+ <arg value="-DpomFile=lwjgl-parent.pom" />
+ <arg value="-Dfile=lwjgl-parent.pom" />
+ <arg value="-Plwjglgpg" />
+ </artifact:mvn>
+
+ <!-- lwjgl.jar -->
+
+ <artifact:mvn>
+ <arg value="${mvncommand}" />
+ <arg value="-Durl=${mavenrepo}" />
+ <arg value="-DrepositoryId=${mavenrepoId}" />
+ <arg value="-DpomFile=lwjgl.pom" />
+ <arg value="-Dfile=lwjgl.jar" />
+ <arg value="-Plwjglgpg" />
+ </artifact:mvn>
+
+ <artifact:mvn>
+ <arg value="${mvncommand}" />
+ <arg value="-Durl=${mavenrepo}" />
+ <arg value="-DrepositoryId=${mavenrepoId}" />
+ <arg value="-DpomFile=lwjgl.pom" />
+ <arg value="-Dfile=lwjgl-sources.jar" />
+ <arg value="-Dclassifier=sources" />
+ <arg value="-Plwjglgpg" />
+ </artifact:mvn>
+
+ <artifact:mvn>
+ <arg value="${mvncommand}" />
+ <arg value="-Durl=${mavenrepo}" />
+ <arg value="-DrepositoryId=${mavenrepoId}" />
+ <arg value="-DpomFile=lwjgl.pom" />
+ <arg value="-Dfile=lwjgl-javadoc.jar" />
+ <arg value="-Dclassifier=javadoc" />
+ <arg value="-Plwjglgpg" />
+ </artifact:mvn>
+
+ <!-- lwjgl natives -->
+
+ <artifact:mvn>
+ <arg value="${mvncommand}" />
+ <arg value="-Durl=${mavenrepo}" />
+ <arg value="-DrepositoryId=${mavenrepoId}" />
+ <arg value="-DpomFile=lwjgl-platform.pom" />
+ <arg value="-Dfile=lwjgl-platform-natives-windows.jar" />
+ <arg value="-Dclassifier=natives-windows" />
+ <arg value="-Plwjglgpg" />
+ </artifact:mvn>
+
+ <artifact:mvn>
+ <arg value="${mvncommand}" />
+ <arg value="-Durl=${mavenrepo}" />
+ <arg value="-DrepositoryId=${mavenrepoId}" />
+ <arg value="-DpomFile=lwjgl-platform.pom" />
+ <arg value="-Dfile=lwjgl-platform-natives-linux.jar" />
+ <arg value="-Dclassifier=natives-linux" />
+ <arg value="-Plwjglgpg" />
+ </artifact:mvn>
+
+ <artifact:mvn>
+ <arg value="${mvncommand}" />
+ <arg value="-Durl=${mavenrepo}" />
+ <arg value="-DrepositoryId=${mavenrepoId}" />
+ <arg value="-DpomFile=lwjgl-platform.pom" />
+ <arg value="-Dfile=lwjgl-platform-natives-osx.jar" />
+ <arg value="-Dclassifier=natives-osx" />
+ <arg value="-Plwjglgpg" />
+ </artifact:mvn>
+
+ <!-- lwjgl_util.jar -->
+
+ <artifact:mvn>
+ <arg value="${mvncommand}" />
+ <arg value="-Durl=${mavenrepo}" />
+ <arg value="-DrepositoryId=${mavenrepoId}" />
+ <arg value="-DpomFile=lwjgl_util.pom" />
+ <arg value="-Dfile=lwjgl_util.jar" />
+ <arg value="-Plwjglgpg" />
+ </artifact:mvn>
+
+ <artifact:mvn>
+ <arg value="${mvncommand}" />
+ <arg value="-Durl=${mavenrepo}" />
+ <arg value="-DrepositoryId=${mavenrepoId}" />
+ <arg value="-DpomFile=lwjgl_util.pom" />
+ <arg value="-Dfile=lwjgl_util-sources.jar" />
+ <arg value="-Dclassifier=sources" />
+ <arg value="-Plwjglgpg" />
+ </artifact:mvn>
+
+ <artifact:mvn>
+ <arg value="${mvncommand}" />
+ <arg value="-Durl=${mavenrepo}" />
+ <arg value="-DrepositoryId=${mavenrepoId}" />
+ <arg value="-DpomFile=lwjgl_util.pom" />
+ <arg value="-Dfile=lwjgl_util-javadoc.jar" />
+ <arg value="-Dclassifier=javadoc" />
+ <arg value="-Plwjglgpg" />
+ </artifact:mvn>
+
+ <!-- lwjgl_util_applet.jar -->
+
+ <artifact:mvn>
+ <arg value="${mvncommand}" />
+ <arg value="-Durl=${mavenrepo}" />
+ <arg value="-DrepositoryId=${mavenrepoId}" />
+ <arg value="-DpomFile=lwjgl_util_applet.pom" />
+ <arg value="-Dfile=lwjgl_util_applet.jar" />
+ <arg value="-Plwjglgpg" />
+ </artifact:mvn>
+
+ <artifact:mvn>
+ <arg value="${mvncommand}" />
+ <arg value="-Durl=${mavenrepo}" />
+ <arg value="-DrepositoryId=${mavenrepoId}" />
+ <arg value="-DpomFile=lwjgl_util_applet.pom" />
+ <arg value="-Dfile=lwjgl_util_applet-sources.jar" />
+ <arg value="-Dclassifier=sources" />
+ <arg value="-Plwjglgpg" />
+ </artifact:mvn>
+
+ <artifact:mvn>
+ <arg value="${mvncommand}" />
+ <arg value="-Durl=${mavenrepo}" />
+ <arg value="-DrepositoryId=${mavenrepoId}" />
+ <arg value="-DpomFile=lwjgl_util_applet.pom" />
+ <arg value="-Dfile=lwjgl_util_applet-javadoc.jar" />
+ <arg value="-Dclassifier=javadoc" />
+ <arg value="-Plwjglgpg" />
+ </artifact:mvn>
+ </target>
- <!-- parent.pom -->
-
- <artifact:mvn>
- <arg value="${mvncommand}" />
- <arg value="-Durl=${mavenrepo}" />
- <arg value="-DrepositoryId=${mavenrepoId}" />
- <arg value="-DpomFile=lwjgl-parent.pom" />
- <arg value="-Dfile=lwjgl-parent.pom" />
- <arg value="-Plwjglgpg" />
- </artifact:mvn>
-
- <!-- lwjgl.jar -->
-
- <artifact:mvn>
- <arg value="${mvncommand}" />
- <arg value="-Durl=${mavenrepo}" />
- <arg value="-DrepositoryId=${mavenrepoId}" />
- <arg value="-DpomFile=lwjgl.pom" />
- <arg value="-Dfile=lwjgl.jar" />
- <arg value="-Plwjglgpg" />
- </artifact:mvn>
-
- <artifact:mvn>
- <arg value="${mvncommand}" />
- <arg value="-Durl=${mavenrepo}" />
- <arg value="-DrepositoryId=${mavenrepoId}" />
- <arg value="-DpomFile=lwjgl.pom" />
- <arg value="-Dfile=lwjgl-sources.jar" />
- <arg value="-Dclassifier=sources" />
- <arg value="-Plwjglgpg" />
- </artifact:mvn>
-
- <artifact:mvn>
- <arg value="${mvncommand}" />
- <arg value="-Durl=${mavenrepo}" />
- <arg value="-DrepositoryId=${mavenrepoId}" />
- <arg value="-DpomFile=lwjgl.pom" />
- <arg value="-Dfile=lwjgl-javadoc.jar" />
- <arg value="-Dclassifier=javadoc" />
- <arg value="-Plwjglgpg" />
- </artifact:mvn>
-
- <!-- lwjgl natives -->
-
- <artifact:mvn>
- <arg value="${mvncommand}" />
- <arg value="-Durl=${mavenrepo}" />
- <arg value="-DrepositoryId=${mavenrepoId}" />
- <arg value="-DpomFile=lwjgl-platform.pom" />
- <arg value="-Dfile=lwjgl-platform-natives-win.jar" />
- <arg value="-Dclassifier=natives-win" />
- <arg value="-Plwjglgpg" />
- </artifact:mvn>
-
- <artifact:mvn>
- <arg value="${mvncommand}" />
- <arg value="-Durl=${mavenrepo}" />
- <arg value="-DrepositoryId=${mavenrepoId}" />
- <arg value="-DpomFile=lwjgl-platform.pom" />
- <arg value="-Dfile=lwjgl-platform-natives-linux.jar" />
- <arg value="-Dclassifier=natives-linux" />
- <arg value="-Plwjglgpg" />
- </artifact:mvn>
-
- <artifact:mvn>
- <arg value="${mvncommand}" />
- <arg value="-Durl=${mavenrepo}" />
- <arg value="-DrepositoryId=${mavenrepoId}" />
- <arg value="-DpomFile=lwjgl-platform.pom" />
- <arg value="-Dfile=lwjgl-platform-natives-mac.jar" />
- <arg value="-Dclassifier=natives-mac" />
- <arg value="-Plwjglgpg" />
- </artifact:mvn>
-
- <!-- lwjgl_util.jar -->
-
- <artifact:mvn>
- <arg value="${mvncommand}" />
- <arg value="-Durl=${mavenrepo}" />
- <arg value="-DrepositoryId=${mavenrepoId}" />
- <arg value="-DpomFile=lwjgl_util.pom" />
- <arg value="-Dfile=lwjgl_util.jar" />
- <arg value="-Plwjglgpg" />
- </artifact:mvn>
-
- <artifact:mvn>
- <arg value="${mvncommand}" />
- <arg value="-Durl=${mavenrepo}" />
- <arg value="-DrepositoryId=${mavenrepoId}" />
- <arg value="-DpomFile=lwjgl_util.pom" />
- <arg value="-Dfile=lwjgl_util-sources.jar" />
- <arg value="-Dclassifier=sources" />
- <arg value="-Plwjglgpg" />
- </artifact:mvn>
-
- <artifact:mvn>
- <arg value="${mvncommand}" />
- <arg value="-Durl=${mavenrepo}" />
- <arg value="-DrepositoryId=${mavenrepoId}" />
- <arg value="-DpomFile=lwjgl_util.pom" />
- <arg value="-Dfile=lwjgl_util-javadoc.jar" />
- <arg value="-Dclassifier=javadoc" />
- <arg value="-Plwjglgpg" />
- </artifact:mvn>
-
- <!-- lwjgl_util_applet.jar -->
-
- <artifact:mvn>
- <arg value="${mvncommand}" />
- <arg value="-Durl=${mavenrepo}" />
- <arg value="-DrepositoryId=${mavenrepoId}" />
- <arg value="-DpomFile=lwjgl_util_applet.pom" />
- <arg value="-Dfile=lwjgl_util_applet.jar" />
- <arg value="-Plwjglgpg" />
- </artifact:mvn>
-
- <artifact:mvn>
- <arg value="${mvncommand}" />
- <arg value="-Durl=${mavenrepo}" />
- <arg value="-DrepositoryId=${mavenrepoId}" />
- <arg value="-DpomFile=lwjgl_util.pom" />
- <arg value="-Dfile=lwjgl_util_applet-sources.jar" />
- <arg value="-Dclassifier=sources" />
- <arg value="-Plwjglgpg" />
- </artifact:mvn>
-
- <artifact:mvn>
- <arg value="${mvncommand}" />
- <arg value="-Durl=${mavenrepo}" />
- <arg value="-DrepositoryId=${mavenrepoId}" />
- <arg value="-DpomFile=lwjgl_util.pom" />
- <arg value="-Dfile=lwjgl_util_applet-javadoc.jar" />
- <arg value="-Dclassifier=javadoc" />
- <arg value="-Plwjglgpg" />
- </artifact:mvn>
-
- <!-- jinput.jar -->
-
- <artifact:mvn>
- <arg value="${mvncommand}" />
- <arg value="-Durl=${mavenrepo}" />
- <arg value="-DrepositoryId=${mavenrepoId}" />
- <arg value="-DpomFile=jinput.pom" />
- <arg value="-Dfile=jinput.jar" />
- <arg value="-Plwjglgpg" />
- </artifact:mvn>
-
- <!-- jinput natives -->
-
- <artifact:mvn>
- <arg value="${mvncommand}" />
- <arg value="-Durl=${mavenrepo}" />
- <arg value="-DrepositoryId=${mavenrepoId}" />
- <arg value="-DpomFile=jinput-platform.pom" />
- <arg value="-Dfile=jinput-platform-natives-win.jar" />
- <arg value="-Dclassifier=natives-win" />
- <arg value="-Plwjglgpg" />
- </artifact:mvn>
-
- <artifact:mvn>
- <arg value="${mvncommand}" />
- <arg value="-Durl=${mavenrepo}" />
- <arg value="-DrepositoryId=${mavenrepoId}" />
- <arg value="-DpomFile=jinput-platform.pom" />
- <arg value="-Dfile=jinput-platform-natives-linux.jar" />
- <arg value="-Dclassifier=natives-linux" />
- <arg value="-Plwjglgpg" />
- </artifact:mvn>
-
- <artifact:mvn>
- <arg value="${mvncommand}" />
- <arg value="-Durl=${mavenrepo}" />
- <arg value="-DrepositoryId=${mavenrepoId}" />
- <arg value="-DpomFile=jinput-platform.pom" />
- <arg value="-Dfile=jinput-platform-natives-mac.jar" />
- <arg value="-Dclassifier=natives-mac" />
- <arg value="-Plwjglgpg" />
- </artifact:mvn>
-
- </target>
-</project>
\ No newline at end of file
+
+</project>
Deleted: trunk/LWJGL/maven/jinput-platform.pom
===================================================================
--- trunk/LWJGL/maven/jinput-platform.pom 2011-09-07 21:28:01 UTC (rev 3636)
+++ trunk/LWJGL/maven/jinput-platform.pom 2011-09-08 21:35:54 UTC (rev 3637)
@@ -1,32 +0,0 @@
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.lwjgl.lwjgl</groupId>
- <artifactId>parent</artifactId>
- <version>@VERSION@</version>
- </parent>
- <groupId>org.lwjgl.lwjgl</groupId>
- <artifactId>jinput-platform</artifactId>
- <packaging>jar</packaging>
- <name>JInput - Java Game Controller API</name>
- <version>@VERSION@</version>
- <description>JInput - Java Game Controller API</description>
- <url>http://java.net/projects/jinput</url>
- <licenses>
- <license>
- <name>BSD</name>
- <url>http://www.opensource.org/licenses/bsd-license.php</url>
- <distribution>repo</distribution>
- </license>
- </licenses>
- <developers>
- <developer>
- <id>Members</id>
- <url>http://java.net/projects/jinput/members</url>
- </developer>
- </developers>
- <scm>
- <url>http://java.net/projects/jinput/sources/svn/show</url>
- <connection>https://svn.java.net/svn/jinput~svn </connection>
- </scm>
-</project>
Deleted: trunk/LWJGL/maven/jinput.pom
===================================================================
--- trunk/LWJGL/maven/jinput.pom 2011-09-07 21:28:01 UTC (rev 3636)
+++ trunk/LWJGL/maven/jinput.pom 2011-09-08 21:35:54 UTC (rev 3637)
@@ -1,52 +0,0 @@
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.lwjgl.lwjgl</groupId>
- <artifactId>parent</artifactId>
- <version>@VERSION@</version>
- </parent>
- <groupId>org.lwjgl.lwjgl</groupId>
- <artifactId>jinput</artifactId>
- <packaging>jar</packaging>
- <name>JInput - Java Game Controller API</name>
- <version>@VERSION@</version>
- <description>JInput - Java Game Controller API</description>
- <url>http://java.net/projects/jinput</url>
- <licenses>
- <license>
- <name>BSD</name>
- <url>http://www.opensource.org/licenses/bsd-license.php</url>
- <distribution>repo</distribution>
- </license>
- </licenses>
- <developers>
- <developer>
- <id>Members</id>
- <url>http://java.net/projects/jinput/members</url>
- </developer>
- </developers>
- <scm>
- <url>http://java.net/projects/jinput/sources/svn/show</url>
- <connection>https://svn.java.net/svn/jinput~svn </connection>
- </scm>
- <dependencies>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>jinput-platform</artifactId>
- <version>${project.version}</version>
- <classifier>natives-win</classifier>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>jinput-platform</artifactId>
- <version>${project.version}</version>
- <classifier>natives-linux</classifier>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>jinput-platform</artifactId>
- <version>${project.version}</version>
- <classifier>natives-mac</classifier>
- </dependency>
- </dependencies>
-</project>
Modified: trunk/LWJGL/maven/lwjgl.pom
===================================================================
--- trunk/LWJGL/maven/lwjgl.pom 2011-09-07 21:28:01 UTC (rev 3636)
+++ trunk/LWJGL/maven/lwjgl.pom 2011-09-08 21:35:54 UTC (rev 3637)
@@ -22,7 +22,7 @@
<groupId>${project.groupId}</groupId>
<artifactId>lwjgl-platform</artifactId>
<version>${project.version}</version>
- <classifier>natives-win</classifier>
+ <classifier>natives-windows</classifier>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
@@ -34,12 +34,12 @@
<groupId>${project.groupId}</groupId>
<artifactId>lwjgl-platform</artifactId>
<version>${project.version}</version>
- <classifier>natives-mac</classifier>
+ <classifier>natives-osx</classifier>
</dependency>
<dependency>
- <groupId>${project.groupId}</groupId>
+ <groupId>net.java.jinput</groupId>
<artifactId>jinput</artifactId>
- <version>${project.version}</version>
+ <version>@JINPUTVERSION@</version>
</dependency>
</dependencies>
</project>
Modified: trunk/LWJGL/platform_build/build-maven.xml
===================================================================
--- trunk/LWJGL/platform_build/build-maven.xml 2011-09-07 21:28:01 UTC (rev 3636)
+++ trunk/LWJGL/platform_build/build-maven.xml 2011-09-08 21:35:54 UTC (rev 3637)
@@ -4,6 +4,7 @@
<property name="lwjgl.maven" location="maven" />
<property name="lwjgl.dstMaven" location="${lwjgl.temp}/maven" />
<property name="lwjgl.src.java" location="${lwjgl.src}/java" />
+ <property name="jinput.version" value="2.0.5" />
<fileset id="lwjgl-sources.manual.fileset" dir="${lwjgl.src.java}">
<patternset refid="lwjgl.package.pattern" />
@@ -36,6 +37,32 @@
]]>
</script>
</target>
+
+ <target name="-checkjinputversion">
+ <script language="javascript" classpath="${lwjgl.lib}/jinput.jar">
+ <![CDATA[
+ importPackage(java.lang);
+ var version = net.java.games.input.Version.getVersion()
+ project.setNewProperty("jinputversion",version);
+ var declaredJinputVersion = project.getProperty("jinput.version");
+ System.out.println("JINPUT Version: " + version + " - DeclaredVersion: " + declaredJinputVersion);
+
+ if(declaredJinputVersion.equals(version)){
+ System.out.println("JINPUT Version Matches");
+ project.setNewProperty("jinputversionmatches", true);
+ } else {
+ System.out.println("JINPUT Version don't match");
+ }
+ ]]>
+ </script>
+ <condition property="failjinputcheck">
+ <and>
+ <not><isset property="jinputversionmatches" /></not>
+ <not><isset property="overridejinput" /></not>
+ </and>
+ </condition>
+ <fail if="failjinputcheck" message="Jinput version in project is different from the declared jinput version for maven add -Doverridejinput=true as a command line option to avoid this check" />
+ </target>
<target name="maven-full">
<antcall target="clean-java" />
@@ -47,7 +74,7 @@
<antcall target="maven"/>
</target>
- <target name="maven" depends="-fixmavenversion"> <!-- Added as dependency because using antcall creates a new project scope -->
+ <target name="maven" depends="-fixmavenversion, -checkjinputversion"> <!-- Added as dependency because using antcall creates a new project scope -->
<delete dir="${lwjgl.dstMaven}" quiet="true" failonerror="false" taskname="cleaning maven dist" />
<mkdir dir="${lwjgl.dstMaven}" taskname="initialiazing temp maven folder" />
<antcall target="-copylwjgljars" />
@@ -56,9 +83,14 @@
<antcall target="-createmavennativejars" />
<antcall target="-copymavenpoms"/>
<antcall target="-copymavendeploybuild"/>
- <antcall target="-addjinput"/>
<antcall target="-copymaventdist"/>
</target>
+
+
+
+
+
+
<target name="-copylwjgljars">
@@ -127,7 +159,7 @@
</target>
<target name="-createmavennativejars">
- <jar destfile="${lwjgl.dstMaven}/lwjgl-platform-natives-win.jar" taskname="lwjgl-platform-natives-win.jar">
+ <jar destfile="${lwjgl.dstMaven}/lwjgl-platform-natives-windows.jar" taskname="lwjgl-platform-natives-windows.jar">
<fileset dir="${lwjgl.lib}/windows">
<patternset refid="lwjgl-windows-lwjgl.fileset"/>
</fileset>
@@ -137,7 +169,7 @@
<patternset refid="lwjgl-linux-lwjgl.fileset"/>
</fileset>
</jar>
- <jar destfile="${lwjgl.dstMaven}/lwjgl-platform-natives-mac.jar" taskname="lwjgl-platform-natives-mac.jar">
+ <jar destfile="${lwjgl.dstMaven}/lwjgl-platform-natives-osx.jar" taskname="lwjgl-platform-natives-osx.jar">
<fileset dir="${lwjgl.lib}/macosx">
<patternset refid="lwjgl-macosx-lwjgl.fileset"/>
</fileset>
@@ -151,6 +183,7 @@
</fileset>
<filterset>
<filter token="VERSION" value="${lwjgl-maven-version}"/>
+ <filter token="JINPUTVERSION" value="${jinput.version}"/>
</filterset>
</copy>
</target>
@@ -163,43 +196,6 @@
</copy>
</target>
- <!-- JINPUT -->
- <target name="-addjinput">
- <antcall target="-copyjinputjar" />
- <antcall target="-createmavennativejinputjars" />
- </target>
-
- <target name="-copyjinputjar">
- <copy todir="${lwjgl.dstMaven}">
- <fileset dir="${lwjgl.lib}">
- <patternset>
- <include name="jinput.jar" />
- </patternset>
- </fileset>
- </copy>
- </target>
-
-
- <target name="-createmavennativejinputjars">
- <jar destfile="${lwjgl.dstMaven}/jinput-platform-natives-win.jar" taskname="jinput-platform-natives-win.jar">
- <fileset dir="${lwjgl.lib}/windows">
- <patternset refid="lwjgl-windows-jinput.fileset"/>
- </fileset>
- </jar>
- <jar destfile="${lwjgl.dstMaven}/jinput-platform-natives-linux.jar" taskname="jinput-platform-natives-linux.jar">
- <fileset dir="${lwjgl.lib}/linux">
- <patternset refid="lwjgl-linux-jinput.fileset"/>
- </fileset>
- </jar>
- <jar destfile="${lwjgl.dstMaven}/jinput-platform-natives-mac.jar" taskname="jinput-platform-natives-mac.jar">
- <fileset dir="${lwjgl.lib}/macosx">
- <patternset refid="lwjgl-macosx-jinput.fileset"/>
- </fileset>
- </jar>
- </target>
-
- <!-- END JINPUT -->
-
<target name="-copymaventdist">
<zip destfile="${lwjgl.dist}/lwjgl-maven-${lwjgl.version}.zip" basedir="${lwjgl.temp}" includes="maven/**" />
</target>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sp...@us...> - 2011-09-29 08:36:42
|
Revision: 3643
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3643&view=rev
Author: spasi
Date: 2011-09-29 08:36:36 +0000 (Thu, 29 Sep 2011)
Log Message:
-----------
Added support for INTEL_immediate_execution.
Modified Paths:
--------------
trunk/LWJGL/platform_build/build-definitions.xml
Added Paths:
-----------
trunk/LWJGL/src/templates/org/lwjgl/opencl/INTEL_immediate_execution.java
Modified: trunk/LWJGL/platform_build/build-definitions.xml
===================================================================
--- trunk/LWJGL/platform_build/build-definitions.xml 2011-09-27 22:38:32 UTC (rev 3642)
+++ trunk/LWJGL/platform_build/build-definitions.xml 2011-09-29 08:36:36 UTC (rev 3643)
@@ -17,7 +17,7 @@
<property name="opengl-template-pattern" value="org/lwjgl/opengl/GL*.java,org/lwjgl/opengl/ARB*.java,org/lwjgl/opengl/AMD*.java,org/lwjgl/opengl/APPLE*.java,org/lwjgl/opengl/ATI*.java,org/lwjgl/opengl/EXT*.java,org/lwjgl/opengl/NV*.java,org/lwjgl/opengl/NVX*.java,org/lwjgl/opengl/HP*.java,org/lwjgl/opengl/IBM*.java,org/lwjgl/opengl/SUN*.java,org/lwjgl/opengl/SGIS*.java,org/lwjgl/opengl/GREMEDY*.java"/>
<property name="opengles-template-pattern" value="org/lwjgl/opengles/GLES*.java,org/lwjgl/opengles/ARB*.java,org/lwjgl/opengles/EXT*.java,org/lwjgl/opengles/AMD*.java,org/lwjgl/opengles/ANGLE*.java,org/lwjgl/opengles/APPLE*.java,org/lwjgl/opengles/ARM*.java,org/lwjgl/opengles/DMP*.java,org/lwjgl/opengles/IMG*.java,org/lwjgl/opengles/NV*.java,org/lwjgl/opengles/OES*.java,org/lwjgl/opengles/QCOM*.java,org/lwjgl/opengles/VIV*.java"/>
- <property name="opencl-template-pattern-extensions" value="org/lwjgl/opencl/KHR*.java,org/lwjgl/opencl/EXT*.java,org/lwjgl/opencl/APPLE*.java,org/lwjgl/opencl/AMD*.java,org/lwjgl/opencl/NV*.java"/>
+ <property name="opencl-template-pattern-extensions" value="org/lwjgl/opencl/KHR*.java,org/lwjgl/opencl/EXT*.java,org/lwjgl/opencl/APPLE*.java,org/lwjgl/opencl/AMD*.java,org/lwjgl/opencl/INTEL*.java,org/lwjgl/opencl/NV*.java"/>
<property name="opencl-template-pattern" value="org/lwjgl/opencl/CL*.java,${opencl-template-pattern-extensions}"/>
<!-- ================================================================== -->
Added: trunk/LWJGL/src/templates/org/lwjgl/opencl/INTEL_immediate_execution.java
===================================================================
--- trunk/LWJGL/src/templates/org/lwjgl/opencl/INTEL_immediate_execution.java (rev 0)
+++ trunk/LWJGL/src/templates/org/lwjgl/opencl/INTEL_immediate_execution.java 2011-09-29 08:36:36 UTC (rev 3643)
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2002-2010 LWJGL Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * * Neither the name of 'LWJGL' nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package org.lwjgl.opencl;
+
+import org.lwjgl.util.generator.opencl.CLDeviceExtension;
+
+@CLDeviceExtension
+public interface INTEL_immediate_execution {
+
+ // TODO: Update when spec is released publicly.
+
+ /** cl_command_queue_properties - bitfield */
+ int CL_QUEUE_IMMEDIATE_EXECUTION_ENABLE_INTEL = (1 << 2);
+
+ /** cl_device_exec_capabilities - bitfield */
+ int CL_EXEC_IMMEDIATE_EXECUTION_INTEL = (1 << 2);
+
+}
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2011-10-06 21:11:53
|
Revision: 3651
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3651&view=rev
Author: kappa1
Date: 2011-10-06 21:11:46 +0000 (Thu, 06 Oct 2011)
Log Message:
-----------
update credits
Modified Paths:
--------------
trunk/LWJGL/doc/CREDITS
trunk/LWJGL/www/credits.php
Modified: trunk/LWJGL/doc/CREDITS
===================================================================
--- trunk/LWJGL/doc/CREDITS 2011-10-06 20:16:37 UTC (rev 3650)
+++ trunk/LWJGL/doc/CREDITS 2011-10-06 21:11:46 UTC (rev 3651)
@@ -3,7 +3,7 @@
- Brian Matzon <br...@ma...>
- Elias Naur <eli...@gm...>
- Ioannis Tsakpinis <sp...@us...>
- - Niels J\xF8rgensen <nj...@ni...>
+ - Niels J�rgensen <nj...@ni...>
- Tristan Campbell <tr...@ha...>
- Gregory Pierce <gre...@ya...>
- Luke Holden <lh...@us...>
@@ -19,6 +19,7 @@
- Jens von Pilgrim
- Ruben Garat
- Pelle Johnsen <pel...@gm...>
+ - Jae Kwon
additional credits goes to:
- Joseph I. Valenzuela [OpenAL stuff]
Modified: trunk/LWJGL/www/credits.php
===================================================================
--- trunk/LWJGL/www/credits.php 2011-10-06 20:16:37 UTC (rev 3650)
+++ trunk/LWJGL/www/credits.php 2011-10-06 21:11:46 UTC (rev 3651)
@@ -23,6 +23,7 @@
<li>Ryan McNally</li>
<li>Ciardhubh</li>
<li>Pelle Johnsen</li>
+ <li>Jae Kwon</li>
</ul>
<p>
<b>Additional credits goes to</b>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sp...@us...> - 2011-10-11 16:06:30
|
Revision: 3656
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3656&view=rev
Author: spasi
Date: 2011-10-11 16:06:23 +0000 (Tue, 11 Oct 2011)
Log Message:
-----------
Fixed build to include missing OpenGL ES classes on which Display depends.
Excluded desktop OpenGL extensions from the OpenGL ES build.
Modified Paths:
--------------
trunk/LWJGL/build.xml
trunk/LWJGL/platform_build/build-definitions.xml
trunk/LWJGL/platform_build/build-maven.xml
Modified: trunk/LWJGL/build.xml
===================================================================
--- trunk/LWJGL/build.xml 2011-10-10 10:18:03 UTC (rev 3655)
+++ trunk/LWJGL/build.xml 2011-10-11 16:06:23 UTC (rev 3656)
@@ -132,6 +132,7 @@
<!-- Create lwjgl.jar -->
<jar destfile="${lwjgl.temp}/jar/lwjgl-debug.jar" taskname="lwjgl-debug.jar">
<fileset refid="lwjgl.fileset" />
+ <fileset refid="lwjgl.fileset.dependencies"/>
<manifest>
<attribute name="Sealed" value="true"/>
</manifest>
@@ -143,12 +144,7 @@
<!-- Create lwjgl.jar -->
<jar destfile="${lwjgl.temp}/jar/lwjgl.jar" taskname="lwjgl.jar">
<fileset refid="lwjgl.fileset" />
- <fileset dir="${lwjgl.bin}"> <!-- Display has a dependency on these -->
- <patternset>
- <include name="org/lwjgl/opengles/ContextAttribs.*"/>
- <include name="org/lwjgl/opengles/PixelFormat.*"/>
- </patternset>
- </fileset>
+ <fileset refid="lwjgl.fileset.dependencies"/>
<manifest>
<attribute name="Sealed" value="true"/>
</manifest>
@@ -177,9 +173,40 @@
<!-- Packages the java files for the ES build -->
<target name="-createjars_es">
+ <!-- ================================================================== -->
+ <!-- Generate a list of the OpenGL extension classes -->
+ <!-- ================================================================== -->
+ <fileset id="opengl-template-fileset" dir="${lwjgl.src}/generated" includes="${opengl-template-pattern}"/>
+ <property name="opengl-template-files" refid="opengl-template-fileset"/>
+
+ <tempfile property="temp.file"/>
+ <echo file="${temp.file}" message="${opengl-template-files}" taskname=""/>
+
+ <loadfile srcfile="${temp.file}" property="opengl-template-classes">
+ <filterchain>
+ <tokenfilter delimoutput=",">
+ <stringtokenizer delims=";"/>
+ <replaceregex pattern="org\${file.separator}lwjgl\${file.separator}opengl\${file.separator}(.+)[.]java"
+ replace="org/lwjgl/opengl/\1.class"/>
+ </tokenfilter>
+ </filterchain>
+ </loadfile>
+
+ <delete file="${temp.file}" />
+
<!-- Create lwjgl.jar -->
<jar destfile="${lwjgl.temp}/jar/lwjgl.jar" taskname="lwjgl.jar">
- <fileset refid="lwjgl_es.fileset"/>
+ <!-- Files to include in the lwjgl.jar file, for the ES build -->
+ <fileset dir="${lwjgl.bin}" excludes="${opengl-template-classes}">
+ <patternset id="lwjgl_es.package.pattern">
+ <include name="org/**/*"/>
+ <exclude name="org/lwjgl/d3d/**"/>
+ <exclude name="org/lwjgl/test/**"/>
+ <exclude name="org/lwjgl/util/**"/>
+ <exclude name="org/lwjgl/examples/**"/>
+ </patternset>
+ </fileset>
+
<manifest>
<attribute name="Sealed" value="true"/>
</manifest>
Modified: trunk/LWJGL/platform_build/build-definitions.xml
===================================================================
--- trunk/LWJGL/platform_build/build-definitions.xml 2011-10-10 10:18:03 UTC (rev 3655)
+++ trunk/LWJGL/platform_build/build-definitions.xml 2011-10-11 16:06:23 UTC (rev 3656)
@@ -35,15 +35,10 @@
<exclude name="org/lwjgl/examples/**" />
</patternset>
</fileset>
-
- <!-- Files to include in the lwjgl.jar file, for the ES build -->
- <fileset id="lwjgl_es.fileset" dir="${lwjgl.bin}">
- <patternset id="lwjgl_es.package.pattern">
- <include name="org/**/*"/>
- <exclude name="org/lwjgl/d3d/**"/>
- <exclude name="org/lwjgl/test/**"/>
- <exclude name="org/lwjgl/util/**"/>
- <exclude name="org/lwjgl/examples/**"/>
+ <fileset id="lwjgl.fileset.dependencies" dir="${lwjgl.bin}">
+ <patternset id="lwjgl.package.dependencies.pattern">
+ <include name="org/lwjgl/opengles/ContextAttribs*.*"/>
+ <include name="org/lwjgl/opengles/PixelFormat*.*"/>
</patternset>
</fileset>
Modified: trunk/LWJGL/platform_build/build-maven.xml
===================================================================
--- trunk/LWJGL/platform_build/build-maven.xml 2011-10-10 10:18:03 UTC (rev 3655)
+++ trunk/LWJGL/platform_build/build-maven.xml 2011-10-11 16:06:23 UTC (rev 3656)
@@ -8,6 +8,7 @@
<fileset id="lwjgl-sources.manual.fileset" dir="${lwjgl.src.java}">
<patternset refid="lwjgl.package.pattern" />
+ <patternset refid="lwjgl.package.dependencies.pattern"/>
</fileset>
<fileset id="lwjgl-sources.generated.fileset" dir="${lwjgl.src.generated}">
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2011-10-11 17:39:43
|
Revision: 3657
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3657&view=rev
Author: matzon
Date: 2011-10-11 17:39:37 +0000 (Tue, 11 Oct 2011)
Log Message:
-----------
bumping version to 2.8.1
Modified Paths:
--------------
trunk/LWJGL/platform_build/build-definitions.xml
trunk/LWJGL/src/java/org/lwjgl/Sys.java
Modified: trunk/LWJGL/platform_build/build-definitions.xml
===================================================================
--- trunk/LWJGL/platform_build/build-definitions.xml 2011-10-11 16:06:23 UTC (rev 3656)
+++ trunk/LWJGL/platform_build/build-definitions.xml 2011-10-11 17:39:37 UTC (rev 3657)
@@ -12,7 +12,7 @@
<property name="lwjgl.docs" location="doc" />
<property name="lwjgl.temp" location="temp" />
<property name="lwjgl.res" location="res" />
- <property name="lwjgl.version" value="2.8.0" />
+ <property name="lwjgl.version" value="2.8.1" />
<property name="lwjgl.web" location="www" />
<property name="opengl-template-pattern" value="org/lwjgl/opengl/GL*.java,org/lwjgl/opengl/ARB*.java,org/lwjgl/opengl/AMD*.java,org/lwjgl/opengl/APPLE*.java,org/lwjgl/opengl/ATI*.java,org/lwjgl/opengl/EXT*.java,org/lwjgl/opengl/NV*.java,org/lwjgl/opengl/NVX*.java,org/lwjgl/opengl/HP*.java,org/lwjgl/opengl/IBM*.java,org/lwjgl/opengl/SUN*.java,org/lwjgl/opengl/SGIS*.java,org/lwjgl/opengl/GREMEDY*.java"/>
Modified: trunk/LWJGL/src/java/org/lwjgl/Sys.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/Sys.java 2011-10-11 16:06:23 UTC (rev 3656)
+++ trunk/LWJGL/src/java/org/lwjgl/Sys.java 2011-10-11 17:39:37 UTC (rev 3657)
@@ -54,7 +54,7 @@
private static final String JNI_LIBRARY_NAME = "lwjgl";
/** Current version of library */
- private static final String VERSION = "2.8.0";
+ private static final String VERSION = "2.8.1";
private static final String POSTFIX64BIT = "64";
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sp...@us...> - 2011-10-12 18:54:47
|
Revision: 3664
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3664&view=rev
Author: spasi
Date: 2011-10-12 18:54:40 +0000 (Wed, 12 Oct 2011)
Log Message:
-----------
Removed org.lwjgl.opengles.PixelFormat dependency from Display.
Modified Paths:
--------------
trunk/LWJGL/platform_build/build-definitions.xml
trunk/LWJGL/src/java/org/lwjgl/opengl/Display.java
Removed Paths:
-------------
trunk/LWJGL/src/java/org/lwjgl/opengl/ContextType.java
Modified: trunk/LWJGL/platform_build/build-definitions.xml
===================================================================
--- trunk/LWJGL/platform_build/build-definitions.xml 2011-10-12 18:05:32 UTC (rev 3663)
+++ trunk/LWJGL/platform_build/build-definitions.xml 2011-10-12 18:54:40 UTC (rev 3664)
@@ -38,7 +38,6 @@
<fileset id="lwjgl.fileset.dependencies" dir="${lwjgl.bin}">
<patternset id="lwjgl.package.dependencies.pattern">
<include name="org/lwjgl/opengles/ContextAttribs*.*"/>
- <include name="org/lwjgl/opengles/PixelFormat*.*"/>
</patternset>
</fileset>
Deleted: trunk/LWJGL/src/java/org/lwjgl/opengl/ContextType.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/ContextType.java 2011-10-12 18:05:32 UTC (rev 3663)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/ContextType.java 2011-10-12 18:54:40 UTC (rev 3664)
@@ -1,45 +0,0 @@
-/*
- * Copyright (c) 2002-2011 LWJGL Project
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * * Neither the name of 'LWJGL' nor the names of
- * its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package org.lwjgl.opengl;
-
-/**
- * This enum can be used in the default Display.create method to specify
- * the context type that will be created.
- *
- * @author Spasi
- */
-public enum ContextType {
-
- GL,
- GLES,
-
-}
\ No newline at end of file
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/Display.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/Display.java 2011-10-12 18:05:32 UTC (rev 3663)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/Display.java 2011-10-12 18:54:40 UTC (rev 3664)
@@ -750,32 +750,6 @@
}
/**
- * Create the Display with the specified context type. If isFullscreen() is true or if windowed
- * context are not supported on the platform, the display mode will be switched to the mode returned by
- * getDisplayMode(), and a fullscreen context will be created. If isFullscreen() is false, a windowed context
- * will be created with the dimensions given in the mode returned by getDisplayMode(). If a context can't be
- * created with the given parameters, a LWJGLException will be thrown.
- * <p/>
- * <p>The window created will be set up in orthographic 2D projection, with 1:1 pixel ratio with GL coordinates.
- *
- * @param type the context type to create
- *
- * @throws LWJGLException
- */
- public static void create(ContextType type) throws LWJGLException {
- synchronized ( GlobalLock.lock ) {
- switch ( type ) {
- case GL:
- create(new PixelFormat());
- break;
- case GLES:
- create(new org.lwjgl.opengles.PixelFormat());
- break;
- }
- }
- }
-
- /**
* Create the OpenGL context. If isFullscreen() is true or if windowed
* context are not supported on the platform, the display mode will be switched to the mode returned by
* getDisplayMode(), and a fullscreen context will be created. If isFullscreen() is false, a windowed context
@@ -787,7 +761,7 @@
* @throws LWJGLException
*/
public static void create() throws LWJGLException {
- create(ContextType.GL);
+ create(new PixelFormat());
}
/**
@@ -805,7 +779,7 @@
*/
public static void create(PixelFormat pixel_format) throws LWJGLException {
synchronized ( GlobalLock.lock ) {
- create(pixel_format, null, null);
+ create(pixel_format, null, (ContextAttribs)null);
}
}
@@ -825,7 +799,7 @@
*/
public static void create(PixelFormat pixel_format, Drawable shared_drawable) throws LWJGLException {
synchronized ( GlobalLock.lock ) {
- create(pixel_format, shared_drawable, null);
+ create(pixel_format, shared_drawable, (ContextAttribs)null);
}
}
@@ -930,19 +904,19 @@
* <p/>
* <p>The window created will be set up in orthographic 2D projection, with 1:1 pixel ratio with GL coordinates.
*
- * @param pixel_format Describes the minimum specifications the context must fulfill.
+ * @param pixel_format Describes the minimum specifications the context must fulfill. Must be an instance of org.lwjgl.opengles.PixelFormat.
*
* @throws LWJGLException
*/
- public static void create(org.lwjgl.opengles.PixelFormat pixel_format) throws LWJGLException {
+ public static void create(PixelFormatLWJGL pixel_format) throws LWJGLException {
synchronized ( GlobalLock.lock ) {
create(pixel_format, null, null);
}
}
/**
- * Create the OpenGL context with the given minimum parameters. If isFullscreen() is true or if windowed
+ * Create the OpenGL ES context with the given minimum parameters. If isFullscreen() is true or if windowed
* context are not supported on the platform, the display mode will be switched to the mode returned by
* getDisplayMode(), and a fullscreen context will be created. If isFullscreen() is false, a windowed context
* will be created with the dimensions given in the mode returned by getDisplayMode(). If a context can't be
@@ -950,19 +924,19 @@
* <p/>
* <p>The window created will be set up in orthographic 2D projection, with 1:1 pixel ratio with GL coordinates.
*
- * @param pixel_format Describes the minimum specifications the context must fulfill.
+ * @param pixel_format Describes the minimum specifications the context must fulfill. Must be an instance of org.lwjgl.opengles.PixelFormat.
* @param shared_drawable The Drawable to share context with. (optional, may be null)
*
* @throws LWJGLException
*/
- public static void create(org.lwjgl.opengles.PixelFormat pixel_format, Drawable shared_drawable) throws LWJGLException {
+ public static void create(PixelFormatLWJGL pixel_format, Drawable shared_drawable) throws LWJGLException {
synchronized ( GlobalLock.lock ) {
create(pixel_format, shared_drawable, null);
}
}
/**
- * Create the OpenGL context with the given minimum parameters. If isFullscreen() is true or if windowed
+ * Create the OpenGL ES context with the given minimum parameters. If isFullscreen() is true or if windowed
* context are not supported on the platform, the display mode will be switched to the mode returned by
* getDisplayMode(), and a fullscreen context will be created. If isFullscreen() is false, a windowed context
* will be created with the dimensions given in the mode returned by getDisplayMode(). If a context can't be
@@ -970,12 +944,12 @@
* <p/>
* <p>The window created will be set up in orthographic 2D projection, with 1:1 pixel ratio with GL coordinates.
*
- * @param pixel_format Describes the minimum specifications the context must fulfill.
+ * @param pixel_format Describes the minimum specifications the context must fulfill. Must be an instance of org.lwjgl.opengles.PixelFormat.
* @param attribs The ContextAttribs to use when creating the context. (optional, may be null)
*
* @throws LWJGLException
*/
- public static void create(org.lwjgl.opengles.PixelFormat pixel_format, org.lwjgl.opengles.ContextAttribs attribs) throws LWJGLException {
+ public static void create(PixelFormatLWJGL pixel_format, org.lwjgl.opengles.ContextAttribs attribs) throws LWJGLException {
synchronized ( GlobalLock.lock ) {
create(pixel_format, null, attribs);
}
@@ -990,13 +964,13 @@
* <p/>
* <p>The window created will be set up in orthographic 2D projection, with 1:1 pixel ratio with GL coordinates.
*
- * @param pixel_format Describes the minimum specifications the context must fulfill.
+ * @param pixel_format Describes the minimum specifications the context must fulfill. Must be an instance of org.lwjgl.opengles.PixelFormat.
* @param shared_drawable The Drawable to share context with. (optional, may be null)
* @param attribs The ContextAttribs to use when creating the context. (optional, may be null)
*
* @throws LWJGLException
*/
- public static void create(org.lwjgl.opengles.PixelFormat pixel_format, Drawable shared_drawable, org.lwjgl.opengles.ContextAttribs attribs) throws LWJGLException {
+ public static void create(PixelFormatLWJGL pixel_format, Drawable shared_drawable, org.lwjgl.opengles.ContextAttribs attribs) throws LWJGLException {
synchronized ( GlobalLock.lock ) {
if ( isCreated() )
throw new IllegalStateException("Only one LWJGL context may be instantiated at any one time.");
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2011-10-17 07:45:53
|
Revision: 3680
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3680&view=rev
Author: matzon
Date: 2011-10-17 07:45:46 +0000 (Mon, 17 Oct 2011)
Log Message:
-----------
switching to 2.8.2
Modified Paths:
--------------
trunk/LWJGL/platform_build/build-definitions.xml
trunk/LWJGL/src/java/org/lwjgl/Sys.java
Modified: trunk/LWJGL/platform_build/build-definitions.xml
===================================================================
--- trunk/LWJGL/platform_build/build-definitions.xml 2011-10-15 22:11:38 UTC (rev 3679)
+++ trunk/LWJGL/platform_build/build-definitions.xml 2011-10-17 07:45:46 UTC (rev 3680)
@@ -12,7 +12,7 @@
<property name="lwjgl.docs" location="doc" />
<property name="lwjgl.temp" location="temp" />
<property name="lwjgl.res" location="res" />
- <property name="lwjgl.version" value="2.8.1" />
+ <property name="lwjgl.version" value="2.8.2" />
<property name="lwjgl.web" location="www" />
<property name="opengl-template-pattern" value="org/lwjgl/opengl/GL*.java,org/lwjgl/opengl/ARB*.java,org/lwjgl/opengl/AMD*.java,org/lwjgl/opengl/APPLE*.java,org/lwjgl/opengl/ATI*.java,org/lwjgl/opengl/EXT*.java,org/lwjgl/opengl/NV*.java,org/lwjgl/opengl/NVX*.java,org/lwjgl/opengl/HP*.java,org/lwjgl/opengl/IBM*.java,org/lwjgl/opengl/SUN*.java,org/lwjgl/opengl/SGIS*.java,org/lwjgl/opengl/GREMEDY*.java"/>
Modified: trunk/LWJGL/src/java/org/lwjgl/Sys.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/Sys.java 2011-10-15 22:11:38 UTC (rev 3679)
+++ trunk/LWJGL/src/java/org/lwjgl/Sys.java 2011-10-17 07:45:46 UTC (rev 3680)
@@ -54,7 +54,7 @@
private static final String JNI_LIBRARY_NAME = "lwjgl";
/** Current version of library */
- private static final String VERSION = "2.8.1";
+ private static final String VERSION = "2.8.2";
private static final String POSTFIX64BIT = "64";
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2011-11-13 21:20:49
|
Revision: 3699
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3699&view=rev
Author: matzon
Date: 2011-11-13 21:20:42 +0000 (Sun, 13 Nov 2011)
Log Message:
-----------
bumping to 2.8.3
Modified Paths:
--------------
trunk/LWJGL/platform_build/build-definitions.xml
trunk/LWJGL/src/java/org/lwjgl/Sys.java
Modified: trunk/LWJGL/platform_build/build-definitions.xml
===================================================================
--- trunk/LWJGL/platform_build/build-definitions.xml 2011-11-13 20:50:34 UTC (rev 3698)
+++ trunk/LWJGL/platform_build/build-definitions.xml 2011-11-13 21:20:42 UTC (rev 3699)
@@ -12,7 +12,7 @@
<property name="lwjgl.docs" location="doc" />
<property name="lwjgl.temp" location="temp" />
<property name="lwjgl.res" location="res" />
- <property name="lwjgl.version" value="2.8.2" />
+ <property name="lwjgl.version" value="2.8.3" />
<property name="lwjgl.web" location="www" />
<property name="opengl-template-pattern" value="org/lwjgl/opengl/GL*.java,org/lwjgl/opengl/ARB*.java,org/lwjgl/opengl/AMD*.java,org/lwjgl/opengl/APPLE*.java,org/lwjgl/opengl/ATI*.java,org/lwjgl/opengl/EXT*.java,org/lwjgl/opengl/NV*.java,org/lwjgl/opengl/NVX*.java,org/lwjgl/opengl/HP*.java,org/lwjgl/opengl/IBM*.java,org/lwjgl/opengl/SUN*.java,org/lwjgl/opengl/SGIS*.java,org/lwjgl/opengl/GREMEDY*.java"/>
Modified: trunk/LWJGL/src/java/org/lwjgl/Sys.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/Sys.java 2011-11-13 20:50:34 UTC (rev 3698)
+++ trunk/LWJGL/src/java/org/lwjgl/Sys.java 2011-11-13 21:20:42 UTC (rev 3699)
@@ -54,7 +54,7 @@
private static final String JNI_LIBRARY_NAME = "lwjgl";
/** Current version of library */
- private static final String VERSION = "2.8.2";
+ private static final String VERSION = "2.8.3";
private static final String POSTFIX64BIT = "64";
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sp...@us...> - 2011-11-16 14:36:41
|
Revision: 3701
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3701&view=rev
Author: spasi
Date: 2011-11-16 14:36:28 +0000 (Wed, 16 Nov 2011)
Log Message:
-----------
Added support for OpenCL 1.2 [UNTESTED]
Modified Paths:
--------------
trunk/LWJGL/platform_build/build-generator.xml
trunk/LWJGL/src/java/org/lwjgl/opencl/CLBuildProgramCallback.java
trunk/LWJGL/src/java/org/lwjgl/opencl/CLChecks.java
trunk/LWJGL/src/java/org/lwjgl/opencl/CLContext.java
trunk/LWJGL/src/java/org/lwjgl/opencl/CallbackUtil.java
trunk/LWJGL/src/java/org/lwjgl/opencl/InfoUtilFactory.java
trunk/LWJGL/src/java/org/lwjgl/util/generator/Utils.java
trunk/LWJGL/src/java/org/lwjgl/util/generator/opencl/CLPDCapabilitiesGenerator.java
trunk/LWJGL/src/native/common/extcl.h
trunk/LWJGL/src/native/common/extcl_types.h
trunk/LWJGL/src/native/common/org_lwjgl_opencl_CallbackUtil.c
trunk/LWJGL/src/templates/org/lwjgl/opencl/CL10.java
trunk/LWJGL/src/templates/org/lwjgl/opencl/CL11.java
trunk/LWJGL/src/templates/org/lwjgl/opencl/EXT_device_fission.java
trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_separate_shader_objects.java
trunk/LWJGL/src/templates/org/lwjgl/opengl/GL41.java
Added Paths:
-----------
trunk/LWJGL/src/java/org/lwjgl/opencl/CLCompileProgramCallback.java
trunk/LWJGL/src/java/org/lwjgl/opencl/CLLinkProgramCallback.java
trunk/LWJGL/src/java/org/lwjgl/opencl/CLPrintfCallback.java
trunk/LWJGL/src/java/org/lwjgl/opencl/CLProgramCallback.java
trunk/LWJGL/src/templates/org/lwjgl/opencl/CL12.java
trunk/LWJGL/src/templates/org/lwjgl/opencl/CL12GL.java
Modified: trunk/LWJGL/platform_build/build-generator.xml
===================================================================
--- trunk/LWJGL/platform_build/build-generator.xml 2011-11-13 21:21:52 UTC (rev 3700)
+++ trunk/LWJGL/platform_build/build-generator.xml 2011-11-16 14:36:28 UTC (rev 3701)
@@ -36,13 +36,10 @@
<include name="org/lwjgl/opencl/CLPlatform.java"/>
<include name="org/lwjgl/opencl/CLDevice.java"/>
<include name="org/lwjgl/opencl/CLContext.java"/>
- <include name="org/lwjgl/opencl/CLContextCallback.java"/>
<include name="org/lwjgl/opencl/CLCommandQueue.java"/>
<include name="org/lwjgl/opencl/CLMem.java"/>
- <include name="org/lwjgl/opencl/CLMemObjectDestructorCallback.java"/>
- <include name="org/lwjgl/opencl/CLBuildProgramCallback.java"/>
+ <include name="org/lwjgl/opencl/CL*Callback.java"/>
<include name="org/lwjgl/opencl/CLNativeKernel.java"/>
- <include name="org/lwjgl/opencl/CLEventCallback.java"/>
<include name="org/lwjgl/opencl/CLFunctionAddress.java"/>
</javac>
</target>
Modified: trunk/LWJGL/src/java/org/lwjgl/opencl/CLBuildProgramCallback.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opencl/CLBuildProgramCallback.java 2011-11-13 21:21:52 UTC (rev 3700)
+++ trunk/LWJGL/src/java/org/lwjgl/opencl/CLBuildProgramCallback.java 2011-11-16 14:36:28 UTC (rev 3701)
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002-2010 LWJGL Project
+ * Copyright (c) 2002-2011 LWJGL Project
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -31,8 +31,6 @@
*/
package org.lwjgl.opencl;
-import org.lwjgl.PointerWrapperAbstract;
-
/**
* Instances of this class can be used to receive OpenCL program build notifications.
* A single CLBuildProgramCallback instance should only be used with programs created
@@ -40,37 +38,6 @@
*
* @author Spasi
*/
-public abstract class CLBuildProgramCallback extends PointerWrapperAbstract {
+public abstract class CLBuildProgramCallback extends CLProgramCallback {
- private CLContext context;
-
- protected CLBuildProgramCallback() {
- super(CallbackUtil.getBuildProgramCallback());
- }
-
- /**
- * Sets the context that contains the CLPrograms to which we're registered.
- *
- * @param context the CLContext object
- */
- void setContext(final CLContext context) {
- this.context = context;
- }
-
- /**
- * Called from native code.
- *
- * @param program_address the CLProgram object pointer
- */
- private void handleMessage(long program_address) {
- handleMessage(context.getCLProgram(program_address));
- }
-
- /**
- * The callback method.
- *
- * @param program the CLProgram object that was built
- */
- protected abstract void handleMessage(CLProgram program);
-
}
\ No newline at end of file
Modified: trunk/LWJGL/src/java/org/lwjgl/opencl/CLChecks.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opencl/CLChecks.java 2011-11-13 21:21:52 UTC (rev 3700)
+++ trunk/LWJGL/src/java/org/lwjgl/opencl/CLChecks.java 2011-11-16 14:36:28 UTC (rev 3701)
@@ -53,23 +53,23 @@
/**
* Calculates the number of bytes in the specified cl_mem buffer rectangle region.
*
- * @param origin the host origin
+ * @param offset the host offset
* @param region the rectangle region
* @param row_pitch the host row pitch
* @param slice_pitch the host slice pitch
*
* @return the region size in bytes
*/
- static int calculateBufferRectSize(final PointerBuffer origin, final PointerBuffer region, long row_pitch, long slice_pitch) {
+ static int calculateBufferRectSize(final PointerBuffer offset, final PointerBuffer region, long row_pitch, long slice_pitch) {
if ( !LWJGLUtil.CHECKS )
return 0;
- final long x = origin.get(0);
- final long y = origin.get(1);
- final long z = origin.get(2);
+ final long x = offset.get(0);
+ final long y = offset.get(1);
+ final long z = offset.get(2);
if ( LWJGLUtil.DEBUG && (x < 0 || y < 0 || z < 0) )
- throw new IllegalArgumentException("Invalid cl_mem host origin: " + x + ", " + y + ", " + z);
+ throw new IllegalArgumentException("Invalid cl_mem host offset: " + x + ", " + y + ", " + z);
final long w = region.get(0);
final long h = region.get(1);
Added: trunk/LWJGL/src/java/org/lwjgl/opencl/CLCompileProgramCallback.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opencl/CLCompileProgramCallback.java (rev 0)
+++ trunk/LWJGL/src/java/org/lwjgl/opencl/CLCompileProgramCallback.java 2011-11-16 14:36:28 UTC (rev 3701)
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2002-2011 LWJGL Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * * Neither the name of 'LWJGL' nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package org.lwjgl.opencl;
+
+/**
+ * Instances of this class can be used to receive OpenCL program compilation notifications.
+ * A single CLCompileProgramCallback instance should only be used with programs created
+ * in the same CLContext.
+ *
+ * @author Spasi
+ */
+public abstract class CLCompileProgramCallback extends CLProgramCallback {
+
+}
\ No newline at end of file
Modified: trunk/LWJGL/src/java/org/lwjgl/opencl/CLContext.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opencl/CLContext.java 2011-11-13 21:21:52 UTC (rev 3700)
+++ trunk/LWJGL/src/java/org/lwjgl/opencl/CLContext.java 2011-11-16 14:36:28 UTC (rev 3701)
@@ -49,11 +49,15 @@
private static final CLContextUtil util = (CLContextUtil)CLPlatform.getInfoUtilInstance(CLContext.class, "CL_CONTEXT_UTIL");
private final CLObjectRegistry<CLCommandQueue> clCommandQueues;
- private final CLObjectRegistry<CLMem> clMems;
- private final CLObjectRegistry<CLSampler> clSamplers;
- private final CLObjectRegistry<CLProgram> clPrograms;
- private final CLObjectRegistry<CLEvent> clEvents;
+ private final CLObjectRegistry<CLMem> clMems;
+ private final CLObjectRegistry<CLSampler> clSamplers;
+ private final CLObjectRegistry<CLProgram> clPrograms;
+ private final CLObjectRegistry<CLEvent> clEvents;
+ private long
+ contextCallback,
+ printfCallback;
+
CLContext(final long pointer, final CLPlatform platform) {
super(pointer, platform);
@@ -269,4 +273,50 @@
CLObjectRegistry<CLEvent> getCLEventRegistry() { return clEvents; }
+ private boolean checkCallback(final long callback, final int result) {
+ if ( result == 0 && (callback == 0 || isValid()) )
+ return true;
+
+ if ( callback != 0 )
+ CallbackUtil.deleteGlobalRef(callback);
+ return false;
+ }
+
+ /**
+ * Associates this context with the specified context callback reference. If the context
+ * is invalid, the callback reference is deleted. NO-OP if user_data is 0.
+ *
+ * @param callback the context callback pointer
+ */
+ void setContextCallback(final long callback) {
+ if ( checkCallback(callback, 0) )
+ this.contextCallback = callback;
+ }
+
+ /**
+ * Associates this context with the specified printf callback reference. If the context
+ * is invalid, the callback reference is deleted. NO-OP if user_data is 0.
+ *
+ * @param callback the printf callback pointer
+ */
+ void setPrintfCallback(final long callback, final int result) {
+ if ( checkCallback(callback, result) )
+ this.printfCallback = callback;
+ }
+
+ /**
+ * Decrements the context's reference count. If the reference
+ * count hits zero, it also deletes
+ * any callback objects associated with it.
+ */
+ void releaseImpl() {
+ if ( release() > 0 )
+ return;
+
+ if ( contextCallback != 0 )
+ CallbackUtil.deleteGlobalRef(contextCallback);
+ if ( printfCallback != 0 )
+ CallbackUtil.deleteGlobalRef(printfCallback);
+ }
+
}
\ No newline at end of file
Added: trunk/LWJGL/src/java/org/lwjgl/opencl/CLLinkProgramCallback.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opencl/CLLinkProgramCallback.java (rev 0)
+++ trunk/LWJGL/src/java/org/lwjgl/opencl/CLLinkProgramCallback.java 2011-11-16 14:36:28 UTC (rev 3701)
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2002-2011 LWJGL Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * * Neither the name of 'LWJGL' nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package org.lwjgl.opencl;
+
+/**
+ * Instances of this class can be used to receive OpenCL program linkage notifications.
+ * A single CLLinkProgramCallback instance should only be used with programs created
+ * in the same CLContext.
+ *
+ * @author Spasi
+ */
+public abstract class CLLinkProgramCallback extends CLProgramCallback {
+
+}
\ No newline at end of file
Added: trunk/LWJGL/src/java/org/lwjgl/opencl/CLPrintfCallback.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opencl/CLPrintfCallback.java (rev 0)
+++ trunk/LWJGL/src/java/org/lwjgl/opencl/CLPrintfCallback.java 2011-11-16 14:36:28 UTC (rev 3701)
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2002-2011 LWJGL Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * * Neither the name of 'LWJGL' nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package org.lwjgl.opencl;
+
+import org.lwjgl.PointerWrapperAbstract;
+
+/**
+ * Instances of this class can be used to receive OpenCL printf messages.
+ * Different CLContexts should use different CLPrintfCallback instances.
+ *
+ * @author Spasi
+ */
+public abstract class CLPrintfCallback extends PointerWrapperAbstract {
+
+ protected CLPrintfCallback() {
+ super(CallbackUtil.getPrintfCallback());
+ }
+
+ /** The callback method. */
+ protected abstract void handleMessage(String data);
+
+}
\ No newline at end of file
Added: trunk/LWJGL/src/java/org/lwjgl/opencl/CLProgramCallback.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opencl/CLProgramCallback.java (rev 0)
+++ trunk/LWJGL/src/java/org/lwjgl/opencl/CLProgramCallback.java 2011-11-16 14:36:28 UTC (rev 3701)
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2002-2011 LWJGL Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * * Neither the name of 'LWJGL' nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package org.lwjgl.opencl;
+
+import org.lwjgl.PointerWrapperAbstract;
+
+/**
+ * Base class for OpenCL program action notifications.
+ *
+ * @author Spasi
+ */
+abstract class CLProgramCallback extends PointerWrapperAbstract {
+
+ private CLContext context;
+
+ protected CLProgramCallback() {
+ super(CallbackUtil.getProgramCallback());
+ }
+
+ /**
+ * Sets the context that contains the CLPrograms to which we're registered.
+ *
+ * @param context the CLContext object
+ */
+ final void setContext(final CLContext context) {
+ this.context = context;
+ }
+
+ /**
+ * Called from native code.
+ *
+ * @param program_address the CLProgram object pointer
+ */
+ private void handleMessage(long program_address) {
+ handleMessage(context.getCLProgram(program_address));
+ }
+
+ /**
+ * The callback method.
+ *
+ * @param program the CLProgram object affected
+ */
+ protected abstract void handleMessage(CLProgram program);
+
+}
\ No newline at end of file
Modified: trunk/LWJGL/src/java/org/lwjgl/opencl/CallbackUtil.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opencl/CallbackUtil.java 2011-11-13 21:21:52 UTC (rev 3700)
+++ trunk/LWJGL/src/java/org/lwjgl/opencl/CallbackUtil.java 2011-11-16 14:36:28 UTC (rev 3701)
@@ -70,7 +70,7 @@
*
* @param ref the GlobalRef memory address.
*/
- private static native void deleteGlobalRef(long ref);
+ static native void deleteGlobalRef(long ref);
/**
* Deletes the global reference represented by user_data if an OpenCL error occured.
@@ -99,40 +99,6 @@
*/
static native long getContextCallback();
- /**
- * Associates the specified CLContext with the specified global reference. If the context
- * is invalid, the global reference is deleted. NO-OP if user_data is 0.
- *
- * @param context the CLContext to register
- * @param user_data the global reference pointer
- */
- static void registerCallback(final CLContext context, final long user_data) {
- if ( user_data == 0 )
- return;
-
- if ( context.isValid() )
- contextUserData.put(context, user_data);
- else
- deleteGlobalRef(user_data);
- }
-
- /**
- * Decrements the specified context's reference count, clears its association
- * with a CLContextCallback object if it exists and deletes the corresponding
- * global reference.
- *
- * @param context the CLContext to unregister
- */
- static void unregisterCallback(final CLContext context) {
- if ( context.release() > 0 )
- return;
-
- final Long user_data = contextUserData.remove(context);
-
- if ( user_data != null )
- deleteGlobalRef(user_data);
- }
-
/* [ Other callback functionality ]
The other callbacks are simpler. We create the GlobalRef before passing the callback,
we delete it when we receive the callback call.
@@ -150,7 +116,7 @@
*
* @return the callback function address
*/
- static native long getBuildProgramCallback();
+ static native long getProgramCallback();
/**
* Returns the memory address of the native function we pass to clEnqueueNativeKernel.
@@ -167,6 +133,13 @@
static native long getEventCallback();
/**
+ * Returns the memory address of the native function we pass to clSetPrintfCallback.
+ *
+ * @return the callback function address
+ */
+ static native long getPrintfCallback();
+
+ /**
* Returns the memory address of the native function we pass to clCreateContext(FromType),
* when <code>APPLEContextLoggingUtil.SYSTEM_LOG_CALLBACK</code> is used.
*
Modified: trunk/LWJGL/src/java/org/lwjgl/opencl/InfoUtilFactory.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opencl/InfoUtilFactory.java 2011-11-13 21:21:52 UTC (rev 3700)
+++ trunk/LWJGL/src/java/org/lwjgl/opencl/InfoUtilFactory.java 2011-11-16 14:36:28 UTC (rev 3701)
@@ -123,7 +123,7 @@
Util.checkCLError(errcode_ret.get(0));
return __result;
} finally {
- CallbackUtil.registerCallback(__result, user_data);
+ if ( __result != null ) __result.setContextCallback(user_data);
}
}
Modified: trunk/LWJGL/src/java/org/lwjgl/util/generator/Utils.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/util/generator/Utils.java 2011-11-13 21:21:52 UTC (rev 3700)
+++ trunk/LWJGL/src/java/org/lwjgl/util/generator/Utils.java 2011-11-16 14:36:28 UTC (rev 3701)
@@ -373,20 +373,22 @@
if ( param != null && p.getSimpleName().equals(param.getSimpleName()) )
break;
+ if ( p.getAnnotation(NullTerminated.class) != null )
+ continue;
+
final Class type = Utils.getJavaType(p.getType());
if ( type.equals(CharSequence.class) ) {
if ( offset == null )
offset = p.getSimpleName() + ".length()";
else
offset += " + " + p.getSimpleName() + ".length()";
- if ( p.getAnnotation(NullTerminated.class) != null ) offset += " + 1";
-
+ //if ( p.getAnnotation(NullTerminated.class) != null ) offset += " + 1";
} else if ( type.equals(CharSequence[].class) ) {
if ( offset == null )
offset = "APIUtil.getTotalLength(" + p.getSimpleName() + ")";
else
offset += " + APIUtil.getTotalLength(" + p.getSimpleName() + ")";
- if ( p.getAnnotation(NullTerminated.class) != null ) offset += " + " + p.getSimpleName() + ".length";
+ //if ( p.getAnnotation(NullTerminated.class) != null ) offset += " + " + p.getSimpleName() + ".length";
}
}
Modified: trunk/LWJGL/src/java/org/lwjgl/util/generator/opencl/CLPDCapabilitiesGenerator.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/util/generator/opencl/CLPDCapabilitiesGenerator.java 2011-11-13 21:21:52 UTC (rev 3700)
+++ trunk/LWJGL/src/java/org/lwjgl/util/generator/opencl/CLPDCapabilitiesGenerator.java 2011-11-16 14:36:28 UTC (rev 3701)
@@ -51,7 +51,7 @@
// TODO: Add future versions here
private static final int[][] CL_VERSIONS = {
- { 1 }, // OpenCL 1
+ { 1, 2 }, // OpenCL 1
};
static void generateClassPrologue(final PrintWriter writer, final String name) {
Modified: trunk/LWJGL/src/native/common/extcl.h
===================================================================
--- trunk/LWJGL/src/native/common/extcl.h 2011-11-13 21:21:52 UTC (rev 3700)
+++ trunk/LWJGL/src/native/common/extcl.h 2011-11-16 14:36:28 UTC (rev 3701)
@@ -61,9 +61,10 @@
typedef void (CL_CALLBACK * cl_create_context_callback)(const char *errinfo, const void *private_info, size_t cb, void *user_data);
typedef void (CL_CALLBACK * cl_mem_object_destructor_callback)(cl_mem memobj, void *user_data);
-typedef void (CL_CALLBACK * cl_build_program_callback)(cl_program program, void *user_data);
+typedef void (CL_CALLBACK * cl_program_callback)(cl_program program, void *user_data);
typedef void (CL_CALLBACK * cl_event_callback)(cl_event event, cl_int event_command_exec_status, void *user_data);
typedef void (CL_CALLBACK * cl_native_kernel_func)(void *args);
+typedef void (CL_CALLBACK * cl_printf_callback)(cl_context context, cl_uint printf_data_len, char *printf_data_ptr, void *user_data);
// -----------------[ Cross-platform functions ]-----------------
Modified: trunk/LWJGL/src/native/common/extcl_types.h
===================================================================
--- trunk/LWJGL/src/native/common/extcl_types.h 2011-11-13 21:21:52 UTC (rev 3700)
+++ trunk/LWJGL/src/native/common/extcl_types.h 2011-11-16 14:36:28 UTC (rev 3701)
@@ -20,8 +20,10 @@
typedef cl_uint cl_device_local_mem_type;
typedef cl_bitfield cl_device_exec_capabilities;
typedef cl_bitfield cl_command_queue_properties;
+typedef intptr_t cl_device_partition_property;
+typedef cl_bitfield cl_device_affinity_domain;
-typedef intptr_t cl_context_properties;
+typedef intptr_t cl_context_properties;
typedef cl_uint cl_context_info;
typedef cl_uint cl_command_queue_info;
typedef cl_uint cl_channel_order;
@@ -29,6 +31,7 @@
typedef cl_bitfield cl_mem_flags;
typedef cl_uint cl_mem_object_type;
typedef cl_uint cl_mem_info;
+typedef cl_bitfield cl_mem_migration_flags;
typedef cl_uint cl_image_info;
typedef cl_uint cl_buffer_create_type;
typedef cl_uint cl_addressing_mode;
@@ -37,8 +40,12 @@
typedef cl_bitfield cl_map_flags;
typedef cl_uint cl_program_info;
typedef cl_uint cl_program_build_info;
+typedef cl_uint cl_program_binary_type;
typedef cl_int cl_build_status;
typedef cl_uint cl_kernel_info;
+typedef cl_uint cl_kernel_arg_info;
+typedef cl_uint cl_kernel_arg_address_qualifier;
+typedef cl_uint cl_kernel_arg_access_qualifier;
typedef cl_uint cl_kernel_work_group_info;
typedef cl_uint cl_event_info;
typedef cl_uint cl_command_type;
@@ -49,6 +56,19 @@
cl_channel_type image_channel_data_type;
} cl_image_format;
+typedef struct _cl_image_desc {
+ cl_mem_object_type image_type;
+ size_t image_width;
+ size_t image_height;
+ size_t image_depth;
+ size_t image_array_size;
+ size_t image_row_pitch;
+ size_t image_slice_pitch;
+ cl_uint num_mip_levels;
+ cl_uint num_samples;
+ cl_mem buffer;
+} cl_image_desc;
+
typedef struct _cl_buffer_region {
size_t origin;
size_t size;
@@ -63,7 +83,7 @@
// -----------------[ Extension typedefs ]-----------------
// EXT_device_fission
-typedef cl_bitfield cl_device_partition_property_ext;
+typedef cl_ulong cl_device_partition_property_ext;
// EXT_migrate_memobject
typedef cl_bitfield cl_mem_migration_flags_ext;
Modified: trunk/LWJGL/src/native/common/org_lwjgl_opencl_CallbackUtil.c
===================================================================
--- trunk/LWJGL/src/native/common/org_lwjgl_opencl_CallbackUtil.c 2011-11-13 21:21:52 UTC (rev 3700)
+++ trunk/LWJGL/src/native/common/org_lwjgl_opencl_CallbackUtil.c 2011-11-16 14:36:28 UTC (rev 3701)
@@ -43,9 +43,10 @@
static jmethodID contextCallbackJ;
static jmethodID memObjectDestructorCallbackJ;
-static jmethodID buildProgramCallbackJ;
+static jmethodID programCallbackJ;
static jmethodID nativeKernelCallbackJ;
static jmethodID eventCallbackJ;
+static jmethodID printfCallbackJ;
JNIEXPORT jlong JNICALL Java_org_lwjgl_opencl_CallbackUtil_ncreateGlobalRef(JNIEnv *env, jclass clazz, jobject obj) {
return (intptr_t)(*env)->NewGlobalRef(env, obj);
@@ -113,13 +114,13 @@
return (jlong)(intptr_t)&memObjectDestructorCallback;
}
-// ----------------- [ MEM OBJECT DESTRUCTOR CALLBACK ] -----------------
+// ----------------- [ PROGRAM CALLBACK ] -----------------
-static void CL_CALLBACK buildProgramCallback(cl_program program, void *user_data) {
+static void CL_CALLBACK programCallback(cl_program program, void *user_data) {
JNIEnv *env = attachCurrentThread();
- if ( env != NULL && !(*env)->ExceptionOccurred(env) && buildProgramCallbackJ != NULL ) {
- (*env)->CallVoidMethod(env, (jobject)user_data, buildProgramCallbackJ,
+ if ( env != NULL && !(*env)->ExceptionOccurred(env) && programCallbackJ != NULL ) {
+ (*env)->CallVoidMethod(env, (jobject)user_data, programCallbackJ,
(jlong)(intptr_t)program
);
(*env)->DeleteGlobalRef(env, (jobject)user_data);
@@ -128,16 +129,16 @@
detachCurrentThread();
}
-JNIEXPORT jlong JNICALL Java_org_lwjgl_opencl_CallbackUtil_getBuildProgramCallback(JNIEnv *env, jclass clazz) {
+JNIEXPORT jlong JNICALL Java_org_lwjgl_opencl_CallbackUtil_getProgramCallback(JNIEnv *env, jclass clazz) {
// Cache the callback methodID
jclass callbackClass;
- if ( buildProgramCallbackJ == NULL ) {
- callbackClass = (*env)->FindClass(env, "org/lwjgl/opencl/CLBuildProgramCallback");
+ if ( programCallbackJ == NULL ) {
+ callbackClass = (*env)->FindClass(env, "org/lwjgl/opencl/CLProgramCallback");
if ( callbackClass != NULL )
- buildProgramCallbackJ = (*env)->GetMethodID(env, callbackClass, "handleMessage", "(J)V");
+ programCallbackJ = (*env)->GetMethodID(env, c...
[truncated message content] |
|
From: <ma...@us...> - 2012-01-23 21:30:53
|
Revision: 3731
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3731&view=rev
Author: matzon
Date: 2012-01-23 21:30:46 +0000 (Mon, 23 Jan 2012)
Log Message:
-----------
bumping to 2.8.4 and adding changelogs
Modified Paths:
--------------
trunk/LWJGL/platform_build/build-definitions.xml
trunk/LWJGL/src/java/org/lwjgl/Sys.java
trunk/LWJGL/www/changelogs/full-changelog.txt
Added Paths:
-----------
trunk/LWJGL/www/changelogs/2.8.3-changelog.txt
Modified: trunk/LWJGL/platform_build/build-definitions.xml
===================================================================
--- trunk/LWJGL/platform_build/build-definitions.xml 2012-01-23 21:05:39 UTC (rev 3730)
+++ trunk/LWJGL/platform_build/build-definitions.xml 2012-01-23 21:30:46 UTC (rev 3731)
@@ -12,7 +12,7 @@
<property name="lwjgl.docs" location="doc" />
<property name="lwjgl.temp" location="temp" />
<property name="lwjgl.res" location="res" />
- <property name="lwjgl.version" value="2.8.3" />
+ <property name="lwjgl.version" value="2.8.4" />
<property name="lwjgl.web" location="www" />
<property name="opengl-template-pattern" value="org/lwjgl/opengl/GL*.java,org/lwjgl/opengl/ARB*.java,org/lwjgl/opengl/AMD*.java,org/lwjgl/opengl/APPLE*.java,org/lwjgl/opengl/ATI*.java,org/lwjgl/opengl/EXT*.java,org/lwjgl/opengl/NV*.java,org/lwjgl/opengl/NVX*.java,org/lwjgl/opengl/HP*.java,org/lwjgl/opengl/IBM*.java,org/lwjgl/opengl/SUN*.java,org/lwjgl/opengl/SGIS*.java,org/lwjgl/opengl/GREMEDY*.java"/>
Modified: trunk/LWJGL/src/java/org/lwjgl/Sys.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/Sys.java 2012-01-23 21:05:39 UTC (rev 3730)
+++ trunk/LWJGL/src/java/org/lwjgl/Sys.java 2012-01-23 21:30:46 UTC (rev 3731)
@@ -54,7 +54,7 @@
private static final String JNI_LIBRARY_NAME = "lwjgl";
/** Current version of library */
- private static final String VERSION = "2.8.3";
+ private static final String VERSION = "2.8.4";
private static final String POSTFIX64BIT = "64";
Added: trunk/LWJGL/www/changelogs/2.8.3-changelog.txt
===================================================================
--- trunk/LWJGL/www/changelogs/2.8.3-changelog.txt (rev 0)
+++ trunk/LWJGL/www/changelogs/2.8.3-changelog.txt 2012-01-23 21:30:46 UTC (rev 3731)
@@ -0,0 +1,252 @@
+2012-01-22 20:16 kappa1
+
+ * src/java/org/lwjgl/opengl/LinuxDisplay.java: Small tweak to the
+ Linux Display.isActive() fix.
+
+2012-01-22 18:02 kappa1
+
+ * src/java/org/lwjgl/opengl/LinuxDisplay.java: fix for
+ Display.isActive() so that it works as it should on Linux when
+ using Display.setParent()
+
+2012-01-18 12:19 spasi
+
+ * src/templates/org/lwjgl/opengl/ARB_buffer_object.java,
+ src/templates/org/lwjgl/opengl/EXT_direct_state_access.java,
+ src/templates/org/lwjgl/opengl/GL15.java,
+ src/templates/org/lwjgl/opengles/GLES20.java: Require at least 1
+ element remaining in BO data params.
+
+2012-01-17 21:05 kappa1
+
+ * src/java/org/lwjgl/util/applet/AppletLoader.java: prod nightly
+ server to rebuild LWJGL.
+
+2012-01-16 22:18 kappa1
+
+ * src/java/org/lwjgl/MacOSXSysImplementation.java,
+ src/java/org/lwjgl/opengl/AWTSurfaceLock.java,
+ src/java/org/lwjgl/opengl/MacOSXCanvasPeerInfo.java: Add extra
+ checks so CALayer's only run on OS X 10.6+, Bump OS X native
+ version
+
+2012-01-13 00:53 kappa1
+
+ * platform_build/macosx_ant/build.xml: Weakly link the AppKit
+ framework in an attempt to allow 10.5 compatibility again.
+
+2012-01-13 00:40 kappa1
+
+ * src/native/macosx/org_lwjgl_opengl_MacOSXCanvasPeerInfo.m: OS X
+ slight tweak to MacOSXCanvasPeerInfo in prep to make it
+ compatible for 10.5 again
+
+2012-01-11 20:46 matzon
+
+ * src/java/org/lwjgl/WindowsSysImplementation.java,
+ src/java/org/lwjgl/opengl/WindowsDisplay.java: adding
+ WS_MAXIMIZEBOX patch for windows and bumping native version
+
+2012-01-06 11:52 spasi
+
+ * src/templates/org/lwjgl/opencl/INTEL_printf.java: Added
+ INTEL_printf.
+
+2012-01-05 11:24 spasi
+
+ * src/templates/org/lwjgl/opengl/AMD_performance_monitor.java,
+ src/templates/org/lwjgl/opengl/ARB_separate_shader_objects.java,
+ src/templates/org/lwjgl/opengl/ARB_shader_subroutine.java,
+ src/templates/org/lwjgl/opengl/ARB_sync.java,
+ src/templates/org/lwjgl/opengl/ARB_uniform_buffer_object.java,
+ src/templates/org/lwjgl/opengles/EXT_color_buffer_half_float.java,
+ src/templates/org/lwjgl/opengles/EXT_debug_label.java,
+ src/templates/org/lwjgl/opengles/EXT_debug_marker.java,
+ src/templates/org/lwjgl/opengles/EXT_multisampled_render_to_texture.java,
+ src/templates/org/lwjgl/opengles/EXT_occlusion_query_boolean.java,
+ src/templates/org/lwjgl/opengles/EXT_robustness.java,
+ src/templates/org/lwjgl/opengles/EXT_sRGB.java,
+ src/templates/org/lwjgl/opengles/EXT_separate_shader_objects.java,
+ src/templates/org/lwjgl/opengles/EXT_shadow_samplers.java,
+ src/templates/org/lwjgl/opengles/EXT_texture_rg.java,
+ src/templates/org/lwjgl/opengles/EXT_texture_storage.java,
+ src/templates/org/lwjgl/opengles/NV_EGL_stream_consumer_external.java:
+ Added new OpenGL ES extensions.
+
+2012-01-02 22:06 matzon
+
+ * src/java/org/lwjgl/opengl/WindowsDisplay.java: Applying
+ WM_SETCURSOR patch to fix issue with cursor
+
+2012-01-02 22:03 matzon
+
+ * src/java/org/lwjgl/opengl/WindowsDisplay.java: undoing commit of
+ r3717
+
+2012-01-02 21:59 matzon
+
+ * src/java/org/lwjgl/opengl/WindowsDisplay.java: Applied
+ WM_SETCURSOR to fix issue with cursor
+
+2011-12-21 14:34 jpilgrim
+
+ * eclipse-update/org.lwjgl.build/anttasks.jar,
+ eclipse-update/org.lwjgl.build/src/java/org/lwjgl/ant/StandalonePublisher.java:
+ Fixed a problem with categories.
+
+ Categories are now extracted from site.xml. A default category is
+ created if no site.xml is found or if some features are not
+ mapped to any other category.
+
+2011-12-20 19:06 spasi
+
+ * src/templates/org/lwjgl/opencl/CL12.java: Added @Optional on
+ clSetPrintfCallback for the AMD CL 1.2 preview driver.
+
+2011-12-20 17:16 spasi
+
+ * src/templates/org/lwjgl/opengl/AMD_pinned_memory.java: Updated
+ AMD_pinned_memory based on official spec.
+
+2011-12-20 11:04 jpilgrim
+
+ * eclipse-update/org.lwjgl.build/anttasks.jar,
+ eclipse-update/org.lwjgl.build/build-updatesite.xml,
+ eclipse-update/org.lwjgl.build/src/java/org/lwjgl/ant/StandalonePublisher.java:
+ StandalonePublisher directly creates jars, no need for additional
+ "jarring".
+
+ - added main method to StandalonePublisher creating
+ artifact.xml/jar and content.xml/jar from given (old) Eclise
+ update site.
+ - when compressed is set to true, artifact.jar and content.jar
+ are created directly. Removed jar task in build script, as these
+ are no longer necessary
+
+2011-12-15 19:00 jpilgrim
+
+ * eclipse-update/org.lwjgl.build/READ.ME,
+ eclipse-update/org.lwjgl.build/anttasks.jar,
+ eclipse-update/org.lwjgl.build/build-updatesite.xml,
+ eclipse-update/org.lwjgl.build/src/java/org/lwjgl/ant/StandalonePublisher.java:
+ Fixed problems in update site build.
+
+ Update site is now build including Eclipse p2 metadata
+ (content.jar and artifact.jar). These files are required by some
+ tools, such as Tycho (a maven plugin making p2 update sites
+ available as maven repositories, see http://eclipse.org/tycho).
+
+2011-12-15 17:40 jpilgrim
+
+ * eclipse-update/org.lwjgl.build/build-updatesite.xml: fixed typo
+ in update site build script, added publisher task
+
+2011-12-15 17:32 jpilgrim
+
+ * eclipse-update/org.lwjgl.build/anttasks.jar,
+ eclipse-update/org.lwjgl.build/src/java/org/lwjgl/ant/StandalonePublisher.java:
+ Added new ant task creating p2 metadata file for update site.
+
+2011-12-06 22:46 matzon
+
+ * eclipse-update/org.lwjgl.build/build-updatesite.xml: updating
+ update site build script to use pre-packaged zip file in dist,
+ updating signjar to not use keypass
+
+2011-12-06 22:42 matzon
+
+ * build.xml: adding eclipse update site to main build file
+
+2011-12-05 21:49 jpilgrim
+
+ * eclipse-update/org.lwjgl.build/build-updatesite.xml: signing
+ information are interactively retrieved similar to applet build
+
+2011-12-05 12:41 jpilgrim
+
+ * eclipse-update/org.lwjgl.build/READ.ME,
+ eclipse-update/org.lwjgl.build/anttasks.jar,
+ eclipse-update/org.lwjgl.build/build-updatesite.xml,
+ eclipse-update/org.lwjgl.build/build.xml,
+ eclipse-update/org.lwjgl.build/buildEclipseClasses.xml,
+ eclipse-update/org.lwjgl.build/lwjgl-archives,
+ eclipse-update/org.lwjgl.build/plugin-classes,
+ eclipse-update/org.lwjgl.build/plugin-classes/org.lwjgl.info.zip,
+ eclipse-update/org.lwjgl.build/plugin-classes/org.lwjgl.tools.zip,
+ eclipse-update/org.lwjgl.build/plugin-classes/org.lwjgl.zip:
+ Added new Eclipse update site build script to be imported from
+ main LWJGL build script.
+ See org.lwjgl.build/README for details.
+
+ Removed old build script depending on pre-build LWJGL archives.
+
+2011-12-03 11:10 spasi
+
+ * src/templates/org/lwjgl/opengl/NV_transform_feedback.java: Fixed
+ glTransformFeedbackAttribsNV count argument.
+
+2011-11-28 16:40 jpilgrim
+
+ * eclipse-update/org.lwjgl.build/build.xml: bug fix in Eclipes
+ update site build:
+ native libraries are not copied from skeleton (where they are
+ required for development purposes) anymore
+
+2011-11-28 16:23 jpilgrim
+
+ * eclipse-update/org.lwjgl.build/.classpath,
+ eclipse-update/org.lwjgl.build/META-INF/MANIFEST.MF,
+ eclipse-update/org.lwjgl.build/build.xml,
+ eclipse-update/org.lwjgl.build/src/java/org/lwjgl/ant/NormalizeVersion.java,
+ eclipse-update/org.lwjgl.build/test/java/org/lwjgl/ant/NormalizeVersionTest.java:
+ Fixed a bug in the update site build script.
+
+ Wrong class name of LWJGL plugin activator was specified
+ (org.lwjgl.eclipse.Activator, but correct
+ is org.lwjgl.Activator).
+
+ Now, the current date/time string is added as a qualifier to the
+ LWJGL version, e.g., org.lwjgl_2.8.2.v20111128-1653 instead of
+ org.lwjgl_2.8.2. This simplifies testing and discouples LWJGL
+ versions from plugin versions.
+
+2011-11-17 21:41 kappa1
+
+ * src/java/org/lwjgl/util/applet/AppletLoader.java: AppletLoader:
+ fix uncaught null pointer exception
+
+2011-11-16 14:36 spasi
+
+ * platform_build/build-generator.xml,
+ src/java/org/lwjgl/opencl/CLBuildProgramCallback.java,
+ src/java/org/lwjgl/opencl/CLChecks.java,
+ src/java/org/lwjgl/opencl/CLCompileProgramCallback.java,
+ src/java/org/lwjgl/opencl/CLContext.java,
+ src/java/org/lwjgl/opencl/CLLinkProgramCallback.java,
+ src/java/org/lwjgl/opencl/CLPrintfCallback.java,
+ src/java/org/lwjgl/opencl/CLProgramCallback.java,
+ src/java/org/lwjgl/opencl/CallbackUtil.java,
+ src/java/org/lwjgl/opencl/InfoUtilFactory.java,
+ src/java/org/lwjgl/util/generator/Utils.java,
+ src/java/org/lwjgl/util/generator/opencl/CLPDCapabilitiesGenerator.java,
+ src/native/common/extcl.h, src/native/common/extcl_types.h,
+ src/native/common/org_lwjgl_opencl_CallbackUtil.c,
+ src/templates/org/lwjgl/opencl/CL10.java,
+ src/templates/org/lwjgl/opencl/CL11.java,
+ src/templates/org/lwjgl/opencl/CL12.java,
+ src/templates/org/lwjgl/opencl/CL12GL.java,
+ src/templates/org/lwjgl/opencl/EXT_device_fission.java,
+ src/templates/org/lwjgl/opengl/ARB_separate_shader_objects.java,
+ src/templates/org/lwjgl/opengl/GL41.java: Added support for
+ OpenCL 1.2 [UNTESTED]
+
+2011-11-13 21:21 matzon
+
+ * www/changelogs/2.8.1-changelog.txt,
+ www/changelogs/2.8.2-changelog.txt,
+ www/changelogs/full-changelog.txt: adding changelogs
+
+2011-11-13 21:20 matzon
+
+ * platform_build/build-definitions.xml,
+ src/java/org/lwjgl/Sys.java: bumping to 2.8.3
\ No newline at end of file
Modified: trunk/LWJGL/www/changelogs/full-changelog.txt
===================================================================
--- trunk/LWJGL/www/changelogs/full-changelog.txt 2012-01-23 21:05:39 UTC (rev 3730)
+++ trunk/LWJGL/www/changelogs/full-changelog.txt 2012-01-23 21:30:46 UTC (rev 3731)
@@ -1,3 +1,256 @@
+2012-01-22 20:16 kappa1
+
+ * src/java/org/lwjgl/opengl/LinuxDisplay.java: Small tweak to the
+ Linux Display.isActive() fix.
+
+2012-01-22 18:02 kappa1
+
+ * src/java/org/lwjgl/opengl/LinuxDisplay.java: fix for
+ Display.isActive() so that it works as it should on Linux when
+ using Display.setParent()
+
+2012-01-18 12:19 spasi
+
+ * src/templates/org/lwjgl/opengl/ARB_buffer_object.java,
+ src/templates/org/lwjgl/opengl/EXT_direct_state_access.java,
+ src/templates/org/lwjgl/opengl/GL15.java,
+ src/templates/org/lwjgl/opengles/GLES20.java: Require at least 1
+ element remaining in BO data params.
+
+2012-01-17 21:05 kappa1
+
+ * src/java/org/lwjgl/util/applet/AppletLoader.java: prod nightly
+ server to rebuild LWJGL.
+
+2012-01-16 22:18 kappa1
+
+ * src/java/org/lwjgl/MacOSXSysImplementation.java,
+ src/java/org/lwjgl/opengl/AWTSurfaceLock.java,
+ src/java/org/lwjgl/opengl/MacOSXCanvasPeerInfo.java: Add extra
+ checks so CALayer's only run on OS X 10.6+, Bump OS X native
+ version
+
+2012-01-13 00:53 kappa1
+
+ * platform_build/macosx_ant/build.xml: Weakly link the AppKit
+ framework in an attempt to allow 10.5 compatibility again.
+
+2012-01-13 00:40 kappa1
+
+ * src/native/macosx/org_lwjgl_opengl_MacOSXCanvasPeerInfo.m: OS X
+ slight tweak to MacOSXCanvasPeerInfo in prep to make it
+ compatible for 10.5 again
+
+2012-01-11 20:46 matzon
+
+ * src/java/org/lwjgl/WindowsSysImplementation.java,
+ src/java/org/lwjgl/opengl/WindowsDisplay.java: adding
+ WS_MAXIMIZEBOX patch for windows and bumping native version
+
+2012-01-06 11:52 spasi
+
+ * src/templates/org/lwjgl/opencl/INTEL_printf.java: Added
+ INTEL_printf.
+
+2012-01-05 11:24 spasi
+
+ * src/templates/org/lwjgl/opengl/AMD_performance_monitor.java,
+ src/templates/org/lwjgl/opengl/ARB_separate_shader_objects.java,
+ src/templates/org/lwjgl/opengl/ARB_shader_subroutine.java,
+ src/templates/org/lwjgl/opengl/ARB_sync.java,
+ src/templates/org/lwjgl/opengl/ARB_uniform_buffer_object.java,
+ src/templates/org/lwjgl/opengles/EXT_color_buffer_half_float.java,
+ src/templates/org/lwjgl/opengles/EXT_debug_label.java,
+ src/templates/org/lwjgl/opengles/EXT_debug_marker.java,
+ src/templates/org/lwjgl/opengles/EXT_multisampled_render_to_texture.java,
+ src/templates/org/lwjgl/opengles/EXT_occlusion_query_boolean.java,
+ src/templates/org/lwjgl/opengles/EXT_robustness.java,
+ src/templates/org/lwjgl/opengles/EXT_sRGB.java,
+ src/templates/org/lwjgl/opengles/EXT_separate_shader_objects.java,
+ src/templates/org/lwjgl/opengles/EXT_shadow_samplers.java,
+ src/templates/org/lwjgl/opengles/EXT_texture_rg.java,
+ src/templates/org/lwjgl/opengles/EXT_texture_storage.java,
+ src/templates/org/lwjgl/opengles/NV_EGL_stream_consumer_external.java:
+ Added new OpenGL ES extensions.
+
+2012-01-02 22:06 matzon
+
+ * src/java/org/lwjgl/opengl/WindowsDisplay.java: Applying
+ WM_SETCURSOR patch to fix issue with cursor
+
+2012-01-02 22:03 matzon
+
+ * src/java/org/lwjgl/opengl/WindowsDisplay.java: undoing commit of
+ r3717
+
+2012-01-02 21:59 matzon
+
+ * src/java/org/lwjgl/opengl/WindowsDisplay.java: Applied
+ WM_SETCURSOR to fix issue with cursor
+
+2011-12-21 14:34 jpilgrim
+
+ * eclipse-update/org.lwjgl.build/anttasks.jar,
+ eclipse-update/org.lwjgl.build/src/java/org/lwjgl/ant/StandalonePublisher.java:
+ Fixed a problem with categories.
+
+ Categories are now extracted from site.xml. A default category is
+ created if no site.xml is found or if some features are not
+ mapped to any other category.
+
+2011-12-20 19:06 spasi
+
+ * src/templates/org/lwjgl/opencl/CL12.java: Added @Optional on
+ clSetPrintfCallback for the AMD CL 1.2 preview driver.
+
+2011-12-20 17:16 spasi
+
+ * src/templates/org/lwjgl/opengl/AMD_pinned_memory.java: Updated
+ AMD_pinned_memory based on official spec.
+
+2011-12-20 11:04 jpilgrim
+
+ * eclipse-update/org.lwjgl.build/anttasks.jar,
+ eclipse-update/org.lwjgl.build/build-updatesite.xml,
+ eclipse-update/org.lwjgl.build/src/java/org/lwjgl/ant/StandalonePublisher.java:
+ StandalonePublisher directly creates jars, no need for additional
+ "jarring".
+
+ - added main method to StandalonePublisher creating
+ artifact.xml/jar and content.xml/jar from given (old) Eclise
+ update site.
+ - when compressed is set to true, artifact.jar and content.jar
+ are created directly. Removed jar task in build script, as these
+ are no longer necessary
+
+2011-12-15 19:00 jpilgrim
+
+ * eclipse-update/org.lwjgl.build/READ.ME,
+ eclipse-update/org.lwjgl.build/anttasks.jar,
+ eclipse-update/org.lwjgl.build/build-updatesite.xml,
+ eclipse-update/org.lwjgl.build/src/java/org/lwjgl/ant/StandalonePublisher.java:
+ Fixed problems in update site build.
+
+ Update site is now build including Eclipse p2 metadata
+ (content.jar and artifact.jar). These files are required by some
+ tools, such as Tycho (a maven plugin making p2 update sites
+ available as maven repositories, see http://eclipse.org/tycho).
+
+2011-12-15 17:40 jpilgrim
+
+ * eclipse-update/org.lwjgl.build/build-updatesite.xml: fixed typo
+ in update site build script, added publisher task
+
+2011-12-15 17:32 jpilgrim
+
+ * eclipse-update/org.lwjgl.build/anttasks.jar,
+ eclipse-update/org.lwjgl.build/src/java/org/lwjgl/ant/StandalonePublisher.java:
+ Added new ant task creating p2 metadata file for update site.
+
+2011-12-06 22:46 matzon
+
+ * eclipse-update/org.lwjgl.build/build-updatesite.xml: updating
+ update site build script to use pre-packaged zip file in dist,
+ updating signjar to not use keypass
+
+2011-12-06 22:42 matzon
+
+ * build.xml: adding eclipse update site to main build file
+
+2011-12-05 21:49 jpilgrim
+
+ * eclipse-update/org.lwjgl.build/build-updatesite.xml: signing
+ information are interactively retrieved similar to applet build
+
+2011-12-05 12:41 jpilgrim
+
+ * eclipse-update/org.lwjgl.build/READ.ME,
+ eclipse-update/org.lwjgl.build/anttasks.jar,
+ eclipse-update/org.lwjgl.build/build-updatesite.xml,
+ eclipse-update/org.lwjgl.build/build.xml,
+ eclipse-update/org.lwjgl.build/buildEclipseClasses.xml,
+ eclipse-update/org.lwjgl.build/lwjgl-archives,
+ eclipse-update/org.lwjgl.build/plugin-classes,
+ eclipse-update/org.lwjgl.build/plugin-classes/org.lwjgl.info.zip,
+ eclipse-update/org.lwjgl.build/plugin-classes/org.lwjgl.tools.zip,
+ eclipse-update/org.lwjgl.build/plugin-classes/org.lwjgl.zip:
+ Added new Eclipse update site build script to be imported from
+ main LWJGL build script.
+ See org.lwjgl.build/README for details.
+
+ Removed old build script depending on pre-build LWJGL archives.
+
+2011-12-03 11:10 spasi
+
+ * src/templates/org/lwjgl/opengl/NV_transform_feedback.java: Fixed
+ glTransformFeedbackAttribsNV count argument.
+
+2011-11-28 16:40 jpilgrim
+
+ * eclipse-update/org.lwjgl.build/build.xml: bug fix in Eclipes
+ update site build:
+ native libraries are not copied from skeleton (where they are
+ required for development purposes) anymore
+
+2011-11-28 16:23 jpilgrim
+
+ * eclipse-update/org.lwjgl.build/.classpath,
+ eclipse-update/org.lwjgl.build/META-INF/MANIFEST.MF,
+ eclipse-update/org.lwjgl.build/build.xml,
+ eclipse-update/org.lwjgl.build/src/java/org/lwjgl/ant/NormalizeVersion.java,
+ eclipse-update/org.lwjgl.build/test/java/org/lwjgl/ant/NormalizeVersionTest.java:
+ Fixed a bug in the update site build script.
+
+ Wrong class name of LWJGL plugin activator was specified
+ (org.lwjgl.eclipse.Activator, but correct
+ is org.lwjgl.Activator).
+
+ Now, the current date/time string is added as a qualifier to the
+ LWJGL version, e.g., org.lwjgl_2.8.2.v20111128-1653 instead of
+ org.lwjgl_2.8.2. This simplifies testing and discouples LWJGL
+ versions from plugin versions.
+
+2011-11-17 21:41 kappa1
+
+ * src/java/org/lwjgl/util/applet/AppletLoader.java: AppletLoader:
+ fix uncaught null pointer exception
+
+2011-11-16 14:36 spasi
+
+ * platform_build/build-generator.xml,
+ src/java/org/lwjgl/opencl/CLBuildProgramCallback.java,
+ src/java/org/lwjgl/opencl/CLChecks.java,
+ src/java/org/lwjgl/opencl/CLCompileProgramCallback.java,
+ src/java/org/lwjgl/opencl/CLContext.java,
+ src/java/org/lwjgl/opencl/CLLinkProgramCallback.java,
+ src/java/org/lwjgl/opencl/CLPrintfCallback.java,
+ src/java/org/lwjgl/opencl/CLProgramCallback.java,
+ src/java/org/lwjgl/opencl/CallbackUtil.java,
+ src/java/org/lwjgl/opencl/InfoUtilFactory.java,
+ src/java/org/lwjgl/util/generator/Utils.java,
+ src/java/org/lwjgl/util/generator/opencl/CLPDCapabilitiesGenerator.java,
+ src/native/common/extcl.h, src/native/common/extcl_types.h,
+ src/native/common/org_lwjgl_opencl_CallbackUtil.c,
+ src/templates/org/lwjgl/opencl/CL10.java,
+ src/templates/org/lwjgl/opencl/CL11.java,
+ src/templates/org/lwjgl/opencl/CL12.java,
+ src/templates/org/lwjgl/opencl/CL12GL.java,
+ src/templates/org/lwjgl/opencl/EXT_device_fission.java,
+ src/templates/org/lwjgl/opengl/ARB_separate_shader_objects.java,
+ src/templates/org/lwjgl/opengl/GL41.java: Added support for
+ OpenCL 1.2 [UNTESTED]
+
+2011-11-13 21:21 matzon
+
+ * www/changelogs/2.8.1-changelog.txt,
+ www/changelogs/2.8.2-changelog.txt,
+ www/changelogs/full-changelog.txt: adding changelogs
+
+2011-11-13 21:20 matzon
+
+ * platform_build/build-definitions.xml,
+ src/java/org/lwjgl/Sys.java: bumping to 2.8.3
+
2011-11-12 21:50 kappa1
* src/java/org/lwjgl/MacOSXSysImplementation.java: bump native
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2012-06-03 19:08:05
|
Revision: 3778
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3778&view=rev
Author: matzon
Date: 2012-06-03 19:07:57 +0000 (Sun, 03 Jun 2012)
Log Message:
-----------
bumping to 2.8.5, adding changelogs
Modified Paths:
--------------
trunk/LWJGL/platform_build/build-definitions.xml
trunk/LWJGL/src/java/org/lwjgl/Sys.java
trunk/LWJGL/www/changelogs/full-changelog.txt
Added Paths:
-----------
trunk/LWJGL/www/changelogs/2.8.4-changelog.txt
Modified: trunk/LWJGL/platform_build/build-definitions.xml
===================================================================
--- trunk/LWJGL/platform_build/build-definitions.xml 2012-06-03 18:54:24 UTC (rev 3777)
+++ trunk/LWJGL/platform_build/build-definitions.xml 2012-06-03 19:07:57 UTC (rev 3778)
@@ -12,7 +12,7 @@
<property name="lwjgl.docs" location="doc" />
<property name="lwjgl.temp" location="temp" />
<property name="lwjgl.res" location="res" />
- <property name="lwjgl.version" value="2.8.4" />
+ <property name="lwjgl.version" value="2.8.5" />
<property name="lwjgl.web" location="www" />
<property name="opengl-template-pattern" value="org/lwjgl/opengl/GL*.java,org/lwjgl/opengl/ARB*.java,org/lwjgl/opengl/AMD*.java,org/lwjgl/opengl/APPLE*.java,org/lwjgl/opengl/ATI*.java,org/lwjgl/opengl/EXT*.java,org/lwjgl/opengl/NV*.java,org/lwjgl/opengl/NVX*.java,org/lwjgl/opengl/HP*.java,org/lwjgl/opengl/IBM*.java,org/lwjgl/opengl/SUN*.java,org/lwjgl/opengl/SGIS*.java,org/lwjgl/opengl/GREMEDY*.java"/>
Modified: trunk/LWJGL/src/java/org/lwjgl/Sys.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/Sys.java 2012-06-03 18:54:24 UTC (rev 3777)
+++ trunk/LWJGL/src/java/org/lwjgl/Sys.java 2012-06-03 19:07:57 UTC (rev 3778)
@@ -54,7 +54,7 @@
private static final String JNI_LIBRARY_NAME = "lwjgl";
/** Current version of library */
- private static final String VERSION = "2.8.4";
+ private static final String VERSION = "2.8.5";
private static final String POSTFIX64BIT = "64";
Added: trunk/LWJGL/www/changelogs/2.8.4-changelog.txt
===================================================================
--- trunk/LWJGL/www/changelogs/2.8.4-changelog.txt (rev 0)
+++ trunk/LWJGL/www/changelogs/2.8.4-changelog.txt 2012-06-03 19:07:57 UTC (rev 3778)
@@ -0,0 +1,292 @@
+2012-05-21 20:39 kappa1
+
+ * libs/macosx/openal.dylib: Add OpenAL-Soft 1.14 for OS X
+
+2012-05-21 18:30 matzon
+
+ * libs/linux/libopenal.so, libs/linux/libopenal64.so,
+ libs/solaris/libopenal.so, libs/solaris/libopenal64.so,
+ libs/windows/OpenAL32.dll, libs/windows/OpenAL64.dll: updating
+ OpenAL-soft to 1.14+
+
+2012-05-13 18:03 kappa1
+
+ * src/java/org/lwjgl/opengl/Display.java: Minor tweak to remove
+ unused code
+
+2012-05-13 18:01 kappa1
+
+ * src/java/org/lwjgl/opengl/Display.java: Display.wasResized()
+ should now work correctly when using Display.setParent()
+
+2012-05-13 13:50 kappa1
+
+ * src/java/org/lwjgl/util/applet/AppletLoader.java: AppletLoader:
+ fixed issue with applets on linux with Java 7 where the natives
+ where LWJGL natives were failing to load.
+
+2012-05-13 12:11 kappa1
+
+ * src/java/org/lwjgl/input/Mouse.java: Fix Mouse.getDX() and
+ Mouse.getDY() values when mouse moves outside Display window &
+ clipping is on. Thanks to ra4king for patch.
+
+2012-05-09 12:33 jpilgrim
+
+ * eclipse-update/org.lwjgl.info/plugin.xml: LWJGL info and test
+ view are now sorted into category "general" (otherwise they are
+ not visible in Eclipse 4.2)
+
+2012-05-08 19:38 kappa1
+
+ * src/java/org/lwjgl/util/applet/AppletLoader.java: AppletLoader:
+ fix to ensure a jar file download is attempted 3 times even if it
+ throws some download exception.
+
+2012-05-04 17:23 spasi
+
+ * src/templates/org/lwjgl/opengl/GL11.java,
+ src/templates/org/lwjgl/opengl/GL13.java,
+ src/templates/org/lwjgl/opengl/GL14.java,
+ src/templates/org/lwjgl/opengl/GL31.java,
+ src/templates/org/lwjgl/opengl/GL40.java,
+ src/templates/org/lwjgl/opengl/GL41.java: GL spec 20120427
+ updates.
+
+2012-04-26 18:08 jpilgrim
+
+ * eclipse-update/org.lwjgl.info/src/java/org/lwjgl/info/LWJGLInfoView.java:
+ fixed problem with InfoView, also see
+ https://bugs.eclipse.org/bugs/show_bug.cgi?id=367718
+
+2012-04-26 13:19 kappa1
+
+ * src/java/org/lwjgl/util/applet/AppletLoader.java: AppletLoader:
+ add further checks to prevent Java default caching
+
+2012-04-22 23:05 kappa1
+
+ * src/java/org/lwjgl/util/applet/AppletLoader.java: AppletLoader:
+ set all streams that are open to use try/finally blocks to close
+ the streams
+
+2012-04-22 22:51 kappa1
+
+ * src/java/org/lwjgl/util/applet/AppletLoader.java: AppletLoader:
+ add try/finally block to ensure file is closed on exception in
+ the downloadJars(), thx to MatthiasM for pointing it out.
+
+2012-04-22 22:21 kappa1
+
+ * src/java/org/lwjgl/util/applet/AppletLoader.java: AppletLoader:
+ add extra urlconnections.setUseCaches(false) as an extra
+ precaution to make sure caching is disabled.
+
+2012-04-18 16:50 spasi
+
+ * src/templates/org/lwjgl/opencl/INTEL_thread_local_exec.java:
+ Added INTEL_thread_local_exec OpenCL extension.
+
+2012-04-14 18:55 kappa1
+
+ * src/java/org/lwjgl/opengl/MacOSXFrame.java: Fix
+ Display.getWidth() and Display.getHeight() to return the correct
+ values on OS X when the window has been resized.
+
+2012-04-10 13:23 kappa1
+
+ * src/java/org/lwjgl/input/Controller.java,
+ src/java/org/lwjgl/input/JInputController.java,
+ src/java/org/lwjgl/util/input/ControllerAdapter.java: Update
+ ControllerAdapter in util package to reflect new changes in the
+ Controller interface class (should fix broken build)
+
+2012-04-10 11:44 kappa1
+
+ * src/java/org/lwjgl/input/Controller.java,
+ src/java/org/lwjgl/input/JInputController.java: Apply patch by
+ OrangyTang to expose JInput's rumble functionality in LWJGL's
+ Controller class.
+
+2012-03-27 13:12 spasi
+
+ * src/templates/org/lwjgl/opengl/AMD_vertex_shader_layer.java,
+ src/templates/org/lwjgl/opengl/AMD_vertex_shader_viewport_index.java,
+ src/templates/org/lwjgl/opengl/NV_bindless_texture.java,
+ src/templates/org/lwjgl/opengl/NV_shader_atomic_float.java: Added
+ support for: AMD_vertex_shader_viewport_index,
+ AMD_vertex_shader_layer, NV_bindless_texture,
+ NV_shader_atomic_float.
+
+2012-03-24 00:39 kappa1
+
+ * src/java/org/lwjgl/opengl/Sync.java: remove non-existing import.
+
+2012-03-24 00:20 kappa1
+
+ * src/java/org/lwjgl/opengl/Display.java,
+ src/java/org/lwjgl/opengl/Sync.java: fix minor javadoc typo's
+
+2012-03-24 00:04 kappa1
+
+ * src/java/org/lwjgl/opengl/Display.java,
+ src/java/org/lwjgl/opengl/Sync.java: Replace Display.sync(int
+ fps) with an even better implementation, special thanks to Riven.
+
+2012-03-21 19:34 kappa1
+
+ * src/java/org/lwjgl/opengl/Display.java: Display.sync() fix
+ excessive CPU using on windows
+
+2012-03-19 22:12 matzon
+
+ * src/java/org/lwjgl/opengl/WindowsDisplay.java: applying white
+ border fix from dr_evil
+
+2012-03-18 16:25 kappa1
+
+ * src/java/org/lwjgl/opengl/Display.java: Fix the new accurate
+ Display.sync() method to use less CPU on Mac.
+
+2012-03-04 13:41 kappa1
+
+ * src/java/org/lwjgl/opengl/ContextGL.java,
+ src/java/org/lwjgl/opengl/ContextImplementation.java,
+ src/java/org/lwjgl/opengl/LinuxContextImplementation.java,
+ src/java/org/lwjgl/opengl/MacOSXContextImplementation.java,
+ src/java/org/lwjgl/opengl/WindowsContextImplementation.java:
+ Refactor so that the peer_info variable in ContextGL does not
+ need to be static
+
+2012-03-04 03:50 kappa1
+
+ * src/native/linux/opengl/extgl_glx.c: add missing
+ extgl_InitGLXEXTSwapControl()
+
+2012-03-04 03:45 kappa1
+
+ * src/native/linux/opengl/extgl_glx.h: add missing
+ lwjgl_glXSwapIntervalEXT
+
+2012-03-04 03:40 kappa1
+
+ * src/java/org/lwjgl/opengl/ContextGL.java,
+ src/java/org/lwjgl/opengl/ContextImplementation.java,
+ src/java/org/lwjgl/opengl/LinuxContextImplementation.java,
+ src/java/org/lwjgl/opengl/MacOSXContextImplementation.java,
+ src/java/org/lwjgl/opengl/WindowsContextImplementation.java,
+ src/native/linux/opengl/extgl_glx.c,
+ src/native/linux/opengl/extgl_glx.h,
+ src/native/linux/opengl/org_lwjgl_opengl_LinuxContextImplementation.c:
+ Implement GLX_EXT_swap_control for Linux
+
+2012-03-01 22:34 kappa1
+
+ * src/java/org/lwjgl/opengl/Display.java: Tweak Display.sync()
+ method a little to reduce the Thread.yield() time even further,
+ now with a minimum of 0 yield time.
+
+2012-02-29 23:18 kappa1
+
+ * src/java/org/lwjgl/opengl/Display.java: Implement a much more
+ accurate Display.sync() method that auto adapts to the systems
+ timer resolution and load.
+
+2012-02-28 18:18 spasi
+
+ * src/java/org/lwjgl/MemoryUtil.java,
+ src/native/common/org_lwjgl_opencl_CallbackUtil.c,
+ src/templates/org/lwjgl/opencl/CL10.java: Fixed
+ clEnqueueNativeKernel crash.
+
+2012-02-18 18:38 matzon
+
+ * src/java/org/lwjgl/opengl/WindowsDisplay.java: added win32
+ display get x/y
+
+2012-02-18 16:30 kappa1
+
+ * src/java/org/lwjgl/opengl/Display.java,
+ src/java/org/lwjgl/opengl/DisplayImplementation.java,
+ src/java/org/lwjgl/opengl/LinuxDisplay.java,
+ src/java/org/lwjgl/opengl/MacOSXDisplay.java,
+ src/java/org/lwjgl/opengl/WindowsDisplay.java: Added the new
+ public API's Display.getX() and Display.getY(). Currently
+ implemented for Linux and Mac. Windows implementation pending.
+
+2012-02-18 01:49 kappa1
+
+ * src/java/org/lwjgl/opengl/LinuxDisplay.java,
+ src/java/org/lwjgl/opengl/LinuxEvent.java,
+ src/native/linux/opengl/org_lwjgl_opengl_Display.c,
+ src/native/linux/opengles/org_lwjgl_opengl_Display.c: Implement
+ the ability for the native Display window on Linux to get its x
+ and y position. In preparation for adding the new Display.getX()
+ & getY() API's.
+
+2012-02-06 20:35 matzon
+
+ * src/java/org/lwjgl/opengl/WindowsDisplay.java: applied dr_evil's
+ maximized patch
+
+2012-02-06 19:26 spasi
+
+ * src/templates/org/lwjgl/opencl/AMD_media_ops2.java: Added support
+ for AMD_media_ops2.
+
+2012-02-01 22:50 matzon
+
+ * src/java/org/lwjgl/opengl/WindowsDisplay.java: updated fix for
+ resizable
+
+2012-02-01 21:33 matzon
+
+ * src/java/org/lwjgl/opengl/WindowsDisplay.java: applying suggested
+ fix for resize issue
+
+2012-01-31 23:25 kappa1
+
+ * src/java/org/lwjgl/opengl/LinuxMouse.java: removed a tiny bit of
+ dead debug code
+
+2012-01-31 23:24 kappa1
+
+ * src/java/org/lwjgl/opengl/LinuxMouse.java,
+ src/native/linux/org_lwjgl_opengl_LinuxMouse.c: Linux Mouse:
+ added support for using more than 3 buttons on a mouse, supports
+ mice with upto 256 buttons.
+
+2012-01-29 20:35 matzon
+
+ * src/java/org/lwjgl/opengl/WindowsMouse.java: limit mouse buttons
+ to 5, since we can't read more at this time
+
+2012-01-29 20:26 matzon
+
+ * src/java/org/lwjgl/opengl/WindowsDisplay.java: support for 5
+ buttons on windows
+
+2012-01-29 19:06 spasi
+
+ * src/templates/org/lwjgl/opengl/ARB_buffer_object.java,
+ src/templates/org/lwjgl/opengl/EXT_direct_state_access.java,
+ src/templates/org/lwjgl/opengl/GL15.java,
+ src/templates/org/lwjgl/opengles/GLES20.java: Removed @Check("1")
+ from BufferData functions.
+
+2012-01-28 19:35 spasi
+
+ * src/templates/org/lwjgl/opengl/AMD_stencil_operation_extended.java,
+ src/templates/org/lwjgl/opengl/ARB_buffer_object.java,
+ src/templates/org/lwjgl/opengl/EXT_direct_state_access.java,
+ src/templates/org/lwjgl/opengl/GL15.java,
+ src/templates/org/lwjgl/opengles/GLES20.java: Added
+ AMD_stencil_operation_extended.
+ Reverted @Check("1") from SubData BO functions.
+
+2012-01-23 21:30 matzon
+
+ * platform_build/build-definitions.xml,
+ src/java/org/lwjgl/Sys.java, www/changelogs/2.8.3-changelog.txt,
+ www/changelogs/full-changelog.txt: bumping to 2.8.4 and adding
+ changelogs
\ No newline at end of file
Modified: trunk/LWJGL/www/changelogs/full-changelog.txt
===================================================================
--- trunk/LWJGL/www/changelogs/full-changelog.txt 2012-06-03 18:54:24 UTC (rev 3777)
+++ trunk/LWJGL/www/changelogs/full-changelog.txt 2012-06-03 19:07:57 UTC (rev 3778)
@@ -1,3 +1,296 @@
+2012-05-21 20:39 kappa1
+
+ * libs/macosx/openal.dylib: Add OpenAL-Soft 1.14 for OS X
+
+2012-05-21 18:30 matzon
+
+ * libs/linux/libopenal.so, libs/linux/libopenal64.so,
+ libs/solaris/libopenal.so, libs/solaris/libopenal64.so,
+ libs/windows/OpenAL32.dll, libs/windows/OpenAL64.dll: updating
+ OpenAL-soft to 1.14+
+
+2012-05-13 18:03 kappa1
+
+ * src/java/org/lwjgl/opengl/Display.java: Minor tweak to remove
+ unused code
+
+2012-05-13 18:01 kappa1
+
+ * src/java/org/lwjgl/opengl/Display.java: Display.wasResized()
+ should now work correctly when using Display.setParent()
+
+2012-05-13 13:50 kappa1
+
+ * src/java/org/lwjgl/util/applet/AppletLoader.java: AppletLoader:
+ fixed issue with applets on linux with Java 7 where the natives
+ where LWJGL natives were failing to load.
+
+2012-05-13 12:11 kappa1
+
+ * src/java/org/lwjgl/input/Mouse.java: Fix Mouse.getDX() and
+ Mouse.getDY() values when mouse moves outside Display window &
+ clipping is on. Thanks to ra4king for patch.
+
+2012-05-09 12:33 jpilgrim
+
+ * eclipse-update/org.lwjgl.info/plugin.xml: LWJGL info and test
+ view are now sorted into category "general" (otherwise they are
+ not visible in Eclipse 4.2)
+
+2012-05-08 19:38 kappa1
+
+ * src/java/org/lwjgl/util/applet/AppletLoader.java: AppletLoader:
+ fix to ensure a jar file download is attempted 3 times even if it
+ throws some download exception.
+
+2012-05-04 17:23 spasi
+
+ * src/templates/org/lwjgl/opengl/GL11.java,
+ src/templates/org/lwjgl/opengl/GL13.java,
+ src/templates/org/lwjgl/opengl/GL14.java,
+ src/templates/org/lwjgl/opengl/GL31.java,
+ src/templates/org/lwjgl/opengl/GL40.java,
+ src/templates/org/lwjgl/opengl/GL41.java: GL spec 20120427
+ updates.
+
+2012-04-26 18:08 jpilgrim
+
+ * eclipse-update/org.lwjgl.info/src/java/org/lwjgl/info/LWJGLInfoView.java:
+ fixed problem with InfoView, also see
+ https://bugs.eclipse.org/bugs/show_bug.cgi?id=367718
+
+2012-04-26 13:19 kappa1
+
+ * src/java/org/lwjgl/util/applet/AppletLoader.java: AppletLoader:
+ add further checks to prevent Java default caching
+
+2012-04-22 23:05 kappa1
+
+ * src/java/org/lwjgl/util/applet/AppletLoader.java: AppletLoader:
+ set all streams that are open to use try/finally blocks to close
+ the streams
+
+2012-04-22 22:51 kappa1
+
+ * src/java/org/lwjgl/util/applet/AppletLoader.java: AppletLoader:
+ add try/finally block to ensure file is closed on exception in
+ the downloadJars(), thx to MatthiasM for pointing it out.
+
+2012-04-22 22:21 kappa1
+
+ * src/java/org/lwjgl/util/applet/AppletLoader.java: AppletLoader:
+ add extra urlconnections.setUseCaches(false) as an extra
+ precaution to make sure caching is disabled.
+
+2012-04-18 16:50 spasi
+
+ * src/templates/org/lwjgl/opencl/INTEL_thread_local_exec.java:
+ Added INTEL_thread_local_exec OpenCL extension.
+
+2012-04-14 18:55 kappa1
+
+ * src/java/org/lwjgl/opengl/MacOSXFrame.java: Fix
+ Display.getWidth() and Display.getHeight() to return the correct
+ values on OS X when the window has been resized.
+
+2012-04-10 13:23 kappa1
+
+ * src/java/org/lwjgl/input/Controller.java,
+ src/java/org/lwjgl/input/JInputController.java,
+ src/java/org/lwjgl/util/input/ControllerAdapter.java: Update
+ ControllerAdapter in util package to reflect new changes in the
+ Controller interface class (should fix broken build)
+
+2012-04-10 11:44 kappa1
+
+ * src/java/org/lwjgl/input/Controller.java,
+ src/java/org/lwjgl/input/JInputController.java: Apply patch by
+ OrangyTang to expose JInput's rumble functionality in LWJGL's
+ Controller class.
+
+2012-03-27 13:12 spasi
+
+ * src/templates/org/lwjgl/opengl/AMD_vertex_shader_layer.java,
+ src/templates/org/lwjgl/opengl/AMD_vertex_shader_viewport_index.java,
+ src/templates/org/lwjgl/opengl/NV_bindless_texture.java,
+ src/templates/org/lwjgl/opengl/NV_shader_atomic_float.java: Added
+ support for: AMD_vertex_shader_viewport_index,
+ AMD_vertex_shader_layer, NV_bindless_texture,
+ NV_shader_atomic_float.
+
+2012-03-24 00:39 kappa1
+
+ * src/java/org/lwjgl/opengl/Sync.java: remove non-existing import.
+
+2012-03-24 00:20 kappa1
+
+ * src/java/org/lwjgl/opengl/Display.java,
+ src/java/org/lwjgl/opengl/Sync.java: fix minor javadoc typo's
+
+2012-03-24 00:04 kappa1
+
+ * src/java/org/lwjgl/opengl/Display.java,
+ src/java/org/lwjgl/opengl/Sync.java: Replace Display.sync(int
+ fps) with an even better implementation, special thanks to Riven.
+
+2012-03-21 19:34 kappa1
+
+ * src/java/org/lwjgl/opengl/Display.java: Display.sync() fix
+ excessive CPU using on windows
+
+2012-03-19 22:12 matzon
+
+ * src/java/org/lwjgl/opengl/WindowsDisplay.java: applying white
+ border fix from dr_evil
+
+2012-03-18 16:25 kappa1
+
+ * src/java/org/lwjgl/opengl/Display.java: Fix the new accurate
+ Display.sync() method to use less CPU on Mac.
+
+2012-03-04 13:41 kappa1
+
+ * src/java/org/lwjgl/opengl/ContextGL.java,
+ src/java/org/lwjgl/opengl/ContextImplementation.java,
+ src/java/org/lwjgl/opengl/LinuxContextImplementation.java,
+ src/java/org/lwjgl/opengl/MacOSXContextImplementation.java,
+ src/java/org/lwjgl/opengl/WindowsContextImplementation.java:
+ Refactor so that the peer_info variable in ContextGL does not
+ need to be static
+
+2012-03-04 03:50 kappa1
+
+ * src/native/linux/opengl/extgl_glx.c: add missing
+ extgl_InitGLXEXTSwapControl()
+
+2012-03-04 03:45 kappa1
+
+ * src/native/linux/opengl/extgl_glx.h: add missing
+ lwjgl_glXSwapIntervalEXT
+
+2012-03-04 03:40 kappa1
+
+ * src/java/org/lwjgl/opengl/ContextGL.java,
+ src/java/org/lwjgl/opengl/ContextImplementation.java,
+ src/java/org/lwjgl/opengl/LinuxContextImplementation.java,
+ src/java/org/lwjgl/opengl/MacOSXContextImplementation.java,
+ src/java/org/lwjgl/opengl/WindowsContextImplementation.java,
+ src/native/linux/opengl/extgl_glx.c,
+ src/native/linux/opengl/extgl_glx.h,
+ src/native/linux/opengl/org_lwjgl_opengl_LinuxContextImplementation.c:
+ Implement GLX_EXT_swap_control for Linux
+
+2012-03-01 22:34 kappa1
+
+ * src/java/org/lwjgl/opengl/Display.java: Tweak Display.sync()
+ method a little to reduce the Thread.yield() time even further,
+ now with a minimum of 0 yield time.
+
+2012-02-29 23:18 kappa1
+
+ * src/java/org/lwjgl/opengl/Display.java: Implement a much more
+ accurate Display.sync() method that auto adapts to the systems
+ timer resolution and load.
+
+2012-02-28 18:18 spasi
+
+ * src/java/org/lwjgl/MemoryUtil.java,
+ src/native/common/org_lwjgl_opencl_CallbackUtil.c,
+ src/templates/org/lwjgl/opencl/CL10.java: Fixed
+ clEnqueueNativeKernel crash.
+
+2012-02-18 18:38 matzon
+
+ * src/java/org/lwjgl/opengl/WindowsDisplay.java: added win32
+ display get x/y
+
+2012-02-18 16:30 kappa1
+
+ * src/java/org/lwjgl/opengl/Display.java,
+ src/java/org/lwjgl/opengl/DisplayImplementation.java,
+ src/java/org/lwjgl/opengl/LinuxDisplay.java,
+ src/java/org/lwjgl/opengl/MacOSXDisplay.java,
+ src/java/org/lwjgl/opengl/WindowsDisplay.java: Added the new
+ public API's Display.getX() and Display.getY(). Currently
+ implemented for Linux and Mac. Windows implementation pending.
+
+2012-02-18 01:49 kappa1
+
+ * src/java/org/lwjgl/opengl/LinuxDisplay.java,
+ src/java/org/lwjgl/opengl/LinuxEvent.java,
+ src/native/linux/opengl/org_lwjgl_opengl_Display.c,
+ src/native/linux/opengles/org_lwjgl_opengl_Display.c: Implement
+ the ability for the native Display window on Linux to get its x
+ and y position. In preparation for adding the new Display.getX()
+ & getY() API's.
+
+2012-02-06 20:35 matzon
+
+ * src/java/org/lwjgl/opengl/WindowsDisplay.java: applied dr_evil's
+ maximized patch
+
+2012-02-06 19:26 spasi
+
+ * src/templates/org/lwjgl/opencl/AMD_media_ops2.java: Added support
+ for AMD_media_ops2.
+
+2012-02-01 22:50 matzon
+
+ * src/java/org/lwjgl/opengl/WindowsDisplay.java: updated fix for
+ resizable
+
+2012-02-01 21:33 matzon
+
+ * src/java/org/lwjgl/opengl/WindowsDisplay.java: applying suggested
+ fix for resize issue
+
+2012-01-31 23:25 kappa1
+
+ * src/java/org/lwjgl/opengl/LinuxMouse.java: removed a tiny bit of
+ dead debug code
+
+2012-01-31 23:24 kappa1
+
+ * src/java/org/lwjgl/opengl/LinuxMouse.java,
+ src/native/linux/org_lwjgl_opengl_LinuxMouse.c: Linux Mouse:
+ added support for using more than 3 buttons on a mouse, supports
+ mice with upto 256 buttons.
+
+2012-01-29 20:35 matzon
+
+ * src/java/org/lwjgl/opengl/WindowsMouse.java: limit mouse buttons
+ to 5, since we can't read more at this time
+
+2012-01-29 20:26 matzon
+
+ * src/java/org/lwjgl/opengl/WindowsDisplay.java: support for 5
+ buttons on windows
+
+2012-01-29 19:06 spasi
+
+ * src/templates/org/lwjgl/opengl/ARB_buffer_object.java,
+ src/templates/org/lwjgl/opengl/EXT_direct_state_access.java,
+ src/templates/org/lwjgl/opengl/GL15.java,
+ src/templates/org/lwjgl/opengles/GLES20.java: Removed @Check("1")
+ from BufferData functions.
+
+2012-01-28 19:35 spasi
+
+ * src/templates/org/lwjgl/opengl/AMD_stencil_operation_extended.java,
+ src/templates/org/lwjgl/opengl/ARB_buffer_object.java,
+ src/templates/org/lwjgl/opengl/EXT_direct_state_access.java,
+ src/templates/org/lwjgl/opengl/GL15.java,
+ src/templates/org/lwjgl/opengles/GLES20.java: Added
+ AMD_stencil_operation_extended.
+ Reverted @Check("1") from SubData BO functions.
+
+2012-01-23 21:30 matzon
+
+ * platform_build/build-definitions.xml,
+ src/java/org/lwjgl/Sys.java, www/changelogs/2.8.3-changelog.txt,
+ www/changelogs/full-changelog.txt: bumping to 2.8.4 and adding
+ changelogs
+
2012-01-22 20:16 kappa1
* src/java/org/lwjgl/opengl/LinuxDisplay.java: Small tweak to the
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sp...@us...> - 2012-08-07 15:14:17
|
Revision: 3783
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3783&view=rev
Author: spasi
Date: 2012-08-07 15:14:03 +0000 (Tue, 07 Aug 2012)
Log Message:
-----------
Added support for OpenGL 4.3 and OpenGL ES 3.0.
Modified the generator process to use relative paths. We were hitting the command line length limit on Windows.
Some extension improvements, fixes and spec updates.
Modified Paths:
--------------
trunk/LWJGL/build.xml
trunk/LWJGL/platform_build/build-definitions.xml
trunk/LWJGL/platform_build/build-generator.xml
trunk/LWJGL/src/java/org/lwjgl/opengl/CallbackUtil.java
trunk/LWJGL/src/java/org/lwjgl/opengl/ContextAttribs.java
trunk/LWJGL/src/java/org/lwjgl/opengles/APIUtil.java
trunk/LWJGL/src/java/org/lwjgl/opengles/ContextAttribs.java
trunk/LWJGL/src/java/org/lwjgl/opengles/GLChecks.java
trunk/LWJGL/src/java/org/lwjgl/opengles/GLContext.java
trunk/LWJGL/src/java/org/lwjgl/opengles/StateTracker.java
trunk/LWJGL/src/java/org/lwjgl/util/generator/GeneratorProcessorFactory.java
trunk/LWJGL/src/java/org/lwjgl/util/generator/GeneratorVisitor.java
trunk/LWJGL/src/java/org/lwjgl/util/generator/NativeTypeTranslator.java
trunk/LWJGL/src/java/org/lwjgl/util/generator/SignatureTranslator.java
trunk/LWJGL/src/java/org/lwjgl/util/generator/opengl/GLESGeneratorProcessorFactory.java
trunk/LWJGL/src/java/org/lwjgl/util/generator/opengl/GLESTypeMap.java
trunk/LWJGL/src/native/common/opengl/extgl.h
trunk/LWJGL/src/native/common/opengl/org_lwjgl_opengl_CallbackUtil.c
trunk/LWJGL/src/native/common/opengles/extgl.h
trunk/LWJGL/src/native/common/opengles/extgl_types.h
trunk/LWJGL/src/native/common/org_lwjgl_opencl_CallbackUtil.c
trunk/LWJGL/src/templates/org/lwjgl/opengl/AMD_multi_draw_indirect.java
trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_draw_indirect.java
trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_gpu_shader4.java
trunk/LWJGL/src/templates/org/lwjgl/opengl/GL30.java
trunk/LWJGL/src/templates/org/lwjgl/opengl/GL32.java
trunk/LWJGL/src/templates/org/lwjgl/opengl/GL40.java
Added Paths:
-----------
trunk/LWJGL/src/java/org/lwjgl/opengl/KHRDebugCallback.java
trunk/LWJGL/src/java/org/lwjgl/opengles/CallbackUtil.java
trunk/LWJGL/src/java/org/lwjgl/opengles/FastIntMap.java
trunk/LWJGL/src/java/org/lwjgl/opengles/GLSync.java
trunk/LWJGL/src/java/org/lwjgl/opengles/KHRDebugCallback.java
trunk/LWJGL/src/native/common/opengles/org_lwjgl_opengles_CallbackUtil.c
trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_ES3_compatibility.java
trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_arrays_of_arrays.java
trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_clear_buffer_object.java
trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_compute_shader.java
trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_copy_image.java
trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_debug_group.java
trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_debug_label.java
trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_debug_output2.java
trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_explicit_uniform_location.java
trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_fragment_layer_viewport.java
trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_framebuffer_no_attachments.java
trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_internalformat_query2.java
trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_invalidate_subdata.java
trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_multi_draw_indirect.java
trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_program_interface_query.java
trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_robust_buffer_access_behavior.java
trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_robustness_isolation.java
trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_shader_image_size.java
trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_shader_storage_buffer_object.java
trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_stencil_texturing.java
trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_texture_buffer_range.java
trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_texture_query_levels.java
trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_texture_storage_multisample.java
trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_texture_view.java
trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_vertex_attrib_binding.java
trunk/LWJGL/src/templates/org/lwjgl/opengl/GL43.java
trunk/LWJGL/src/templates/org/lwjgl/opengl/KHR_debug.java
trunk/LWJGL/src/templates/org/lwjgl/opengl/KHR_texture_compression_astc_ldr.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/GLES30.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/KHR_debug.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/KHR_texture_compression_astc_ldr.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/OES_required_internalformat.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/OES_surfaceless_context.java
Modified: trunk/LWJGL/build.xml
===================================================================
--- trunk/LWJGL/build.xml 2012-07-14 23:29:21 UTC (rev 3782)
+++ trunk/LWJGL/build.xml 2012-08-07 15:14:03 UTC (rev 3783)
@@ -177,7 +177,7 @@
<!-- ================================================================== -->
<!-- Generate a list of the OpenGL extension classes -->
<!-- ================================================================== -->
- <fileset id="opengl-template-fileset" dir="${lwjgl.src}/generated" includes="${opengl-template-pattern}"/>
+ <fileset id="opengl-template-fileset" dir="${lwjgl.src}/generated/org/lwjgl/opengl" includes="${opengl-template-pattern}"/>
<property name="opengl-template-files" refid="opengl-template-fileset"/>
<tempfile property="temp.file"/>
@@ -187,7 +187,7 @@
<filterchain>
<tokenfilter delimoutput=",">
<stringtokenizer delims=";"/>
- <replaceregex pattern="org\${file.separator}lwjgl\${file.separator}opengl\${file.separator}(.+)[.]java"
+ <replaceregex pattern="(.+)[.]java"
replace="org/lwjgl/opengl/\1.class"/>
</tokenfilter>
</filterchain>
@@ -350,6 +350,7 @@
<class name="org.lwjgl.opengles.EGLKHRReusableSync"/>
<class name="org.lwjgl.opengles.EGLNVSync"/>
<class name="org.lwjgl.opengles.GLContext"/>
+ <class name="org.lwjgl.opengles.CallbackUtil"/>
</javah>
</target>
@@ -626,7 +627,7 @@
<bottom><![CDATA[<i>Copyright © 2002-2009 lwjgl.org. All Rights Reserved.</i>]]></bottom>
</javadoc>
</target>
-
+
<!-- get and copy nightly binaries into libs folder -->
<target name="copy-nightly-binaries" depends="-initialize" description="Copies latest successful nightly binaries into appropriate libs folder">
<delete file="${lwjgl.temp}/lwjgl-${lwjgl.version}.zip" failonerror="false"/>
@@ -635,7 +636,7 @@
<patternset>
<include name="**/native/**/*lwjgl*"/>
</patternset>
- <globmapper from="lwjgl-${lwjgl.version}/native/*" to="*"/>
+ <globmapper from="lwjgl-${lwjgl.version}/native/*" to="*"/>
</unzip>
- </target>
+ </target>
</project>
Modified: trunk/LWJGL/platform_build/build-definitions.xml
===================================================================
--- trunk/LWJGL/platform_build/build-definitions.xml 2012-07-14 23:29:21 UTC (rev 3782)
+++ trunk/LWJGL/platform_build/build-definitions.xml 2012-08-07 15:14:03 UTC (rev 3783)
@@ -15,11 +15,17 @@
<property name="lwjgl.version" value="2.8.5" />
<property name="lwjgl.web" location="www" />
- <property name="opengl-template-pattern" value="org/lwjgl/opengl/GL*.java,org/lwjgl/opengl/ARB*.java,org/lwjgl/opengl/AMD*.java,org/lwjgl/opengl/APPLE*.java,org/lwjgl/opengl/ATI*.java,org/lwjgl/opengl/EXT*.java,org/lwjgl/opengl/NV*.java,org/lwjgl/opengl/NVX*.java,org/lwjgl/opengl/HP*.java,org/lwjgl/opengl/IBM*.java,org/lwjgl/opengl/SUN*.java,org/lwjgl/opengl/SGIS*.java,org/lwjgl/opengl/GREMEDY*.java"/>
- <property name="opengles-template-pattern" value="org/lwjgl/opengles/GLES*.java,org/lwjgl/opengles/ARB*.java,org/lwjgl/opengles/EXT*.java,org/lwjgl/opengles/AMD*.java,org/lwjgl/opengles/ANGLE*.java,org/lwjgl/opengles/APPLE*.java,org/lwjgl/opengles/ARM*.java,org/lwjgl/opengles/DMP*.java,org/lwjgl/opengles/IMG*.java,org/lwjgl/opengles/NV*.java,org/lwjgl/opengles/OES*.java,org/lwjgl/opengles/QCOM*.java,org/lwjgl/opengles/VIV*.java"/>
- <property name="opencl-template-pattern-extensions" value="org/lwjgl/opencl/KHR*.java,org/lwjgl/opencl/EXT*.java,org/lwjgl/opencl/APPLE*.java,org/lwjgl/opencl/AMD*.java,org/lwjgl/opencl/INTEL*.java,org/lwjgl/opencl/NV*.java"/>
- <property name="opencl-template-pattern" value="org/lwjgl/opencl/CL*.java,${opencl-template-pattern-extensions}"/>
+ <property name="lwjgl.src.templates.al" location="${lwjgl.src.templates}/org/lwjgl/openal"/>
+ <property name="lwjgl.src.templates.gl" location="${lwjgl.src.templates}/org/lwjgl/opengl"/>
+ <property name="lwjgl.src.templates.gles" location="${lwjgl.src.templates}/org/lwjgl/opengles"/>
+ <property name="lwjgl.src.templates.cl" location="${lwjgl.src.templates}/org/lwjgl/opencl"/>
+ <property name="openal-template-pattern" value="AL*.java,EFX*.java"/>
+ <property name="opengl-template-pattern" value="GL*.java,ARB*.java,EXT*.java,KHR*.java,AMD*.java,APPLE*.java,ATI*.java,NV*.java,NVX*.java,HP*.java,IBM*.java,SUN*.java,SGIS*.java,GREMEDY*.java"/>
+ <property name="opengles-template-pattern" value="GLES*.java,ARB*.java,EXT*.java,KHR*.java,AMD*.java,ANGLE*.java,APPLE*.java,ARM*.java,DMP*.java,IMG*.java,NV*.java,OES*.java,QCOM*.java,VIV*.java"/>
+ <property name="opencl-template-pattern-extensions" value="KHR*.java,EXT*.java,APPLE*.java,AMD*.java,INTEL*.java,NV*.java"/>
+ <property name="opencl-template-pattern" value="CL*.java,${opencl-template-pattern-extensions}"/>
+
<!-- ================================================================== -->
<!-- Filesets used for targets -->
<!-- ================================================================== -->
Modified: trunk/LWJGL/platform_build/build-generator.xml
===================================================================
--- trunk/LWJGL/platform_build/build-generator.xml 2012-07-14 23:29:21 UTC (rev 3782)
+++ trunk/LWJGL/platform_build/build-generator.xml 2012-08-07 15:14:03 UTC (rev 3783)
@@ -30,8 +30,10 @@
<include name="org/lwjgl/opengl/GLSync.java"/>
<include name="org/lwjgl/opengl/AMDDebugOutputCallback.java"/>
<include name="org/lwjgl/opengl/ARBDebugOutputCallback.java"/>
+ <include name="org/lwjgl/opengl/KHRDebugCallback.java"/>
<!-- OpenGL ES -->
<include name="org/lwjgl/opengles/EGLImageOES.java"/>
+ <include name="org/lwjgl/opengles/KHRDebugCallback.java"/>
<!-- OpenCL -->
<include name="org/lwjgl/opencl/CLPlatform.java"/>
<include name="org/lwjgl/opencl/CLDevice.java"/>
@@ -57,7 +59,7 @@
<!-- Generate OpenAL -->
<target name="generate-openal" depends="generators" description="Generates java and native source for AL">
- <apply executable="apt" parallel="true">
+ <apply executable="apt" parallel="true" dir="${lwjgl.src.templates.al}" relative="true">
<arg value="-nocompile"/>
<arg value="-factory"/>
<arg value="org.lwjgl.util.generator.GeneratorProcessorFactory"/>
@@ -67,14 +69,15 @@
<arg path="${lwjgl.src}/generated"/>
<arg value="-d"/>
<arg path="${lwjgl.src.native}/generated/openal"/>
+ <arg value="-Abinpath=${lwjgl.bin}"/>
<arg value="-Atypemap=org.lwjgl.util.generator.openal.ALTypeMap"/>
- <fileset dir="${lwjgl.src.templates}" includes="org/lwjgl/openal/AL10.java, org/lwjgl/openal/AL11.java, org/lwjgl/openal/EFX10.java"/>
+ <fileset dir="${lwjgl.src.templates.al}" includes="${openal-template-pattern}"/>
</apply>
</target>
<!-- Generate OpenAL [DEBUG] -->
<target name="generate-openal-debug" depends="generators" description="Generates java and native source for AL">
- <apply executable="apt" parallel="true">
+ <apply executable="apt" parallel="true" dir="${lwjgl.src.templates.al}" relative="true">
<arg value="-nocompile"/>
<arg value="-factory"/>
<arg value="org.lwjgl.util.generator.GeneratorProcessorFactory"/>
@@ -84,9 +87,10 @@
<arg path="${lwjgl.src}/generated"/>
<arg value="-d"/>
<arg path="${lwjgl.src.native}/generated/openal"/>
+ <arg value="-Abinpath=${lwjgl.bin}"/>
<arg value="-Atypemap=org.lwjgl.util.generator.openal.ALTypeMap"/>
<arg value="-Ageneratechecks"/>
- <fileset dir="${lwjgl.src.templates}" includes="org/lwjgl/openal/AL10.java, org/lwjgl/openal/AL11.java, org/lwjgl/openal/EFX10.java"/>
+ <fileset dir="${lwjgl.src.templates.al}" includes="${openal-template-pattern}"/>
</apply>
</target>
@@ -98,7 +102,7 @@
<!-- Generate OpenGL -->
<target name="generate-opengl" depends="generators" description="Generates java and native source for GL">
- <apply executable="apt" parallel="true">
+ <apply executable="apt" parallel="true" dir="${lwjgl.src.templates.gl}" relative="true">
<arg value="-nocompile"/>
<arg value="-factory"/>
<arg value="org.lwjgl.util.generator.GeneratorProcessorFactory"/>
@@ -108,15 +112,16 @@
<arg path="${lwjgl.src}/generated"/>
<arg value="-d"/>
<arg path="${lwjgl.src.native}/generated/opengl"/>
+ <arg value="-Abinpath=${lwjgl.bin}"/>
<arg value="-Acontextspecific"/>
<arg value="-Atypemap=org.lwjgl.util.generator.opengl.GLTypeMap"/>
- <fileset dir="${lwjgl.src.templates}" includes="${opengl-template-pattern}"/>
+ <fileset dir="${lwjgl.src.templates.gl}" includes="${opengl-template-pattern}"/>
</apply>
</target>
<!-- Generate OpenGL [DEBUG] -->
<target name="generate-opengl-debug" depends="generators" description="Generates debug java and native source for GL">
- <apply executable="apt" parallel="true">
+ <apply executable="apt" parallel="true" dir="${lwjgl.src.templates.gl}" relative="true">
<arg value="-nocompile"/>
<arg value="-factory"/>
<arg value="org.lwjgl.util.generator.GeneratorProcessorFactory"/>
@@ -126,16 +131,17 @@
<arg path="${lwjgl.src}/generated"/>
<arg value="-d"/>
<arg path="${lwjgl.src.native}/generated/opengl"/>
+ <arg value="-Abinpath=${lwjgl.bin}"/>
<arg value="-Ageneratechecks"/>
<arg value="-Acontextspecific"/>
<arg value="-Atypemap=org.lwjgl.util.generator.opengl.GLTypeMap"/>
- <fileset dir="${lwjgl.src.templates}" includes="${opengl-template-pattern}"/>
+ <fileset dir="${lwjgl.src.templates.gl}" includes="${opengl-template-pattern}"/>
</apply>
</target>
<!-- Generate OpenGL references -->
<target name="generate-opengl-references" depends="generators" description="Generates java and native source for GL">
- <apply executable="apt" parallel="true">
+ <apply executable="apt" parallel="true" dir="${lwjgl.src.templates.gl}" relative="true">
<arg value="-nocompile"/>
<arg value="-factory"/>
<arg value="org.lwjgl.util.generator.opengl.GLReferencesGeneratorProcessorFactory"/>
@@ -143,13 +149,13 @@
<arg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/>
<arg value="-s"/>
<arg path="${lwjgl.src}/generated"/>
- <fileset dir="${lwjgl.src.templates}" includes="${opengl-template-pattern}"/>
+ <fileset dir="${lwjgl.src.templates.gl}" includes="${opengl-template-pattern}"/>
</apply>
</target>
<!-- Generate OpenGL context capabilities -->
<target name="generate-opengl-capabilities" depends="generators" description="Generates java and native source for GL">
- <apply executable="apt" parallel="true">
+ <apply executable="apt" parallel="true" dir="${lwjgl.src.templates.gl}" relative="true">
<arg value="-nocompile"/>
<arg value="-factory"/>
<arg value="org.lwjgl.util.generator.opengl.GLGeneratorProcessorFactory"/>
@@ -158,13 +164,13 @@
<arg value="-s"/>
<arg path="${lwjgl.src}/generated"/>
<arg value="-Acontextspecific"/>
- <fileset dir="${lwjgl.src.templates}" includes="${opengl-template-pattern}"/>
+ <fileset dir="${lwjgl.src.templates.gl}" includes="${opengl-template-pattern}"/>
</apply>
</target>
<!-- Generate OpenGL context capabilities [DEBUG] -->
<target name="generate-opengl-capabilities-debug" depends="generators" description="Generates debug java and native source for GL">
- <apply executable="apt" parallel="true">
+ <apply executable="apt" parallel="true" dir="${lwjgl.src.templates.gl}" relative="true">
<arg value="-nocompile"/>
<arg value="-factory"/>
<arg value="org.lwjgl.util.generator.opengl.GLGeneratorProcessorFactory"/>
@@ -174,7 +180,7 @@
<arg path="${lwjgl.src}/generated"/>
<arg value="-Ageneratechecks"/>
<arg value="-Acontextspecific"/>
- <fileset dir="${lwjgl.src.templates}" includes="${opengl-template-pattern}"/>
+ <fileset dir="${lwjgl.src.templates.gl}" includes="${opengl-template-pattern}"/>
</apply>
</target>
@@ -186,7 +192,7 @@
<!-- Generate OpenGL ES -->
<target name="generate-opengles" depends="generators" description="Generates java and native source for GL ES">
- <apply executable="apt" parallel="true">
+ <apply executable="apt" parallel="true" dir="${lwjgl.src.templates.gles}" relative="true">
<arg value="-nocompile"/>
<arg value="-factory"/>
<arg value="org.lwjgl.util.generator.GeneratorProcessorFactory"/>
@@ -196,15 +202,16 @@
<arg path="${lwjgl.src}/generated"/>
<arg value="-d"/>
<arg path="${lwjgl.src.native}/generated/opengles"/>
+ <arg value="-Abinpath=${lwjgl.bin}"/>
<!--<arg value="-Acontextspecific"/>-->
<arg value="-Atypemap=org.lwjgl.util.generator.opengl.GLESTypeMap"/>
- <fileset dir="${lwjgl.src.templates}" includes="${opengles-template-pattern}"/>
+ <fileset dir="${lwjgl.src.templates.gles}" includes="${opengles-template-pattern}"/>
</apply>
</target>
<!-- Generate OpenGL ES [DEBUG] -->
<target name="generate-opengles-debug" depends="generators" description="Generates debug java and native source for GL ES">
- <apply executable="apt" parallel="true">
+ <apply executable="apt" parallel="true" dir="${lwjgl.src.templates.gles}" relative="true">
<arg value="-nocompile"/>
<arg value="-factory"/>
<arg value="org.lwjgl.util.generator.GeneratorProcessorFactory"/>
@@ -214,16 +221,17 @@
<arg path="${lwjgl.src}/generated"/>
<arg value="-d"/>
<arg path="${lwjgl.src.native}/generated/opengles"/>
+ <arg value="-Abinpath=${lwjgl.bin}"/>
<arg value="-Ageneratechecks"/>
<!--<arg value="-Acontextspecific"/>-->
<arg value="-Atypemap=org.lwjgl.util.generator.opengl.GLESTypeMap"/>
- <fileset dir="${lwjgl.src.templates}" includes="${opengles-template-pattern}"/>
+ <fileset dir="${lwjgl.src.templates.gles}" includes="${opengles-template-pattern}"/>
</apply>
</target>
<!-- Generate OpenGL ES context capabilities -->
<target name="generate-opengles-capabilities" depends="generators" description="Generates java and native source for GL ES">
- <apply executable="apt" parallel="true">
+ <apply executable="apt" parallel="true" dir="${lwjgl.src.templates.gles}" relative="true">
<arg value="-nocompile"/>
<arg value="-factory"/>
<arg value="org.lwjgl.util.generator.opengl.GLESGeneratorProcessorFactory"/>
@@ -232,13 +240,13 @@
<arg value="-s"/>
<arg path="${lwjgl.src}/generated"/>
<!--<arg value="-Acontextspecific"/>-->
- <fileset dir="${lwjgl.src.templates}" includes="${opengles-template-pattern}"/>
+ <fileset dir="${lwjgl.src.templates.gles}" includes="${opengles-template-pattern}"/>
</apply>
</target>
<!-- Generate OpenGL ES context capabilities [DEBUG] -->
<target name="generate-opengles-capabilities-debug" depends="generators" description="Generates debug java and native source for GL ES">
- <apply executable="apt" parallel="true">
+ <apply executable="apt" parallel="true" dir="${lwjgl.src.templates.gles}" relative="true">
<arg value="-nocompile"/>
<arg value="-factory"/>
<arg value="org.lwjgl.util.generator.opengl.GLESGeneratorProcessorFactory"/>
@@ -248,7 +256,7 @@
<arg path="${lwjgl.src}/generated"/>
<arg value="-Ageneratechecks"/>
<!--<arg value="-Acontextspecific"/>-->
- <fileset dir="${lwjgl.src.templates}" includes="${opengles-template-pattern}"/>
+ <fileset dir="${lwjgl.src.templates.gles}" includes="${opengles-template-pattern}"/>
</apply>
</target>
@@ -260,7 +268,7 @@
<!-- Generate OpenCL -->
<target name="generate-opencl" depends="generators" description="Generates java and native source for CL">
- <apply executable="apt" parallel="true">
+ <apply executable="apt" parallel="true" dir="${lwjgl.src.templates.cl}" relative="true">
<arg value="-nocompile"/>
<arg value="-factory"/>
<arg value="org.lwjgl.util.generator.GeneratorProcessorFactory"/>
@@ -270,15 +278,16 @@
<arg path="${lwjgl.src}/generated"/>
<arg value="-d"/>
<arg path="${lwjgl.src.native}/generated/opencl"/>
+ <arg value="-Abinpath=${lwjgl.bin}"/>
<arg value="-Acontextspecific"/>
<arg value="-Atypemap=org.lwjgl.util.generator.opencl.CLTypeMap"/>
- <fileset dir="${lwjgl.src.templates}" includes="${opencl-template-pattern}"/>
+ <fileset dir="${lwjgl.src.templates.cl}" includes="${opencl-template-pattern}"/>
</apply>
</target>
<!-- Generate OpenCL [DEBUG] -->
<target name="generate-opencl-debug" depends="generators" description="Generates debug java and native source for CL">
- <apply executable="apt" parallel="true">
+ <apply executable="apt" parallel="true" dir="${lwjgl.src.templates.cl}" relative="true">
<arg value="-nocompile"/>
<arg value="-factory"/>
<arg value="org.lwjgl.util.generator.GeneratorProcessorFactory"/>
@@ -288,16 +297,17 @@
<arg path="${lwjgl.src}/generated"/>
<arg value="-d"/>
<arg path="${lwjgl.src.native}/generated/opencl"/>
+ <arg value="-Abinpath=${lwjgl.bin}"/>
<arg value="-Ageneratechecks"/>
<arg value="-Acontextspecific"/>
<arg value="-Atypemap=org.lwjgl.util.generator.opencl.CLTypeMap"/>
- <fileset dir="${lwjgl.src.templates}" includes="${opencl-template-pattern}"/>
+ <fileset dir="${lwjgl.src.templates.cl}" includes="${opencl-template-pattern}"/>
</apply>
</target>
<!-- Generate OpenCL capabilities -->
<target name="generate-opencl-capabilities" depends="generators" description="Generates capabilities for CL">
- <apply executable="apt" parallel="true">
+ <apply executable="apt" parallel="true" dir="${lwjgl.src.templates.cl}" relative="true">
<arg value="-nocompile"/>
<arg value="-factory"/>
<arg value="org.lwjgl.util.generator.opencl.CLGeneratorProcessorFactory"/>
@@ -306,13 +316,13 @@
<arg value="-s"/>
<arg path="${lwjgl.src}/generated"/>
<arg value="-Acontextspecific"/>
- <fileset dir="${lwjgl.src.templates}" includes="${opencl-template-pattern}"/>
+ <fileset dir="${lwjgl.src.templates.cl}" includes="${opencl-template-pattern}"/>
</apply>
</target>
<!-- Generate OpenCL capabilities [DEBUG] -->
<target name="generate-opencl-capabilities-debug" depends="generators" description="Generates debug capabilities for CL">
- <apply executable="apt" parallel="true">
+ <apply executable="apt" parallel="true" dir="${lwjgl.src.templates.cl}" relative="true">
<arg value="-nocompile"/>
<arg value="-factory"/>
<arg value="org.lwjgl.util.generator.opencl.CLGeneratorProcessorFactory"/>
@@ -322,7 +332,7 @@
<arg path="${lwjgl.src}/generated"/>
<arg value="-Ageneratechecks"/>
<arg value="-Acontextspecific"/>
- <fileset dir="${lwjgl.src.templates}" includes="${opencl-template-pattern}"/>
+ <fileset dir="${lwjgl.src.templates.cl}" includes="${opencl-template-pattern}"/>
</apply>
</target>
</project>
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/CallbackUtil.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/CallbackUtil.java 2012-07-14 23:29:21 UTC (rev 3782)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/CallbackUtil.java 2012-08-07 15:14:03 UTC (rev 3783)
@@ -45,6 +45,8 @@
private static final Map<ContextCapabilities, Long> contextUserParamsARB = new HashMap<ContextCapabilities, Long>();
/** Context -> Long */
private static final Map<ContextCapabilities, Long> contextUserParamsAMD = new HashMap<ContextCapabilities, Long>();
+ /** Context -> Long */
+ private static final Map<ContextCapabilities, Long> contextUserParamsKHR = new HashMap<ContextCapabilities, Long>();
private CallbackUtil() {}
@@ -115,6 +117,10 @@
userParam = contextUserParamsAMD.remove(caps);
if ( userParam != null )
deleteGlobalRef(userParam);
+
+ userParam = contextUserParamsKHR.remove(caps);
+ if ( userParam != null )
+ deleteGlobalRef(userParam);
}
// --------- [ ARB_debug_output ] ---------
@@ -157,4 +163,24 @@
registerContextCallback(userParam, contextUserParamsAMD);
}
+ // --------- [ KHR_debug ] ---------
+
+ /**
+ * Returns the memory address of the native function we pass to glDebugMessageCallback.
+ *
+ * @return the callback function address
+ */
+ static native long getDebugCallbackKHR();
+
+ /**
+ * Associates the current OpenGL context with the specified global reference. If there
+ * is no context current, the global reference is deleted and an exception is thrown.
+ * Any previous callback registrations will be cleared.
+ *
+ * @param userParam the global reference pointer
+ */
+ static void registerContextCallbackKHR(final long userParam) {
+ registerContextCallback(userParam, contextUserParamsKHR);
+ }
+
}
\ No newline at end of file
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/ContextAttribs.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/ContextAttribs.java 2012-07-14 23:29:21 UTC (rev 3782)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/ContextAttribs.java 2012-08-07 15:14:03 UTC (rev 3783)
@@ -63,12 +63,14 @@
// Same values for GLX & WGL
private static final int CONTEXT_ES2_PROFILE_BIT_EXT = 0x00000004;
- private static final int CONTEXT_ROBUST_ACCESS_BIT_ARB = 0x00000004;
+ private static final int CONTEXT_ROBUST_ACCESS_BIT_ARB = 0x00000004;
private static final int CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB = 0x8256;
private static final int
- NO_RESET_NOTIFICATION_ARB = 0x8261,
- LOSE_CONTEXT_ON_RESET_ARB = 0x8252;
+ NO_RESET_NOTIFICATION_ARB = 0x8261,
+ LOSE_CONTEXT_ON_RESET_ARB = 0x8252;
+ private static final int CONTEXT_RESET_ISOLATION_BIT_ARB = 0x00000008;
+
private int majorVersion;
private int minorVersion;
@@ -83,6 +85,7 @@
private boolean profileES;
private boolean loseContextOnReset;
+ private boolean contextResetIsolation;
public ContextAttribs() {
this(1, 0);
@@ -91,7 +94,7 @@
public ContextAttribs(final int majorVersion, final int minorVersion) {
if ( majorVersion < 0 || 4 < majorVersion ||
minorVersion < 0 ||
- (majorVersion == 4 && 2 < minorVersion) ||
+ (majorVersion == 4 && 3 < minorVersion) ||
(majorVersion == 3 && 3 < minorVersion) ||
(majorVersion == 2 && 1 < minorVersion) ||
(majorVersion == 1 && 5 < minorVersion) )
@@ -241,6 +244,15 @@
return attribs;
}
+ public ContextAttribs withContextResetIsolation(final boolean contextResetIsolation) {
+ if ( contextResetIsolation == this.contextResetIsolation )
+ return this;
+
+ final ContextAttribs attribs = new ContextAttribs(this);
+ attribs.contextResetIsolation = contextResetIsolation;
+ return attribs;
+ }
+
private static ContextAttribsImplementation getImplementation() {
switch ( LWJGLUtil.getPlatform() ) {
case LWJGLUtil.PLATFORM_LINUX:
@@ -272,6 +284,8 @@
flags |= implementation.getForwardCompatibleBit();
if ( robustAccess )
flags |= CONTEXT_ROBUST_ACCESS_BIT_ARB;
+ if ( contextResetIsolation )
+ flags |= CONTEXT_RESET_ISOLATION_BIT_ARB;
if ( 0 < flags )
attribCount++;
@@ -285,6 +299,9 @@
if ( 0 < profileMask )
attribCount++;
+ if ( loseContextOnReset )
+ attribCount++;
+
if ( attribCount == 0 )
return null;
Added: trunk/LWJGL/src/java/org/lwjgl/opengl/KHRDebugCallback.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/KHRDebugCallback.java (rev 0)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/KHRDebugCallback.java 2012-08-07 15:14:03 UTC (rev 3783)
@@ -0,0 +1,205 @@
+/*
+ * Copyright (c) 2002-2008 LWJGL Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * * Neither the name of 'LWJGL' nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEM...
[truncated message content] |
|
From: <sp...@us...> - 2012-10-16 14:53:31
|
Revision: 3804
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3804&view=rev
Author: spasi
Date: 2012-10-16 14:53:19 +0000 (Tue, 16 Oct 2012)
Log Message:
-----------
Added support for AMD_shader_trinary_minmax, INTEL_map_texture and NV_draw_texture.
Modified Paths:
--------------
trunk/LWJGL/platform_build/build-definitions.xml
Added Paths:
-----------
trunk/LWJGL/src/templates/org/lwjgl/opengl/AMD_shader_trinary_minmax.java
trunk/LWJGL/src/templates/org/lwjgl/opengl/INTEL_map_texture.java
trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_draw_texture.java
trunk/LWJGL/src/templates/org/lwjgl/opengles/NV_draw_texture.java
Modified: trunk/LWJGL/platform_build/build-definitions.xml
===================================================================
--- trunk/LWJGL/platform_build/build-definitions.xml 2012-09-30 09:48:01 UTC (rev 3803)
+++ trunk/LWJGL/platform_build/build-definitions.xml 2012-10-16 14:53:19 UTC (rev 3804)
@@ -21,7 +21,7 @@
<property name="lwjgl.src.templates.cl" location="${lwjgl.src.templates}/org/lwjgl/opencl"/>
<property name="openal-template-pattern" value="AL*.java,EFX*.java"/>
- <property name="opengl-template-pattern" value="GL*.java,ARB*.java,EXT*.java,KHR*.java,AMD*.java,APPLE*.java,ATI*.java,NV*.java,NVX*.java,HP*.java,IBM*.java,SUN*.java,SGIS*.java,GREMEDY*.java"/>
+ <property name="opengl-template-pattern" value="GL*.java,ARB*.java,EXT*.java,KHR*.java,AMD*.java,APPLE*.java,ATI*.java,NV*.java,NVX*.java,HP*.java,IBM*.java,SUN*.java,SGIS*.java,GREMEDY*.java,INTEL*.java"/>
<property name="opengles-template-pattern" value="GLES*.java,ARB*.java,EXT*.java,KHR*.java,AMD*.java,ANGLE*.java,APPLE*.java,ARM*.java,DMP*.java,IMG*.java,NV*.java,OES*.java,QCOM*.java,VIV*.java"/>
<property name="opencl-template-pattern-extensions" value="KHR*.java,EXT*.java,APPLE*.java,AMD*.java,INTEL*.java,NV*.java"/>
<property name="opencl-template-pattern" value="CL*.java,${opencl-template-pattern-extensions}"/>
Added: trunk/LWJGL/src/templates/org/lwjgl/opengl/AMD_shader_trinary_minmax.java
===================================================================
--- trunk/LWJGL/src/templates/org/lwjgl/opengl/AMD_shader_trinary_minmax.java (rev 0)
+++ trunk/LWJGL/src/templates/org/lwjgl/opengl/AMD_shader_trinary_minmax.java 2012-10-16 14:53:19 UTC (rev 3804)
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2002-2012 LWJGL Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * * Neither the name of 'LWJGL' nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package org.lwjgl.opengl;
+
+public interface AMD_shader_trinary_minmax {
+}
\ No newline at end of file
Added: trunk/LWJGL/src/templates/org/lwjgl/opengl/INTEL_map_texture.java
===================================================================
--- trunk/LWJGL/src/templates/org/lwjgl/opengl/INTEL_map_texture.java (rev 0)
+++ trunk/LWJGL/src/templates/org/lwjgl/opengl/INTEL_map_texture.java 2012-10-16 14:53:19 UTC (rev 3804)
@@ -0,0 +1,67 @@
+/*
+ * Copyright (c) 2002-2012 LWJGL Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * * Neither the name of 'LWJGL' nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package org.lwjgl.opengl;
+
+import org.lwjgl.util.generator.*;
+import org.lwjgl.util.generator.opengl.*;
+
+import java.nio.ByteBuffer;
+import java.nio.IntBuffer;
+
+public interface INTEL_map_texture {
+
+ /** Accepted by the <pname> parameter of TexParameteri, for target TEXTURE_2D */
+ int GL_TEXTURE_MEMORY_LAYOUT_INTEL = 0x83FF;
+
+ /**
+ * Accepted by the <params> when <pname> is set to
+ * <TEXTURE_MEMORY_LAYOUT_INTEL>:
+ */
+ int GL_LAYOUT_DEFAULT_INTEL = 0,
+ GL_LAYOUT_LINEAR_INTEL = 1,
+ GL_LAYOUT_LINEAR_CPU_CACHED_INTEL = 2;
+
+ /**
+ * The length parameter does not exist in the native API. It used by LWJGL to return a ByteBuffer
+ * with a proper capacity.
+ */
+ @CachedResult(isRange = true)
+ @GLvoid
+ @AutoSize("length")
+ ByteBuffer glMapTexture2DINTEL(@GLuint int texture, int level, @Helper(passToNative = true) @GLsizeiptr long length, @GLbitfield int access,
+ @Check("1") @OutParameter IntBuffer stride, @Check("1") @OutParameter @GLenum IntBuffer layout);
+
+ void glUnmapTexture2DINTEL(@GLuint int texture, int level);
+
+ void glSyncTextureINTEL(@GLuint int texture);
+
+}
Added: trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_draw_texture.java
===================================================================
--- trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_draw_texture.java (rev 0)
+++ trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_draw_texture.java 2012-10-16 14:53:19 UTC (rev 3804)
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2002-2012 LWJGL Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * * Neither the name of 'LWJGL' nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package org.lwjgl.opengl;
+
+import org.lwjgl.util.generator.opengl.GLfloat;
+import org.lwjgl.util.generator.opengl.GLuint;
+
+public interface NV_draw_texture {
+
+ void glDrawTextureNV(@GLuint int texture, @GLuint int sampler,
+ @GLfloat float x0, @GLfloat float y0,
+ @GLfloat float x1, @GLfloat float y1,
+ @GLfloat float z,
+ @GLfloat float s0, @GLfloat float t0,
+ @GLfloat float s1, @GLfloat float t1);
+
+}
\ No newline at end of file
Added: trunk/LWJGL/src/templates/org/lwjgl/opengles/NV_draw_texture.java
===================================================================
--- trunk/LWJGL/src/templates/org/lwjgl/opengles/NV_draw_texture.java (rev 0)
+++ trunk/LWJGL/src/templates/org/lwjgl/opengles/NV_draw_texture.java 2012-10-16 14:53:19 UTC (rev 3804)
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2002-2012 LWJGL Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * * Neither the name of 'LWJGL' nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package org.lwjgl.opengles;
+
+import org.lwjgl.util.generator.opengl.GLfloat;
+import org.lwjgl.util.generator.opengl.GLuint;
+
+public interface NV_draw_texture {
+
+ void glDrawTextureNV(@GLuint int texture, @GLuint int sampler,
+ @GLfloat float x0, @GLfloat float y0,
+ @GLfloat float x1, @GLfloat float y1,
+ @GLfloat float z,
+ @GLfloat float s0, @GLfloat float t0,
+ @GLfloat float s1, @GLfloat float t1);
+
+}
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2012-11-04 19:50:34
|
Revision: 3811
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3811&view=rev
Author: matzon
Date: 2012-11-04 19:50:22 +0000 (Sun, 04 Nov 2012)
Log Message:
-----------
Bumping version number
Modified Paths:
--------------
trunk/LWJGL/platform_build/build-definitions.xml
trunk/LWJGL/src/java/org/lwjgl/Sys.java
Modified: trunk/LWJGL/platform_build/build-definitions.xml
===================================================================
--- trunk/LWJGL/platform_build/build-definitions.xml 2012-11-04 18:39:35 UTC (rev 3810)
+++ trunk/LWJGL/platform_build/build-definitions.xml 2012-11-04 19:50:22 UTC (rev 3811)
@@ -12,7 +12,7 @@
<property name="lwjgl.docs" location="doc" />
<property name="lwjgl.temp" location="temp" />
<property name="lwjgl.res" location="res" />
- <property name="lwjgl.version" value="2.8.5" />
+ <property name="lwjgl.version" value="2.9.0" />
<property name="lwjgl.web" location="www" />
<property name="lwjgl.src.templates.al" location="${lwjgl.src.templates}/org/lwjgl/openal"/>
Modified: trunk/LWJGL/src/java/org/lwjgl/Sys.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/Sys.java 2012-11-04 18:39:35 UTC (rev 3810)
+++ trunk/LWJGL/src/java/org/lwjgl/Sys.java 2012-11-04 19:50:22 UTC (rev 3811)
@@ -54,7 +54,7 @@
private static final String JNI_LIBRARY_NAME = "lwjgl";
/** Current version of library */
- private static final String VERSION = "2.8.5";
+ private static final String VERSION = "2.9.0";
private static final String POSTFIX64BIT = "64";
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sp...@us...> - 2013-01-29 21:03:01
|
Revision: 3839
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3839&view=rev
Author: spasi
Date: 2013-01-29 21:02:52 +0000 (Tue, 29 Jan 2013)
Log Message:
-----------
Sync with recent Git changes.
Modified Paths:
--------------
trunk/LWJGL/platform_build/windows_ant/build.xml
trunk/LWJGL/src/java/org/lwjgl/opengl/Display.java
trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDisplay.java
trunk/LWJGL/src/java/org/lwjgl/util/generator/NativeMethodStubsGenerator.java
trunk/LWJGL/src/native/common/common_tools.c
trunk/LWJGL/src/native/common/common_tools.h
trunk/LWJGL/src/native/common/extcl.c
trunk/LWJGL/src/native/common/extcl.h
trunk/LWJGL/src/native/common/org_lwjgl_openal_ALC10.c
trunk/LWJGL/src/native/common/org_lwjgl_opencl_CallbackUtil.c
trunk/LWJGL/src/native/windows/opengl/context.c
trunk/LWJGL/src/native/windows/org_lwjgl_opengl_Display.c
trunk/LWJGL/src/native/windows/org_lwjgl_opengl_WindowsRegistry.c
Modified: trunk/LWJGL/platform_build/windows_ant/build.xml
===================================================================
--- trunk/LWJGL/platform_build/windows_ant/build.xml 2013-01-25 15:39:08 UTC (rev 3838)
+++ trunk/LWJGL/platform_build/windows_ant/build.xml 2013-01-29 21:02:52 UTC (rev 3839)
@@ -6,8 +6,8 @@
<property name="sdkhome" location="${env.MSSDK}"/>
<target name="compile_dir">
- <apply dir="." failonerror="true" executable="cl" dest="." skipemptyfilesets="true">
- <arg line="/Ox /W2 /nologo /Ox /Ob2 /Oi /Ot /Oy /FD /EHsc /MT /Gy /W2 /nologo /c"/>
+ <apply dir="." failonerror="true" executable="cl" dest="." skipemptyfilesets="true"parallel="true">
+ <arg line="/c /W3 /EHsc /Ox /Gy /MT /MP /nologo"/>
<arg value="/I${sdkhome}\include"/>
<arg value="/I${java.home}\..\include"/>
<arg value="/I${java.home}\..\include\win32"/>
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/Display.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/Display.java 2013-01-25 15:39:08 UTC (rev 3838)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/Display.java 2013-01-29 21:02:52 UTC (rev 3839)
@@ -58,6 +58,7 @@
import java.security.PrivilegedAction;
import java.util.Arrays;
import java.util.HashSet;
+import javax.swing.*;
public final class Display {
@@ -121,6 +122,12 @@
private static float r, g, b;
private static final ComponentListener component_listener = new ComponentAdapter() {
+ public void componentMoved(ComponentEvent e) {
+ synchronized ( GlobalLock.lock ) {
+ parent_resized = true;
+ }
+ }
+
public void componentResized(ComponentEvent e) {
synchronized ( GlobalLock.lock ) {
parent_resized = true;
@@ -298,6 +305,7 @@
throw new LWJGLException("Parent.isDisplayable() must be true");
if ( tmp_parent != null ) {
tmp_parent.addComponentListener(component_listener);
+ SwingUtilities.windowForComponent(parent).addComponentListener(component_listener);
}
DisplayMode mode = getEffectiveMode();
display_impl.createWindow(drawable, mode, tmp_parent, getWindowX(), getWindowY());
@@ -335,6 +343,7 @@
}
if ( parent != null ) {
parent.removeComponentListener(component_listener);
+ SwingUtilities.windowForComponent(parent).removeComponentListener(component_listener);
}
releaseDrawable();
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDisplay.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDisplay.java 2013-01-25 15:39:08 UTC (rev 3838)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDisplay.java 2013-01-29 21:02:52 UTC (rev 3839)
@@ -38,8 +38,9 @@
* @author elias_naur
*/
+import java.awt.*;
+import java.lang.reflect.Method;
import java.nio.*;
-import java.awt.Canvas;
import org.lwjgl.LWJGLException;
import org.lwjgl.LWJGLUtil;
@@ -49,6 +50,8 @@
import org.lwjgl.input.Mouse;
import org.lwjgl.opengles.EGL;
+import javax.swing.*;
+
final class WindowsDisplay implements DisplayImplementation {
private static final int GAMMA_LENGTH = 256;
@@ -150,9 +153,9 @@
private static final int WS_THICKFRAME = 0x00040000;
private static final int WS_MAXIMIZEBOX = 0x00010000;
-
+
private static final int HTCLIENT = 0x01;
-
+
private static final int MK_XBUTTON1 = 0x0020;
private static final int MK_XBUTTON2 = 0x0040;
private static final int XBUTTON1 = 0x0001;
@@ -199,6 +202,15 @@
private boolean trackingMouse;
private boolean mouseInside;
+ static {
+ try {
+ final Method windowProc = WindowsDisplay.class.getDeclaredMethod("handleMessage", long.class, int.class, long.class, long.class, long.class);
+ setWindowProc(windowProc);
+ } catch (NoSuchMethodException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
WindowsDisplay() {
current_display = this;
}
@@ -212,7 +224,7 @@
maximized = false;
this.parent = parent;
hasParent = parent != null;
- long parent_hwnd = parent != null ? getHwnd(parent) : 0;
+ long parent_hwnd = parent != null ? nGetParent(getHwnd(parent)) : 0;
this.hwnd = nCreateWindow(x, y, mode.getWidth(), mode.getHeight(), Display.isFullscreen() || isUndecorated(), parent != null, parent_hwnd);
this.resizable=false;
if (hwnd == 0) {
@@ -233,6 +245,8 @@
((DrawableGLES)drawable).initialize(hwnd, hdc, EGL.EGL_WINDOW_BIT, (org.lwjgl.opengles.PixelFormat)drawable.getPixelFormat());
}
peer_info.initDC(getHwnd(), getHdc());
+ if ( parent != null )
+ reshape(0, 0, mode.getWidth(), mode.getHeight());
showWindow(getHwnd(), SW_SHOWDEFAULT);
updateWidthAndHeight();
@@ -275,6 +289,8 @@
}
}
+ private static native long nGetParent(long hWnd);
+
public void destroyWindow() {
nReleaseDC(hwnd, hdc);
nDestroyWindow(hwnd);
@@ -496,9 +512,6 @@
public void update() {
nUpdate();
- if (parent != null && parent.isFocusOwner()) {
- setFocus(getHwnd());
- }
if (redoMakeContextCurrent) {
redoMakeContextCurrent = false;
/**
@@ -518,6 +531,15 @@
private static native void nUpdate();
public void reshape(int x, int y, int width, int height) {
+ if ( parent != null ) {
+ // Translate canvas location to screen coordinates
+ Point p = new Point();
+
+ SwingUtilities.convertPointToScreen(p, parent);
+
+ x += p.getX();
+ y += p.getY();
+ }
nReshape(getHwnd(), x, y, width, height, Display.isFullscreen() || isUndecorated(), parent != null);
}
private static native void nReshape(long hwnd, int x, int y, int width, int height, boolean undecorated, boolean child);
@@ -780,10 +802,6 @@
nReleaseCapture();
}
}
-
- if (parent != null && !isFocused) {
- setFocus(getHwnd());
- }
}
private boolean shouldGrab() {
@@ -833,14 +851,16 @@
private static native void clientToScreen(long hwnd, IntBuffer point);
- private static int handleMessage(long hwnd, int msg, long wParam, long lParam, long millis) {
+ private static native void setWindowProc(Method windowProc);
+
+ private static long handleMessage(long hwnd, int msg, long wParam, long lParam, long millis) {
if (current_display != null)
return current_display.doHandleMessage(hwnd, msg, wParam, lParam, millis);
else
return defWindowProc(hwnd, msg, wParam, lParam);
}
- private static native int defWindowProc(long hwnd, int msg, long wParam, long lParam);
+ private static native long defWindowProc(long hwnd, int msg, long wParam, long lParam);
private void checkCursorState() {
updateClipping();
@@ -863,7 +883,12 @@
checkCursorState();
}
- private int doHandleMessage(long hwnd, int msg, long wParam, long lParam, long millis) {
+ private long doHandleMessage(long hwnd, int msg, long wParam, long lParam, long millis) {
+ if ( hwnd != getHwnd() ) {
+ // Can happen at start-up
+ return defWindowProc(hwnd, msg, wParam, lParam);
+ }
+
switch (msg) {
// disable screen saver and monitor power down messages which wreak havoc
case WM_ACTIVATE:
@@ -876,7 +901,7 @@
appActivate(false);
break;
}
- return 0;
+ return 0L;
case WM_SIZE:
switch ((int)wParam) {
case SIZE_RESTORED:
@@ -908,13 +933,13 @@
} else {
// let Windows handle cursors outside the client area for resizing, etc.
return defWindowProc(hwnd, msg, wParam, lParam);
- }
+ }
case WM_KILLFOCUS:
appActivate(false);
- return 0;
+ return 0L;
case WM_SETFOCUS:
appActivate(true);
- return 0;
+ return 0L;
case WM_MOUSEMOVE:
int xPos = (int)(short)(lParam & 0xFFFF);
int yPos = transformY(getHwnd(), (int)(short)((lParam >> 16) & 0xFFFF));
@@ -924,29 +949,29 @@
if(!trackingMouse) {
trackingMouse = nTrackMouseEvent(hwnd);
}
- return 0;
+ return 0L;
case WM_MOUSEWHEEL:
int dwheel = (int)(short)((wParam >> 16) & 0xFFFF);
handleMouseScrolled(dwheel, millis);
- return 0;
+ return 0L;
case WM_LBUTTONDOWN:
handleMouseButton(0, 1, millis);
- return 0;
+ return 0L;
case WM_LBUTTONUP:
handleMouseButton(0, 0, millis);
- return 0;
+ return 0L;
case WM_RBUTTONDOWN:
handleMouseButton(1, 1, millis);
- return 0;
+ return 0L;
case WM_RBUTTONUP:
handleMouseButton(1, 0, millis);
- return 0;
+ return 0L;
case WM_MBUTTONDOWN:
handleMouseButton(2, 1, millis);
- return 0;
+ return 0L;
case WM_MBUTTONUP:
handleMouseButton(2, 0, millis);
- return 0;
+ return 0L;
case WM_XBUTTONUP:
if((wParam >> 16) == XBUTTON1) {
handleMouseButton(3, 0, millis);
@@ -964,7 +989,7 @@
case WM_SYSCHAR:
case WM_CHAR:
handleChar(wParam, lParam, millis);
- return 0;
+ return 0L;
case WM_SYSKEYUP:
/* Fall through */
case WM_KEYUP:
@@ -985,17 +1010,17 @@
return defWindowProc(hwnd, msg, wParam, lParam);
case WM_QUIT:
close_requested = true;
- return 0;
+ return 0L;
case WM_SYSCOMMAND:
switch ((int)(wParam & 0xfff0)) {
case SC_KEYMENU:
case SC_MOUSEMENU:
case SC_SCREENSAVE:
case SC_MONITORPOWER:
- return 0;
+ return 0L;
case SC_CLOSE:
close_requested = true;
- return 0;
+ return 0L;
default:
break;
}
@@ -1015,7 +1040,7 @@
handleMouseButton(captureMouse, 0, millis);
captureMouse = -1;
}
- return 0;
+ return 0L;
case WM_WINDOWPOSCHANGED:
if(getWindowRect(hwnd, rect_buffer)) {
rect.copyFromBuffer(rect_buffer);
@@ -1024,12 +1049,12 @@
} else {
LWJGLUtil.log("WM_WINDOWPOSCHANGED: Unable to get window rect");
}
- return defWindowProc(hwnd, msg, wParam, lParam);
+ return defWindowProc(hwnd, msg, wParam, lParam);
default:
return defWindowProc(hwnd, msg, wParam, lParam);
}
}
-
+
private native boolean getWindowRect(long hwnd, IntBuffer rectBuffer);
public int getX() {
@@ -1056,8 +1081,8 @@
public void setResizable(boolean resizable) {
if(this.resizable != resizable) {
- long style = getWindowLongPtr(hwnd, GWL_STYLE);
- long styleex = getWindowLongPtr(hwnd, GWL_EXSTYLE);
+ int style = (int)getWindowLongPtr(hwnd, GWL_STYLE);
+ int styleex = (int)getWindowLongPtr(hwnd, GWL_EXSTYLE);
// update frame style
if(resizable && !Display.isFullscreen()) {
@@ -1082,7 +1107,7 @@
this.resizable = resizable;
}
- private native boolean adjustWindowRectEx(IntBuffer rectBuffer, long style, boolean menu, long styleex);
+ private native boolean adjustWindowRectEx(IntBuffer rectBuffer, int style, boolean menu, int styleex);
public boolean wasResized() {
if(resized) {
Modified: trunk/LWJGL/src/java/org/lwjgl/util/generator/NativeMethodStubsGenerator.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/util/generator/NativeMethodStubsGenerator.java 2013-01-25 15:39:08 UTC (rev 3838)
+++ trunk/LWJGL/src/java/org/lwjgl/util/generator/NativeMethodStubsGenerator.java 2013-01-29 21:02:52 UTC (rev 3839)
@@ -324,7 +324,7 @@
// Declare loop counters and allocate object array
if ( !ptrLoopDeclared ) {
- writer.println("\tunsigned int " + n + "_i;");
+ writer.println("\tint " + n + "_i;");
writer.println("\tjobject " + n + "_object;");
ptrLoopDeclared = true;
}
@@ -336,7 +336,7 @@
// Declare loop counters and allocate string array
if ( !strLoopDeclared ) {
- writer.println("\tunsigned int " + n + "_i;");
+ writer.println("\tint " + n + "_i;");
writer.println("\t" + arrayType + n + "_address;");
strLoopDeclared = true;
}
Modified: trunk/LWJGL/src/native/common/common_tools.c
===================================================================
--- trunk/LWJGL/src/native/common/common_tools.c 2013-01-25 15:39:08 UTC (rev 3838)
+++ trunk/LWJGL/src/native/common/common_tools.c 2013-01-29 21:02:52 UTC (rev 3839)
@@ -227,11 +227,11 @@
const char *str = (const char *)ustr;
if (str == NULL)
return NULL;
- return NewStringNativeWithLength(env, str, strlen(str));
+ return NewStringNativeWithLength(env, str, (jsize)strlen(str));
}
// creates locale specific string
-jstring NewStringNativeWithLength(JNIEnv *env, const char *str, int length) {
+jstring NewStringNativeWithLength(JNIEnv *env, const char *str, jsize length) {
jclass jcls_str;
jmethodID jmethod_str;
jstring result;
@@ -330,7 +330,7 @@
}
bool getBooleanProperty(JNIEnv *env, const char* propertyName) {
- jstring property = NewStringNativeWithLength(env, propertyName, strlen(propertyName));
+ jstring property = NewStringNativeWithLength(env, propertyName, (jsize)strlen(propertyName));
jclass org_lwjgl_LWJGLUtil_class;
jmethodID getBoolean;
if (property == NULL)
Modified: trunk/LWJGL/src/native/common/common_tools.h
===================================================================
--- trunk/LWJGL/src/native/common/common_tools.h 2013-01-25 15:39:08 UTC (rev 3838)
+++ trunk/LWJGL/src/native/common/common_tools.h 2013-01-29 21:02:52 UTC (rev 3839)
@@ -75,18 +75,18 @@
return NULL;
}
-static inline jobject safeNewBuffer(JNIEnv *env, void *p, int size) {
+static inline jobject safeNewBuffer(JNIEnv *env, void *p, jlong capacity) {
if (p != NULL) {
#ifdef __cplusplus
- return env->NewDirectByteBuffer(p, size);
+ return env->NewDirectByteBuffer(p, capacity);
#else
- return (*env)->NewDirectByteBuffer(env, p, size);
+ return (*env)->NewDirectByteBuffer(env, p, capacity);
#endif
} else
return NULL;
}
-static inline jobject safeNewBufferCached(JNIEnv *env, void *p, int size, jobject old_buffer) {
+static inline jobject safeNewBufferCached(JNIEnv *env, void *p, jlong size, jobject old_buffer) {
if (old_buffer != NULL) {
void *old_buffer_address = (*env)->GetDirectBufferAddress(env, old_buffer);
jlong capacity = (*env)->GetDirectBufferCapacity(env, old_buffer);
@@ -141,7 +141,7 @@
extern void printfDebug(const char *format, ...);
extern bool getBooleanProperty(JNIEnv *env, const char* propertyName);
extern char * GetStringNativeChars(JNIEnv *env, jstring jstr);
-extern jstring NewStringNativeWithLength(JNIEnv *env, const char *str, int length);
+extern jstring NewStringNativeWithLength(JNIEnv *env, const char *str, jsize length);
extern jstring NewStringNativeUnsigned(JNIEnv *env, const unsigned char *str);
extern jobject NewReadOnlyDirectByteBuffer(JNIEnv* env, const void* address, jlong capacity);
extern jobject newJavaManagedByteBuffer(JNIEnv *env, const int size);
Modified: trunk/LWJGL/src/native/common/extcl.c
===================================================================
--- trunk/LWJGL/src/native/common/extcl.c 2013-01-25 15:39:08 UTC (rev 3838)
+++ trunk/LWJGL/src/native/common/extcl.c 2013-01-29 21:02:52 UTC (rev 3839)
@@ -59,7 +59,7 @@
ext_InitializeClass(env, clazz, &extcl_GetProcAddress, num_functions, functions);
}
-int extcl_CalculateImageSize(const size_t *region, size_t row_pitch, size_t slice_pitch) {
+size_t extcl_CalculateImageSize(const size_t *region, size_t row_pitch, size_t slice_pitch) {
if ( slice_pitch == 0 )
return region[1] * row_pitch;
else
Modified: trunk/LWJGL/src/native/common/extcl.h
===================================================================
--- trunk/LWJGL/src/native/common/extcl.h 2013-01-25 15:39:08 UTC (rev 3838)
+++ trunk/LWJGL/src/native/common/extcl.h 2013-01-29 21:02:52 UTC (rev 3839)
@@ -70,7 +70,7 @@
void* extcl_GetProcAddress(const char* function);
void extcl_InitializeClass(JNIEnv *env, jclass clazz, int num_functions, JavaMethodAndExtFunction *functions);
-int extcl_CalculateImageSize(const size_t *region, size_t row_pitch, size_t slice_pitch);
+size_t extcl_CalculateImageSize(const size_t *region, size_t row_pitch, size_t slice_pitch);
// -----------------[ Platform dependent functions ]-----------------
Modified: trunk/LWJGL/src/native/common/org_lwjgl_openal_ALC10.c
===================================================================
--- trunk/LWJGL/src/native/common/org_lwjgl_openal_ALC10.c 2013-01-25 15:39:08 UTC (rev 3838)
+++ trunk/LWJGL/src/native/common/org_lwjgl_openal_ALC10.c 2013-01-29 21:02:52 UTC (rev 3839)
@@ -83,7 +83,7 @@
*/
static jobject JNICALL Java_org_lwjgl_openal_ALC10_nalcGetString (JNIEnv *env, jclass clazz, jlong deviceaddress, jint token) {
char* alcString = (char*) alcGetString((ALCdevice*)((intptr_t)deviceaddress), (ALenum) token);
- int length;
+ size_t length;
int i=1;
if (alcString == NULL) {
Modified: trunk/LWJGL/src/native/common/org_lwjgl_opencl_CallbackUtil.c
===================================================================
--- trunk/LWJGL/src/native/common/org_lwjgl_opencl_CallbackUtil.c 2013-01-25 15:39:08 UTC (rev 3838)
+++ trunk/LWJGL/src/native/common/org_lwjgl_opencl_CallbackUtil.c 2013-01-29 21:02:52 UTC (rev 3839)
@@ -67,7 +67,7 @@
private_info_buffer = NewReadOnlyDirectByteBuffer(env, private_info, cb);
(*env)->CallVoidMethod(env, (jobject)user_data, contextCallbackJ,
- NewStringNativeWithLength(env, errinfo, strlen(errinfo)),
+ NewStringNativeWithLength(env, errinfo, (jsize)strlen(errinfo)),
private_info_buffer
);
}
Modified: trunk/LWJGL/src/native/windows/opengl/context.c
===================================================================
--- trunk/LWJGL/src/native/windows/opengl/context.c 2013-01-25 15:39:08 UTC (rev 3838)
+++ trunk/LWJGL/src/native/windows/opengl/context.c 2013-01-29 21:02:52 UTC (rev 3839)
@@ -118,7 +118,7 @@
windowflags = WS_POPUP;
} else if (child_window) {
exstyle = 0;
- windowflags = WS_CHILDWINDOW;
+ windowflags = WS_POPUP;
} else {
exstyle = WS_EX_APPWINDOW;
windowflags = WS_OVERLAPPED | WS_BORDER | WS_CAPTION | WS_MINIMIZEBOX | WS_SYSMENU;
Modified: trunk/LWJGL/src/native/windows/org_lwjgl_opengl_Display.c
===================================================================
--- trunk/LWJGL/src/native/windows/org_lwjgl_opengl_Display.c 2013-01-25 15:39:08 UTC (rev 3838)
+++ trunk/LWJGL/src/native/windows/org_lwjgl_opengl_Display.c 2013-01-29 21:02:52 UTC (rev 3839)
@@ -53,6 +53,9 @@
#define WINDOWCLASSNAME _T("LWJGL")
+static jclass windowsDisplayClass;
+static jmethodID javaWindowProc;
+
/*
* WindowProc for the GL window.
*/
@@ -61,10 +64,12 @@
WPARAM wParam,
LPARAM lParam)
{
+ /*
jclass display_class;
jclass display_class_global;
jmethodID handleMessage_method;
LONG message_time;
+ */
JNIEnv *env = getThreadEnv();
if (env != NULL && !(*env)->ExceptionOccurred(env)) {
/*
@@ -80,6 +85,8 @@
* a window is created, where we are sure that the calling class' classloader has
* LWJGL classes in it.
*/
+
+ /*
display_class_global = (jclass)(LONG_PTR)GetWindowLongPtr(hWnd, GWLP_USERDATA);
if (display_class_global == NULL) {
display_class = (*env)->FindClass(env, "org/lwjgl/opengl/WindowsDisplay");
@@ -91,15 +98,27 @@
}
if (display_class_global != NULL) {
message_time = GetMessageTime();
- handleMessage_method = (*env)->GetStaticMethodID(env, display_class_global, "handleMessage", "(JIJJJ)I");
+ handleMessage_method = (*env)->GetStaticMethodID(env, display_class_global, "handleMessage", "(JIJJJ)J");
if (handleMessage_method != NULL)
- return (*env)->CallStaticIntMethod(env, display_class_global, handleMessage_method, (jlong)(intptr_t)hWnd, (jint)msg, (jlong)wParam, (jlong)lParam, (jlong)message_time);
+ return (*env)->CallStaticLongMethod(env, display_class_global, handleMessage_method, (jlong)(intptr_t)hWnd, (jint)msg, (jlong)wParam, (jlong)lParam, (jlong)message_time);
+
}
+ */
+
+ return (*env)->CallStaticLongMethod(
+ env, windowsDisplayClass, javaWindowProc,
+ (jlong)(intptr_t)hWnd, (jint)msg, (jlong)wParam, (jlong)lParam, (jlong)GetMessageTime()
+ );
}
return DefWindowProc(hWnd, msg, wParam, lParam);
}
-JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_WindowsDisplay_defWindowProc(JNIEnv *env, jclass unused, jlong hWnd, jint msg, jlong wParam, jlong lParam) {
+JNIEXPORT void JNICALL Java_org_lwjgl_opengl_WindowsDisplay_setWindowProc(JNIEnv *env, jclass clazz, jobject method) {
+ windowsDisplayClass = clazz;
+ javaWindowProc = (*env)->FromReflectedMethod(env, method);
+}
+
+JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_WindowsDisplay_defWindowProc(JNIEnv *env, jclass unused, jlong hWnd, jint msg, jlong wParam, jlong lParam) {
return DefWindowProc((HWND)(INT_PTR)hWnd, msg, wParam, lParam);
}
@@ -167,6 +186,10 @@
return (INT_PTR)hwnd;
}
+JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_WindowsDisplay_nGetParent(JNIEnv *env, jclass clazz, jlong hwnd_ptr) {
+ return (INT_PTR)GetParent((HWND)(INT_PTR)hwnd_ptr);
+}
+
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_WindowsDisplay_nReleaseDC(JNIEnv *env, jclass clazz, jlong hwnd_ptr, jlong hdc_ptr) {
HWND hwnd = (HWND)(INT_PTR)hwnd_ptr;
HDC hdc = (HDC)(INT_PTR)hdc_ptr;
@@ -309,6 +332,7 @@
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_WindowsDisplay_nReshape(JNIEnv *env, jclass unused, jlong hwnd_ptr, jint x, jint y, jint width, jint height, jboolean undecorated, jboolean child) {
HWND hwnd = (HWND)(INT_PTR)hwnd_ptr;
+ /*
DWORD exstyle, windowflags;
RECT clientSize;
@@ -329,11 +353,11 @@
);
SetWindowPos(hwnd, HWND_TOP, x, y, clientSize.right - clientSize.left, clientSize.bottom - clientSize.top, SWP_NOZORDER);
+ */
+ SetWindowPos(hwnd, HWND_TOP, x, y, width, height, SWP_NOZORDER | SWP_NOACTIVATE);
}
static HICON createWindowIcon(JNIEnv *env, jint *pixels, jint width, jint height) {
- unsigned char col;
- unsigned char mask;
BITMAPV5HEADER bitmapInfo;
HBITMAP cursorMask;
HBITMAP colorBitmap;
@@ -345,8 +369,6 @@
int imageSize;
unsigned char *maskPixels;
int widthInBytes;
- int leftShift;
- int maskPixelsOff;
int scanlineWidth;
HBITMAP colorDIB;
@@ -475,7 +497,7 @@
}
JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_WindowsDisplay_adjustWindowRectEx
- (JNIEnv *env, jclass unused, jobject rect_buffer, jlong style, jboolean menu, jlong styleex) {
+ (JNIEnv *env, jclass unused, jobject rect_buffer, jint style, jboolean menu, jint styleex) {
jboolean result;
RECT clientRect;
copyBufferToRect(env, rect_buffer, &clientRect);
Modified: trunk/LWJGL/src/native/windows/org_lwjgl_opengl_WindowsRegistry.c
===================================================================
--- trunk/LWJGL/src/native/windows/org_lwjgl_opengl_WindowsRegistry.c 2013-01-25 15:39:08 UTC (rev 3838)
+++ trunk/LWJGL/src/native/windows/org_lwjgl_opengl_WindowsRegistry.c 2013-01-29 21:02:52 UTC (rev 3839)
@@ -93,7 +93,7 @@
return NULL;
}
result[buf_size - 1] = '\0';
- java_result = NewStringNativeWithLength(env, result, strlen(result));
+ java_result = NewStringNativeWithLength(env, result, (jsize)strlen(result));
free(result);
return java_result;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|