Java Code Examples for com.jogamp.opengl.GL4#isExtensionAvailable()
The following examples show how to use
com.jogamp.opengl.GL4#isExtensionAvailable() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Gl_500_primitive_shading_nv.java From jogl-samples with MIT License | 6 votes |
@Override protected boolean begin(GL gl) { GL4 gl4 = (GL4) gl; boolean validated = true; validated = validated && gl4.isExtensionAvailable("GL_NV_geometry_shader_passthrough"); if (validated) { validated = initQuery(gl4); } if (validated) { validated = initProgram(gl4); } if (validated) { validated = initBuffer(gl4); } if (validated) { validated = initVertexArray(gl4); } return validated; }
Example 2
Source File: Gl_500_shader_invocation_nv.java From jogl-samples with MIT License | 6 votes |
@Override protected boolean begin(GL gl) { GL4 gl4 = (GL4) gl; boolean validated = gl4.isExtensionAvailable("GL_NV_shader_thread_group"); if (validated) { validated = initBuffer(gl4); } if (validated) { validated = initProgram(gl4); } if (validated) { validated = initVertexArray(gl4); } return validated; }
Example 3
Source File: Gl_430_image_store.java From jogl-samples with MIT License | 6 votes |
@Override protected boolean begin(GL gl) { GL4 gl4 = (GL4) gl; boolean validated = true; validated = validated && gl4.isExtensionAvailable("GL_ARB_shader_image_size"); logImplementationDependentLimit(gl4, GL_MAX_TEXTURE_IMAGE_UNITS, "GL_MAX_TEXTURE_IMAGE_UNITS"); if (validated) { validated = initTexture(gl4); } if (validated) { validated = initProgram(gl4); } if (validated) { validated = initVertexArray(gl4); } return validated; }
Example 4
Source File: Gl_500_fbo_multisample_position_amd.java From jogl-samples with MIT License | 6 votes |
@Override protected boolean begin(GL gl) { GL4 gl4 = (GL4) gl; boolean validated = true; validated = validated && gl4.isExtensionAvailable("GL_AMD_sample_positions"); // if(validated) // validated = initProgram(); // if(validated) // validated = initBuffer(); // if(validated) // validated = initVertexArray(); // if(validated) // validated = initTexture(); // if(validated) // validated = initFramebuffer(); // if(validated) // validated = initSampler(); return validated; }
Example 5
Source File: Gl_450_culling.java From jogl-samples with MIT License | 6 votes |
@Override protected boolean begin(GL gl) { GL4 gl4 = (GL4) gl; boolean validated = gl4.isExtensionAvailable("GL_ARB_cull_distance"); if (validated) { validated = initTexture(gl4); } if (validated) { validated = initProgram(gl4); } if (validated) { validated = initBuffer(gl4); } if (validated) { validated = initVertexArray(gl4); } return validated; }
Example 6
Source File: Gl_500_blend_op_amd.java From jogl-samples with MIT License | 6 votes |
@Override protected boolean begin(GL gl) { GL4 gl4 = (GL4) gl; // Viewport[texture::RGB8] = glm::ivec4(0, 0, WindowSize >> 1); // Viewport[texture::R] = glm::ivec4(WindowSize.x >> 1, 0, WindowSize >> 1); // Viewport[texture::G] = glm::ivec4(WindowSize.x >> 1, WindowSize.y >> 1, WindowSize >> 1); // Viewport[texture::B] = glm::ivec4(0, WindowSize.y >> 1, WindowSize >> 1); boolean validated = true; validated = validated && gl4.isExtensionAvailable("GL_AMD_blend_minmax_factor"); // if(validated) // validated = initBlend(); // if(validated) // validated = initProgram(); // if(validated) // validated = initBuffer(); // if(validated) // validated = initVertexArray(); // if(validated) // validated = initTexture(); // if(validated) // validated = initFramebuffer(); return validated && checkError(gl4, "begin"); }
Example 7
Source File: Gl_500_fbo_layered_amd.java From jogl-samples with MIT License | 6 votes |
@Override protected boolean begin(GL gl) { GL4 gl4 = (GL4) gl; boolean validated = true; validated = validated && gl4.isExtensionAvailable("GL_AMD_vertex_shader_viewport_index"); validated = validated && gl4.isExtensionAvailable("GL_AMD_vertex_shader_layer"); // if(validated) // validated = initProgram(); // if(validated) // validated = initBuffer(); // if(validated) // validated = initVertexArray(); // if(validated) // validated = initTexture(); // if(validated) // validated = initFramebuffer(); // if(validated) // validated = initSampler(); return validated; }
Example 8
Source File: Gl_430_texture_copy.java From jogl-samples with MIT License | 6 votes |
@Override protected boolean begin(GL gl) { GL4 gl4 = (GL4) gl; boolean validated = true; validated = validated && gl4.isExtensionAvailable("GL_ARB_copy_image"); if (validated) { validated = initTexture(gl4); } if (validated) { validated = initProgram(gl4); } if (validated) { validated = initBuffer(gl4); } if (validated) { validated = initVertexArray(gl4); } return validated; }
Example 9
Source File: Gl_500_fbo_layered_nv.java From jogl-samples with MIT License | 6 votes |
@Override protected boolean begin(GL gl) { GL4 gl4 = (GL4) gl; boolean validated = true; validated = validated && gl4.isExtensionAvailable("GL_NV_viewport_array2"); // if(validated) // validated = initProgram(); // if(validated) // validated = initBuffer(); // if(validated) // validated = initVertexArray(); // if(validated) // validated = initTexture(); // if(validated) // validated = initFramebuffer(); // if(validated) // validated = initSampler(); return validated; }
Example 10
Source File: Gl_500_texture_bindless_arb.java From jogl-samples with MIT License | 5 votes |
@Override protected boolean begin(GL gl) { GL4 gl4 = (GL4) gl; boolean validated = gl4.isExtensionAvailable("GL_ARB_bindless_texture"); // this->sync(test::ASYNC); if (validated) { validated = initProgram(gl4); } if (validated) { validated = initTexture(gl4); } if (validated) { validated = initBuffer(gl4); } if (validated) { validated = initVertexArray(gl4); } if (validated) { gl4.glViewportIndexedf(0, 0, 0, windowSize.x, windowSize.y); gl4.glBindProgramPipeline(pipelineName.get(0)); gl4.glBindBufferBase(GL_UNIFORM_BUFFER, Semantic.Uniform.TRANSFORM0, bufferName.get(Buffer.TRANSFORM)); gl4.glBindBufferBase(GL_UNIFORM_BUFFER, Semantic.Uniform.MATERIAL, bufferName.get(Buffer.MATERIAL)); gl4.glBindBufferBase(GL_SHADER_STORAGE_BUFFER, Semantic.Storage.VERTEX, bufferName.get(Buffer.VERTEX)); gl4.glBindBuffer(GL_DRAW_INDIRECT_BUFFER, bufferName.get(Buffer.INDIRECT)); gl4.glBindVertexArray(vertexArrayName.get(0)); } return validated; }
Example 11
Source File: Gl_440_query_occlusion.java From jogl-samples with MIT License | 5 votes |
@Override protected boolean begin(GL gl) { GL4 gl4 = (GL4) gl; boolean validated = true; validated = validated && gl4.isExtensionAvailable("GL_ARB_query_buffer_object"); int[] queryCounter = {0}; gl4.glGetQueryiv(GL_ANY_SAMPLES_PASSED_CONSERVATIVE, GL_QUERY_COUNTER_BITS, queryCounter, 0); assert (queryCounter[0] > 0); viewports = new Vec4[4]; viewports[0] = new Vec4(windowSize.x * -0.5f, windowSize.y * -0.5f, windowSize.x * 0.5f, windowSize.y * 0.5f); viewports[1] = new Vec4(0, 0, windowSize.x * 0.5f, windowSize.y * 0.5f); viewports[2] = new Vec4(windowSize.x * 0.5f, windowSize.y * 0.5f, windowSize.x * 0.5f, windowSize.y * 0.5f); viewports[3] = new Vec4(windowSize.x * 1.0f, windowSize.y * 1.0f, windowSize.x * 0.5f, windowSize.y * 0.5f); if (validated) { validated = initProgram(gl4); } if (validated) { validated = initBuffer(gl4); } if (validated) { validated = initVertexArray(gl4); } if (validated) { validated = initQuery(gl4); } return validated && checkError(gl4, "begin"); }
Example 12
Source File: Gl_500_texture_cube_arb.java From jogl-samples with MIT License | 5 votes |
@Override protected boolean begin(GL gl) { GL4 gl4 = (GL4) gl; boolean validated = gl4.isExtensionAvailable("GL_ARB_seamless_cubemap_per_texture"); validated = validated && gl4.isExtensionAvailable("GL_ARB_shader_storage_buffer_object"); validated = validated && gl4.isExtensionAvailable("GL_ARB_buffer_storage"); validated = validated && gl4.isExtensionAvailable("GL_ARB_multi_bind"); if (validated) { validated = initProgram(gl4); } if (validated) { validated = initBuffer(gl4); } if (validated) { validated = initVertexArray(gl4); } if (validated) { validated = initTexture(gl4); } if (validated) { validated = initSampler(gl4); } gl4.glBindBuffer(GL_UNIFORM_BUFFER, bufferName.get(Buffer.TRANSFORM)); transformPointer = gl4.glMapBufferRange(GL_UNIFORM_BUFFER, 0, Transform.SIZE, GL_MAP_WRITE_BIT | GL_MAP_PERSISTENT_BIT | GL_MAP_COHERENT_BIT | GL_MAP_INVALIDATE_BUFFER_BIT); return validated; }
Example 13
Source File: Gl_430_multi_draw_indirect.java From jogl-samples with MIT License | 5 votes |
@Override protected boolean begin(GL gl) { GL4 gl4 = (GL4) gl; boolean validated = gl4.isExtensionAvailable("GL_ARB_multi_draw_indirect"); if (validated) { validated = initProgram(gl4); } if (validated) { validated = initBuffer(gl4); } if (validated) { validated = initVertexArray(gl4); } if (validated) { validated = initTexture(gl4); } viewport[0] = new Vec4i((int) (windowSize.x / 3.0f * 0.0f), 0, windowSize.x / 3, windowSize.y); viewport[1] = new Vec4i((int) (windowSize.x / 3.0f * 1.0f), 0, windowSize.x / 3, windowSize.y); viewport[2] = new Vec4i((int) (windowSize.x / 3.0f * 2.0f), 0, windowSize.x / 3, windowSize.y); gl4.glEnable(GL_DEPTH_TEST); gl4.glProvokingVertex(GL_FIRST_VERTEX_CONVENTION); return validated; }
Example 14
Source File: Gl_430_debug.java From jogl-samples with MIT License | 5 votes |
@Override protected boolean begin(GL gl) { GL4 gl4 = (GL4) gl; boolean validated = true; if (validated && gl4.isExtensionAvailable("GL_KHR_debug")) { validated = initDebug(gl4); } if (validated) { validated = initProgram(gl4); } if (validated) { validated = initBuffer(gl4); } if (validated) { validated = initVertexArray(gl4); } if (validated) { validated = initTexture(gl4); } gl4.glDebugMessageInsert( GL_DEBUG_SOURCE_APPLICATION, GL_DEBUG_TYPE_MARKER, 1, GL_DEBUG_SEVERITY_NOTIFICATION, -1, "End initialization"); return validated; }
Example 15
Source File: Gl_500_multi_draw_indirect_arb.java From jogl-samples with MIT License | 5 votes |
@Override protected boolean begin(GL gl) { GL4 gl4 = (GL4) gl; boolean validated = true; validated = validated && gl4.isExtensionAvailable("GL_ARB_indirect_parameters"); if (validated) { validated = initProgram(gl4); } if (validated) { validated = initBuffer(gl4); } if (validated) { validated = initVertexArray(gl4); } if (validated) { validated = initTexture(gl4); } Caps caps = new Caps(gl4, Profile.CORE); viewport[0] = new Vec4(windowSize.x / 3.0f * 0.0f, 0, windowSize.x / 3, windowSize.y); viewport[1] = new Vec4(windowSize.x / 3.0f * 1.0f, 0, windowSize.x / 3, windowSize.y); viewport[2] = new Vec4(windowSize.x / 3.0f * 2.0f, 0, windowSize.x / 3, windowSize.y); gl4.glEnable(GL_DEPTH_TEST); gl4.glProvokingVertex(GL_FIRST_VERTEX_CONVENTION); return validated; }
Example 16
Source File: Gl_450_transform_feedback_arb.java From jogl-samples with MIT License | 5 votes |
@Override protected boolean begin(GL gl) { GL4 gl4 = (GL4) gl; boolean validated = gl4.isExtensionAvailable("GL_ARB_transform_feedback_overflow_query"); if (validated) { validated = initQuery(gl4); } if (validated) { validated = initProgram(gl4); } if (validated) { validated = initBuffer(gl4); } if (validated) { validated = initVertexArray(gl4); } if (validated) { validated = initFeedback(gl4); } gl4.glBindBuffer(GL_UNIFORM_BUFFER, bufferName.get(Buffer.TRANSFORM)); uniformPointer = gl4.glMapBufferRange(GL_UNIFORM_BUFFER, 0, Mat4.SIZE, GL_MAP_WRITE_BIT | GL_MAP_PERSISTENT_BIT | GL_MAP_COHERENT_BIT | GL_MAP_INVALIDATE_BUFFER_BIT); return validated; }
Example 17
Source File: Gl_430_program_compute.java From jogl-samples with MIT License | 4 votes |
@Override protected boolean begin(GL gl) { GL4 gl4 = (GL4) gl; boolean validated = true; validated = validated && gl4.isExtensionAvailable("GL_ARB_compute_shader"); logImplementationDependentLimit(gl4, GL_MAX_COMPUTE_UNIFORM_BLOCKS, "GL_MAX_COMPUTE_UNIFORM_BLOCKS"); logImplementationDependentLimit(gl4, GL_MAX_COMPUTE_TEXTURE_IMAGE_UNITS, "GL_MAX_COMPUTE_TEXTURE_IMAGE_UNITS"); logImplementationDependentLimit(gl4, GL_MAX_COMPUTE_IMAGE_UNIFORMS, "GL_MAX_COMPUTE_IMAGE_UNIFORMS"); logImplementationDependentLimit(gl4, GL_MAX_COMPUTE_SHARED_MEMORY_SIZE, "GL_MAX_COMPUTE_SHARED_MEMORY_SIZE"); logImplementationDependentLimit(gl4, GL_MAX_COMPUTE_UNIFORM_COMPONENTS, "GL_MAX_COMPUTE_UNIFORM_COMPONENTS"); logImplementationDependentLimit(gl4, GL_MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS, "GL_MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS"); logImplementationDependentLimit(gl4, GL_MAX_COMPUTE_ATOMIC_COUNTERS, "GL_MAX_COMPUTE_ATOMIC_COUNTERS"); logImplementationDependentLimit(gl4, GL_MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS, "GL_MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS"); logImplementationDependentLimit(gl4, GL_MAX_COMPUTE_WORK_GROUP_INVOCATIONS, "GL_MAX_COMPUTE_WORK_GROUP_INVOCATIONS"); //this->logImplementationDependentLimit(GL_MAX_COMPUTE_WORK_GROUP_COUNT, "GL_MAX_COMPUTE_WORK_GROUP_COUNT"); //this->logImplementationDependentLimit(GL_MAX_COMPUTE_WORK_GROUP_SIZE, "GL_MAX_COMPUTE_WORK_GROUP_SIZE"); if (validated) { validated = initProgram(gl4); } if (validated) { validated = initBuffer(gl4); } if (validated) { validated = initVertexArray(gl4); } if (validated) { validated = initTexture(gl4); } return validated; }
Example 18
Source File: Gl_500_shader_blend_intel.java From jogl-samples with MIT License | 4 votes |
@Override protected boolean begin(GL gl) { GL4 gl4 = (GL4) gl; boolean validated = gl4.isExtensionAvailable("GL_INTEL_fragment_shader_ordering"); /* glm::vec2 const WindowSize(this->getWindowSize()); glm::vec2 const WindowRange = WindowSize * 3.f; this->Viewports.resize(1000); for (std::size_t i = 0; i < this->Viewports.size(); ++i) { glm::vec2 const ViewportPos(i % 17u, i % 13u); glm::vec2 const ViewportSize(i % 11u); this->Viewports[i] = glm::vec4(ViewportPos / glm::vec2(17, 13) * WindowRange - WindowSize, ViewportSize / glm::vec2(11)); } */ // glm::vec2 WindowSize(this->getWindowSize()); // this->Viewports.resize(1000); // for (std::size_t i = 0; i < this->Viewports.size(); ++i) // { // this->Viewports[i] = glm::vec4( // glm::linearRand(-WindowSize.x, WindowSize.x * 2.0f), // glm::linearRand(-WindowSize.y, WindowSize.y * 2.0f), // WindowSize * glm::linearRand(0.0f, 1.0f)); // } // // if(Validated) // Validated = initProgram(); // if(Validated) // Validated = initBuffer(); // if(Validated) // Validated = initVertexArray(); // if(Validated) // Validated = initTexture(); // if(Validated) // Validated = initFramebuffer(); return validated; }
Example 19
Source File: Gl_450_texture_barrier.java From jogl-samples with MIT License | 4 votes |
@Override protected boolean begin(GL gl) { GL4 gl4 = (GL4) gl; boolean validated = gl4.isExtensionAvailable("GL_ARB_texture_barrier"); Vec2 windowSizeF = new Vec2(windowSize); Vec2 windowRange = new Vec2(windowSize.mul_(3f)); viewports = new Vec4[1000]; for (int i = 0; i < viewports.length; ++i) { Vec2 viewportPos = new Vec2(i % 17, i % 13); Vec2 viewportSize = new Vec2(i % 11); viewports[i] = new Vec4(viewportPos.div(new Vec2(17, 13)).mul(windowRange).sub(windowSizeF), windowSizeF.mul_(viewportSize).div(new Vec2(11))); } /* glm::vec2 WindowSize(this->getWindowSize()); this->Viewports.resize(1000); for (std::size_t i = 0; i < this->Viewports.size(); ++i) { this->Viewports[i] = glm::vec4( glm::linearRand(-WindowSize.x, WindowSize.x * 2.0f), glm::linearRand(-WindowSize.y, WindowSize.y * 2.0f), WindowSize * glm::linearRand(0.0f, 1.0f)); } */ Caps caps = new Caps(gl4, Profile.CORE); if (validated) { validated = initProgram(gl4); } if (validated) { validated = initBuffer(gl4); } if (validated) { validated = initVertexArray(gl4); } if (validated) { validated = initTexture(gl4); } if (validated) { validated = initFramebuffer(gl4); } return validated; }
Example 20
Source File: Gl_440_sampler_wrap.java From jogl-samples with MIT License | 4 votes |
@Override protected boolean begin(GL gl) { GL4 gl4 = (GL4) gl; Vec2 viewportSize = new Vec2(windowSize.x * 0.33f, windowSize.y * 0.50f); viewport[Viewport._0] = new Vec4(viewportSize.x * 0.0f, viewportSize.y * 0.0f, viewportSize.x * 1.0f, viewportSize.y * 1.0f); viewport[Viewport._1] = new Vec4(viewportSize.x * 1.0f, viewportSize.y * 0.0f, viewportSize.x * 1.0f, viewportSize.y * 1.0f); viewport[Viewport._2] = new Vec4(viewportSize.x * 2.0f, viewportSize.y * 0.0f, viewportSize.x * 1.0f, viewportSize.y * 1.0f); viewport[Viewport._3] = new Vec4(viewportSize.x * 0.0f, viewportSize.y * 1.0f, viewportSize.x * 1.0f, viewportSize.y * 1.0f); viewport[Viewport._4] = new Vec4(viewportSize.x * 1.0f, viewportSize.y * 1.0f, viewportSize.x * 1.0f, viewportSize.y * 1.0f); viewport[Viewport._5] = new Vec4(viewportSize.x * 2.0f, viewportSize.y * 1.0f, viewportSize.x * 1.0f, viewportSize.y * 1.0f); boolean validated = true; validated = validated && gl4.isExtensionAvailable("GL_ARB_texture_mirror_clamp_to_edge"); if (validated) { validated = initProgram(gl4); } if (validated) { validated = initBuffer(gl4); } if (validated) { validated = initTexture(gl4); } if (validated) { validated = initSampler(gl4); } if (validated) { validated = initVertexArray(gl4); } if (validated) { gl4.glBindBuffer(GL_UNIFORM_BUFFER, bufferName.get(Buffer.TRANSFORM)); uniformPointer = gl4.glMapBufferRange(GL_UNIFORM_BUFFER, 0, Mat4.SIZE, GL_MAP_WRITE_BIT | GL_MAP_INVALIDATE_BUFFER_BIT | GL_MAP_PERSISTENT_BIT | GL_MAP_COHERENT_BIT); } return validated; }