List of usage examples for org.lwjgl.opengl GL11 GL_VENDOR
int GL_VENDOR
To view the source code for org.lwjgl.opengl GL11 GL_VENDOR.
Click Source Link
From source file:a1.Main.java
License:Open Source License
public boolean initialize() { GameState = 0;// w w w.ja v a 2 s . c om Keyboard.enableRepeatEvents(true); input = new Input(GUI.getInstance()); Dialog.Init(); if (!initDisplay()) return false; last_fps_tick = last_tick = System.currentTimeMillis(); fps_counter = 0; FPS = 0; Render2D.LoadSystemFont(); SetIcon(); Log.info("adapter: " + Display.getAdapter()); Log.info("version: " + Display.getVersion()); Log.info("gl vendor: " + GL11.glGetString(GL11.GL_VENDOR)); if (GLContext.getCapabilities().GL_ARB_vertex_buffer_object) Log.info("gl: GL_ARB_vertex_buffer_object supported!"); else Log.info("gl: GL_ARB_vertex_buffer_object NOT supported!"); initGL(); setView(Config.getScreenWidth(), Config.getScreenHeight()); ResSources.Init(); skin = new Skin_MyGUI(); skin.Init(); return true; }
From source file:com.ardor3d.renderer.lwjgl.LwjglContextCapabilities.java
License:Open Source License
public LwjglContextCapabilities(final org.lwjgl.opengl.ContextCapabilities caps) { final IntBuffer buf = BufferUtils.createIntBuffer(16); _supportsVBO = caps.GL_ARB_vertex_buffer_object; _supportsGL1_2 = caps.OpenGL12;//from w w w . j av a 2 s .co m _supportsMultisample = caps.GL_ARB_multisample; _supportsDoubleCoefficientsInClipPlaneEquation = true; _supportsConstantColor = _supportsEq = caps.GL_ARB_imaging; _supportsSeparateFunc = caps.GL_EXT_blend_func_separate; _supportsSeparateEq = caps.GL_EXT_blend_equation_separate; _supportsMinMax = caps.GL_EXT_blend_minmax; _supportsSubtract = caps.GL_EXT_blend_subtract; _supportsFogCoords = caps.GL_EXT_fog_coord; _supportsFragmentProgram = caps.GL_ARB_fragment_program; _supportsVertexProgram = caps.GL_ARB_vertex_program; _supportsPointSprites = caps.GL_ARB_point_sprite; _supportsPointParameters = caps.GL_ARB_point_parameters; _supportsTextureLodBias = caps.GL_EXT_texture_lod_bias; if (_supportsTextureLodBias) { GL11.glGetInteger(EXTTextureLODBias.GL_MAX_TEXTURE_LOD_BIAS_EXT, buf); _maxTextureLodBias = buf.get(0); } else { _maxTextureLodBias = 0f; } GL11.glGetInteger(GL11.GL_MAX_CLIP_PLANES, buf); _maxUserClipPlanes = buf.get(0); _glslSupported = caps.GL_ARB_shader_objects && caps.GL_ARB_fragment_shader && caps.GL_ARB_vertex_shader && caps.GL_ARB_shading_language_100; _geometryShader4Supported = caps.GL_ARB_geometry_shader4 && _glslSupported; _geometryInstancingSupported = caps.GL_EXT_draw_instanced || caps.OpenGL31; if (_glslSupported) { GL11.glGetInteger(ARBVertexShader.GL_MAX_VERTEX_ATTRIBS_ARB, buf); _maxGLSLVertexAttribs = buf.get(0); } // Pbuffer _pbufferSupported = caps.GL_ARB_pixel_buffer_object; // FBO _fboSupported = caps.GL_EXT_framebuffer_object; if (_fboSupported) { _supportsFBOMultisample = caps.GL_EXT_framebuffer_multisample; _supportsFBOBlit = caps.GL_EXT_framebuffer_blit; if (caps.GL_ARB_draw_buffers) { GL11.glGetInteger(EXTFramebufferObject.GL_MAX_COLOR_ATTACHMENTS_EXT, buf); _maxFBOColorAttachments = buf.get(0); } else { _maxFBOColorAttachments = 1; } // Max multisample samples. if (caps.GL_EXT_framebuffer_multisample && caps.GL_EXT_framebuffer_blit) { GL11.glGetInteger(EXTFramebufferMultisample.GL_MAX_SAMPLES_EXT, buf); _maxFBOSamples = buf.get(0); } else { _maxFBOSamples = 0; } } else { _maxFBOColorAttachments = 0; } _twoSidedStencilSupport = caps.GL_EXT_stencil_two_side; _stencilWrapSupport = caps.GL_EXT_stencil_wrap; // number of available auxiliary draw buffers GL11.glGetInteger(GL11.GL_AUX_BUFFERS, buf); _numAuxDrawBuffers = buf.get(0); // max texture size. GL11.glGetInteger(GL11.GL_MAX_TEXTURE_SIZE, buf); _maxTextureSize = buf.get(0); // Check for support of multitextures. _supportsMultiTexture = caps.GL_ARB_multitexture; // Support for texture formats _supportsFloatTextures = caps.GL_ARB_texture_float; _supportsIntegerTextures = caps.GL_EXT_texture_integer; _supportsOneTwoComponentTextures = caps.GL_ARB_texture_rg; // Check for support of fixed function dot3 environment settings _supportsEnvDot3 = caps.GL_ARB_texture_env_dot3; // Check for support of fixed function dot3 environment settings _supportsEnvCombine = caps.GL_ARB_texture_env_combine; // Check for support of automatic mipmap generation _automaticMipMaps = caps.GL_SGIS_generate_mipmap; _supportsDepthTexture = caps.GL_ARB_depth_texture; _supportsShadow = caps.GL_ARB_shadow; // If we do support multitexturing, find out how many textures we // can handle. if (_supportsMultiTexture) { GL11.glGetInteger(ARBMultitexture.GL_MAX_TEXTURE_UNITS_ARB, buf); _numFixedTexUnits = buf.get(0); } else { _numFixedTexUnits = 1; } // Go on to check number of texture units supported for vertex and // fragment shaders if (caps.GL_ARB_shader_objects && caps.GL_ARB_vertex_shader && caps.GL_ARB_fragment_shader) { GL11.glGetInteger(ARBVertexShader.GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB, buf); _numVertexTexUnits = buf.get(0); GL11.glGetInteger(ARBFragmentShader.GL_MAX_TEXTURE_IMAGE_UNITS_ARB, buf); _numFragmentTexUnits = buf.get(0); GL11.glGetInteger(ARBFragmentShader.GL_MAX_TEXTURE_COORDS_ARB, buf); _numFragmentTexCoordUnits = buf.get(0); } else { // based on nvidia dev doc: // http://developer.nvidia.com/object/General_FAQ.html#t6 // "For GPUs that do not support GL_ARB_fragment_program and // GL_NV_fragment_program, those two limits are set equal to // GL_MAX_TEXTURE_UNITS." _numFragmentTexCoordUnits = _numFixedTexUnits; _numFragmentTexUnits = _numFixedTexUnits; // We'll set this to 0 for now since we do not know: _numVertexTexUnits = 0; } // ARBShaderObjects.GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB // caps.GL_EXT_bindable_uniform // EXTBindableUniform.GL_MAX_BINDABLE_UNIFORM_SIZE_EXT; // Now determine the maximum number of supported texture units _numTotalTexUnits = Math.max(_numFragmentTexCoordUnits, Math.max(_numFixedTexUnits, Math.max(_numFragmentTexUnits, _numVertexTexUnits))); // Check for S3 texture compression capability. _supportsS3TCCompression = caps.GL_EXT_texture_compression_s3tc; // Check for LA texture compression capability. _supportsLATCCompression = caps.GL_EXT_texture_compression_latc; // Check for generic texture compression capability. _supportsGenericCompression = caps.GL_ARB_texture_compression; // Check for 3D texture capability. _supportsTexture3D = caps.OpenGL12; // Check for cubemap capability. _supportsTextureCubeMap = caps.GL_ARB_texture_cube_map; // See if we support anisotropic filtering _supportsAniso = caps.GL_EXT_texture_filter_anisotropic; if (_supportsAniso) { // Due to LWJGL buffer check, you can't use smaller sized // buffers (min_size = 16 for glGetFloat()). final FloatBuffer max_a = BufferUtils.createFloatBuffer(16); max_a.rewind(); // Grab the maximum anisotropic filter. GL11.glGetFloat(EXTTextureFilterAnisotropic.GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, max_a); // set max. _maxAnisotropic = max_a.get(0); } // See if we support textures that are not power of 2 in size. _supportsNonPowerTwo = caps.GL_ARB_texture_non_power_of_two; // See if we support textures that do not have width == height. _supportsRectangular = caps.GL_ARB_texture_rectangle; _supportsMirroredRepeat = caps.GL_ARB_texture_mirrored_repeat; _supportsMirrorClamp = _supportsMirrorEdgeClamp = _supportsMirrorBorderClamp = caps.GL_EXT_texture_mirror_clamp; _supportsBorderClamp = caps.GL_ARB_texture_border_clamp; _supportsEdgeClamp = _supportsGL1_2; try { _displayVendor = GL11.glGetString(GL11.GL_VENDOR); } catch (final Exception e) { _displayVendor = "Unable to retrieve vendor."; } try { _displayRenderer = GL11.glGetString(GL11.GL_RENDERER); } catch (final Exception e) { _displayRenderer = "Unable to retrieve adapter details."; } try { _displayVersion = GL11.glGetString(GL11.GL_VERSION); } catch (final Exception e) { _displayVersion = "Unable to retrieve API version."; } try { _shadingLanguageVersion = GL11.glGetString(GL20.GL_SHADING_LANGUAGE_VERSION); } catch (final Exception e) { _shadingLanguageVersion = "Unable to retrieve shading language version."; } }
From source file:com.badlogic.gdx.backends.lwjgl.LwjglGraphics.java
License:Apache License
private String glInfo() { try {//w ww.ja v a 2 s .co m return GL11.glGetString(GL11.GL_VENDOR) + "\n" // + GL11.glGetString(GL11.GL_RENDERER) + "\n" // + GL11.glGetString(GL11.GL_VERSION); } catch (Throwable ignored) { } return ""; }
From source file:com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.java
License:Apache License
private static String glInfo() { try {/*from ww w . j a va2 s.c o m*/ return GL11.glGetString(GL11.GL_VENDOR) + "\n" // + GL11.glGetString(GL11.GL_RENDERER) + "\n" // + GL11.glGetString(GL11.GL_VERSION); } catch (Throwable ignored) { } return ""; }
From source file:com.badlogic.gdx.backends.lwjgl3.Lwjgl3Graphics.java
License:Apache License
private void initiateGL() { String versionString = gl20.glGetString(GL11.GL_VERSION); String vendorString = gl20.glGetString(GL11.GL_VENDOR); String rendererString = gl20.glGetString(GL11.GL_RENDERER); glVersion = new GLVersion(Application.ApplicationType.Desktop, versionString, vendorString, rendererString); }
From source file:com.xrbpowered.gl.Client.java
License:Open Source License
public static void printInfo() { System.out.println("\n--------------------------------\nSYSTEM INFO\n--------------------------------"); System.out.println("Device: " + GL11.glGetString(GL11.GL_RENDERER)); System.out.println("Device vendor: " + GL11.glGetString(GL11.GL_VENDOR)); System.out.println("OpenGL version: " + GL11.glGetString(GL11.GL_VERSION)); System.out.printf("Max texture size: %d\n", GL11.glGetInteger(GL11.GL_MAX_TEXTURE_SIZE)); System.out.printf("Max MSAA samples: %d\n", GL11.glGetInteger(GL30.GL_MAX_SAMPLES)); System.out.printf("Max anisotropy: %d\n", GL11.glGetInteger(EXTTextureFilterAnisotropic.GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT)); System.out.printf("Max texture array layers: %d\n", GL11.glGetInteger(GL30.GL_MAX_ARRAY_TEXTURE_LAYERS)); System.out.printf("Max vertex attribs: %d\n", GL11.glGetInteger(GL20.GL_MAX_VERTEX_ATTRIBS)); System.out.printf("Max uniform components: %d\n", GL11.glGetInteger(GL20.GL_MAX_VERTEX_UNIFORM_COMPONENTS)); System.out.printf("Available video memory (NVIDIA only): %.1f%%\n", getAvailMemoryNVidia() * 100f); System.out.println("--------------------------------"); System.out.println();// ww w. jav a 2s. c om GL11.glGetError(); // clear errors }
From source file:edu.pitt.atl23.LWJGLWindow.java
private void printInfo() { System.out.println();//w ww .jav a 2s.c o m System.out.println("-----------------------------------------------------------"); System.out.format("%-18s%s\n", "Running:", getClass().getName()); System.out.println("GL_VENDOR: " + glGetString(GL11.GL_VENDOR)); System.out.println("GL_RENDERER: " + glGetString(GL11.GL_RENDERER)); System.out.println("GL_VERSION: " + glGetString(GL11.GL_VERSION)); System.out.println("GL_SHADING_LANGUAGE: " + GL11.glGetString(GL20.GL_SHADING_LANGUAGE_VERSION)); }
From source file:io.flob.blackheart.Core.java
License:Open Source License
private void tick() { if (Debug.info) { _display.mode_2D();/* w w w. ja v a 2 s. c o m*/ int right_offset = 180; int KB = 1024; _font.debug.render(4, 5, About.title + " " + About.version); _font.debug.render(4, 25, "OS_NAME: " + System.getProperty("os.name")); _font.debug.render(4, 35, "OS_ARCH: " + System.getProperty("os.arch")); _font.debug.render(4, 45, "OS_VERSION: " + System.getProperty("os.version")); _font.debug.render(4, 55, "LWJGL_VERSION: " + Sys.getVersion() + " (" + org.lwjgl.LWJGLUtil.getPlatformName() + ")"); _font.debug.render(4, 65, "JRE_VENDOR: " + System.getProperty("java.vendor")); _font.debug.render(4, 75, "JRE_VERSION: " + System.getProperty("java.version")); _font.debug.render(4, 85, "GL_VENDOR: " + GL11.glGetString(GL11.GL_VENDOR)); _font.debug.render(4, 95, "GL_RENDERER: " + GL11.glGetString(GL11.GL_RENDERER)); _font.debug.render(4, 105, "GL_VERSION: " + GL11.glGetString(GL11.GL_VERSION)); _font.debug.render(4, 125, ("RUNNING_IN_IDE: " + Misc.running_in_IDE()).toUpperCase()); _font.debug.render(4, 145, "STATE: " + state.id()); _font.debug.render(4, 155, "STATE_PREVIOUS: " + state_previous.id()); if (state.equals(_game)) { _font.debug.render(4, 175, "PLAYER_POSITION: " + _game._level._barry.position()); _font.debug.render(4, 185, "PLAYER_YAW: " + _game._level._barry.yaw()); _font.debug.render(4, 195, "PLAYER_PITCH: " + _game._level._barry.pitch()); _font.debug.render(4, 205, "PLAYER_RAYPICK_OBJECT: " + _game._level._barry.ray_picker().object()); _font.debug.render(4, 215, "PLAYER_RAYPICK_DISTANCE: " + _game._level._barry.ray_picker().distance()); _font.debug.render(4, 225, "PLAYER_HEALTH: " + _game._level._barry.health()); _font.debug.render(4, 245, "LEVEL_POINTS: " + _game._level._statistics.points()); _font.debug.render(4, 255, "LEVEL_MOBS_KILLED: " + _game._level._statistics.mobs_killed()); _font.debug.render(4, 265, "LEVEL_SHOTS_FIRED: " + _game._level._statistics.shots_fired()); _font.debug.render(4, 275, "LEVEL_SECRETS_FOUND: " + _game._level._statistics.secrets_found()); _font.debug.render(4, 285, "LEVEL_PRISONERS_KILLED: " + _game._level._statistics.prisoners_killed()); _font.debug.render(4, 305, "WEAPON_USAGES: " + _game._level._barry._armoury.weapon().usages()); _font.debug.render(4, 325, "LEVEL_OBJECTS: " + _game._level.objects_static.size() + _game._level.objects_dynamic.size()); } _font.debug.render(_display.width() - right_offset, 5, "TIME: " + Misc.time()); _font.debug.render(_display.width() - right_offset, 15, "DELTA: " + _display.delta()); _font.debug.render(_display.width() - right_offset, 25, "FPS: " + _display.fps()); _font.debug.render(_display.width() - right_offset, 45, "JVM_MAX_MEMORY: " + (Runtime.getRuntime().maxMemory() / KB) + " KB"); _font.debug.render(_display.width() - right_offset, 55, "JVM_TOTAL_MEMORY: " + (Runtime.getRuntime().totalMemory() / KB) + " KB"); _font.debug.render(_display.width() - right_offset, 65, "JVM_FREE_MEMORY: " + (Runtime.getRuntime().freeMemory() / KB) + " KB"); _font.debug.render(_display.width() - right_offset, 75, "JVM_INUSE_MEMORY: " + ((Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory()) / KB) + " KB"); _display.mode_3D(); } }
From source file:io.flob.blackheart.DisplayDriver.java
License:Open Source License
public DisplayDriver() throws Exception { init_display();//from w w w .j a v a2 s . c o m init_GL(); System.out.println("GL_VENDOR: " + GL11.glGetString(GL11.GL_VENDOR)); System.out.println("GL_RENDERER: " + GL11.glGetString(GL11.GL_RENDERER)); System.out.println("GL_VERSION: " + GL11.glGetString(GL11.GL_VERSION)); System.out.println("#####################################"); texture_flush = BufferedImageUtil.getTexture("", new BufferedImage(1, 1, BufferedImage.TYPE_INT_RGB), -1985); }
From source file:io.flob.clicker.Core.java
License:Open Source License
private void tick() { if (DEBUG) {//from ww w . ja v a2 s.co m int right_offset = 180; int KB = 1024; _font.debug.render(4, 25, "OS_NAME: " + System.getProperty("os.name")); _font.debug.render(4, 35, "OS_ARCH: " + System.getProperty("os.arch")); _font.debug.render(4, 45, "OS_VERSION: " + System.getProperty("os.version")); _font.debug.render(4, 55, "LWJGL_VERSION: " + Sys.getVersion() + " (" + org.lwjgl.LWJGLUtil.getPlatformName() + ")"); _font.debug.render(4, 65, "JRE_VENDOR: " + System.getProperty("java.vendor")); _font.debug.render(4, 75, "JRE_VERSION: " + System.getProperty("java.version")); _font.debug.render(4, 85, "GL_VENDOR: " + GL11.glGetString(GL11.GL_VENDOR)); _font.debug.render(4, 95, "GL_RENDERER: " + GL11.glGetString(GL11.GL_RENDERER)); _font.debug.render(4, 105, "GL_VERSION: " + GL11.glGetString(GL11.GL_VERSION)); _font.debug.render(4, 125, "STATE: " + state.id()); _font.debug.render(4, 135, "STATE_PREVIOUS: " + state_previous.id()); if (state.equals(_game)) { _font.debug.render(4, 155, "LEVEL: " + _game.level); _font.debug.render(4, 165, "TIME: " + _game.time()); _font.debug.render(4, 175, "OVERTIME: " + _game.over_time); } _font.debug.render(Display.getWidth() - right_offset, 5, "TIME: " + Misc.time()); _font.debug.render(Display.getWidth() - right_offset, 15, "DELTA: " + _display.delta()); _font.debug.render(Display.getWidth() - right_offset, 25, "FPS: " + _display.fps()); _font.debug.render(Display.getWidth() - right_offset, 45, "JVM_MAX_MEMORY: " + (Runtime.getRuntime().maxMemory() / KB) + " KB"); _font.debug.render(Display.getWidth() - right_offset, 55, "JVM_TOTAL_MEMORY: " + (Runtime.getRuntime().totalMemory() / KB) + " KB"); _font.debug.render(Display.getWidth() - right_offset, 65, "JVM_FREE_MEMORY: " + (Runtime.getRuntime().freeMemory() / KB) + " KB"); _font.debug.render(Display.getWidth() - right_offset, 75, "JVM_INUSE_MEMORY: " + ((Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory()) / KB) + " KB"); } }