OpenGL Extensions Supported in Intel® 4 Series Express Chipsets and Beyond

by Loc Q Nguyen & Murali Madhanagopal

 

Introduction


In this paper, Intel Graphics refers to the Intel® Graphics Media Accelerator (Intel® GMA) graphics core. Built into the chipset and integrated into the motherboard, the graphics core shares the system memory with the operating system to keep the system performance at a very low cost. Intel Graphics addresses a wide range of graphics usages in mainstream personal computers. Since it is integrated into the motherboard, Intel Graphics consumes much less power than a discrete graphics card does. It is however powerful enough to allow users to perform expensive 3D graphics processing. The goal of this document is to list the set of OpenGL Extensions supported in Intel® 4 Series Express Chipsets for a quick reference. Developers who write 3D applications on OpenGL may refer to this document for a complete list of extensions supported in an Intel chipset.

For Intel chipset naming convention, please refer to the whitepaper “Quick Reference Guide to Intel Graphics” [1].

Supported OpenGL Extensions


Intel® 4 Series Express Chipsets support OpenGL version 2.0 and some extensions from OpenGL 2.1 (Pixel Buffer Objects) and OpenGL 3.0 (Frame Buffer Objects, floating point textures and half float pixels).

The table below summarizes the OpenGL extensions supported by Intel® 4 Series Express Chipsets and future chipsets. A brief description of each extension is also included in the table for reference. For a full detailed description of these extensions, readers are encouraged to check OpenGL Extension Registry official website. [2].

Note that each extension consists of multiple words. These words are connected each other by underscores. The first word usually starts with GL (core OpenGL) or WGL for Win32 system dependent. The second word indicates the company that developed that extension (e.g., ARB for Architecture Review Board, EXT for Extensions agreed by multiple vendors, INTEL for Intel Corporation, etc). The following words (usually not with capital letters) indicate the extension name.

In the reference table, the first column specifies the extension; the second column provides a brief description of the extension; the third column shows the first driver version for Windows* XP/Vista that the extension is supported. For example, for the extension GL_ARB_point_sprite, the first version of driver in Windows XP* that supports this extension is 14.36; and the first version of driver in Windows Vista* that supports this extension is 15.11. Drivers will support all extensions supported by a previous version of the driver. All extensions supported in 15.11 will be supported by default in 15.14. Same is the case with Windows XP drivers, 14.38 will support all extensions supported by 14.36. Also, 14.x means all driver versions of Windows XP support the extension. 15. x means all Windows Vista driver versions support this extension.

API Support

OpenGL API Support

Windows Vista Driver

Windows XP Driver

OpenGL 1.5

14.x

15.x

OpenGL 2.0

14.36

15.11

OpenGL 2.1

14.39

15.14


GLSL Support

GLSL (Open GL Shading language) is high level shading language which enables user to use a C like programming language to control the graphics pipe line for vertex and fragment operations. GLSL supports C programming constructs like branches, loops, if-else, while, break and continue.

GLSL Support

Windows Vista Driver

Windows XP Driver

GLSL 1.1

14.36

15.11

GLSL 1.2

14.39

15.14


ARB Extensions

OpenGL ARB extension

Brief description

ARB Extensions available on all driver versions (14.x and 15.x)

GL_ARB_multitexture

Allows multiple texture objects to be bound at the same time with separate blend modes and map coordinates

GL_ARB_transpose_matrix

Adds an interface for transferring data to and from the OpenGL pipeline

WGL_ARB_buffer_region

Define an area of a window to be saved in memory for quick restores.

GL_ARB_multisample

Provides a mechanism to anti alias all GL primitives:points, lines, polygons, bitmaps, and images. Currently supports only MAX_SAMPLE=1. MAX_SAMPLE=4 will be supported in future releases

WGL_ARB_multisample

Provides a mechanism to antialias all GL primitives: points, lines, polygons, bitmaps, and images.

GL_ARB_texture_env_add

Texture environment function ADD

GL_ARB_texture_cube_map

Provides a new texture generation scheme for cube map textures...

WGL_ARB_extensions_string

Allow an application to determine which WGL extensions are supported by a device.

WGL_ARB_pixel_format

Provide the capability to query pixel format attributes and to choose from the list of supported formats.

WGL_ARB_make_current_read

Allow preprocessing of image data in background.

WGL_ARB_pbuffer

Allow an application to render to non visible rendering buffers (pixel buffers).

GL_ARB_texture_compression

Allows OpenGL applications to use compressed texture images

GL_ARB_texture_border_clamp

Defines an additional texture clamping algorithm

GL_ARB_point_parameters

Supports additional geometric characteristics of points.

GL_ARB_texture_env_combine

Allows programmable texture combiner operations

GL_ARB_texture_env_crossbar

Provides capabilities to use the texture color from other texture units as sources to the COMBINE_ARB environment function.

GL_ARB_texture_env_dot3

Adds new operation to the texture combiner operations.

GL_ARB_texture_mirrored_repeat

Extends the set of texture wrap modes to include an image twice the size with a mirror image

GL_ARB_depth_texture

Define a new texture environment function ADD.

GL_ARB_shadow

Produces Boolean texture value, used to implement shadow maps

GL_ARB_window_pos

Provides a set of functions to directly set the current raster position in window coordinates

GL_ARB_vertex_program

Provides a method for defining vertex program instruction sequences for vertex programs

GL_ARB_fragment_program

Provides a method for defining fragment program instruction sequences for fragment programs.

GL_ARB_vertex_buffer_object

Provides interface to cache vertex array data in memory buffer objects

GL_ARB_occlusion_query

Used to query the number of pixels drawn by a primitive operation.

GL_ARB_texture_rectangle

Adds a new texture target that supports 2D textures.

ARB Extensions available from drivers 14.36 and 15.11

GL_ARB_shader_objects

Provides functions for creating shader objects and program objects, for compiling shader objects etc.

GL_ARB_vertex_shader

Adds programmable vertex level processing to OpenGL

GL_ARB_fragment_shader

Adds functionality to define fragment shader objects.

GL_ARB_shading_language_100

Indicated open gl shading language is supported.

GL_ARB_texture_non_power_of_two

Supports relaxing Open GL power-of-two size restrictions across all texture targets

GL_ARB_point_sprite

Allow applications to replace the existing texture coordinates with point sprite texture coordinates.

GL_ARB_draw_buffers

Extends ARB_fragment_program and ARB_fragment_shader to allow multiple output colors

GL_ARB_pixel_buffer_object

Permits buffer objects to be used not only with vertex array data, but also with pixel data.

ARB Extensions available from drivers 14.38 and 15.13

GL_ARB_color_buffer_float

Adds pixel formats or visuals with floating-point RGBA color components.

WGL_ARB_pixel_format_float

Adds pixel formats with floating-point RGBA color components.

GL_ARB_texture_float

Adds texture internal formats with 16- and 32-bit floating-point components.

GL_ARB_half_float_pixel

Allows draw/read pixel data in 16-bit floating point format. Apply to DrawPixel ()/ReadPixel () as well as to texture creation functions and filter/color map functions.


Vendor and EXT Extensions

Vendor and EXT extension

Brief description

Vendor Extensions available on all driver versions (14.x and 15.x)

GL_EXT_abgr

Provide a reverse order alternative to image format RGBA.

GL_EXT_bgra

Provide formats which match memory layout of Windows DIBs.

GL_EXT_blend_color

Add a constant color in blending equations to increase blending capability.

GL_EXT_blend_func_separate

Define a function that allows independent setting of the RGB and alpha blend factors for blending operations.

GL_EXT_blend_minmax

Increase the blending capability by defining two new blending equations.

GL_EXT_blend_subtract

Add two blending equations which produce the difference of its left and right hand sides.

GL_EXT_clip_volume_hint

Provide an option for not requiring clip volume clipping for primitives.

GL_EXT_compiled_vertex_array

Define an interface so that static vertex array can be cached or precompiled.

GL_EXT_fog_coord

Include an explicit per-vertex fog coordinate to be used in fog computations.

GL_EXT_packed_pixels

Provide support for packed pixels in memory.

GL_EXT_rescale_normal

Allow the normal vector to rescale after being multiplied by the inverse model view matrix.

GL_EXT_separate_specular_color

Add a second color to rasterization.

GL_EXT_stencil_wrap

Allow maximum and minimum wrapping of stencil values.

GL_EXT_texture_compression_s3tc

Add more texture compression functionality for S3TC format.

GL_EXT_texture_env_add

Define a new texture environment function ADD.

GL_EXT_texture_env_combine

Define a new texture environment function COMBINE_EXT.

GL_EXT_texture_filter_anisotropic

Provide a general mechanism for supporting anisotropic texture filtering schemes.

GL_IBM_texture_mirrored_repeat

Introduce a new texture wrap mode that uses a texture map twice as large at the original image.

GL_NV_texgen_reflection

Provide two new texture coordinate generation modes.

WGL_EXT_swap_control

Allow an application to control the periodicity of color buffer swaps.

GL_EXT_polygon_offset

Changes depth value of polygons by an offset

GL_EXT_texture

Supports various resolution of color component in texture images

GL_EXT_texture3D

Provides 3 dimensional texture mapping

GL_EXT_subtexture

Allows redefining existing portion of a texture image

GL_EXT_copy_texture

Defines methods to load texture images directly from framebuffer

GL_EXT_texture_object

Allows naming of texture objects

GL_SGIS_texture_lod

Imposes constraints on texture level of images

GL_EXT_vertex_array

Allows definition of multiple geometry primitives

GL_SGIS_generate_mipmap

Allows methods to derive entire mipmap array values

GL_SGIS_texture_edge_clamp

Texture coordinate clamping algorithm

GL_EXT_point_parameters

Provides additional geometric characterization of points

GL_EXT_blend_logic_op

Additional blending equation provided

GL_SGIX_depth_texture

Defines new depth texture format

GL_EXT_draw_range_elements

New vertex rendering instructions

GL_EXT_secondary_color

Specifies RGB components for secondary color

GL_EXT_multi_draw_arrays

Handles multiple list of vertices in one call

GL_SUN_multi_draw_arrays

Alias of GL_EXT_multi_draw_arrays

GL_EXT_texture_lod_bias

Provides a way to change the mipmap computations

GL_NV_blend_square

Provide four additional blending factors to have special effects.

GL_EXT_texture_env_dot3

Adds new operation to texture combiner operations.

GL_NV_texture_rectangle

Add new texture target to support 2D textures

GL_NV_point_sprite

Allows usage of points than quads

GL_EXT_shadow_funcs

Allows support of all binary texture comparison functions

GL_EXT_stencil_two_side

Allows two sided stencil testing and all related stencil operations

GL_S3_s3tc

Specifies texture data in compressed s3TC format

GL_3DFX_texture_compression_FXT1

Additional texture compression support for FXT1 format

WGL_EXT_extensions_string

Used to find which WGL extensions are supported

Vendor Extensions available from drivers 14.38 and 15.13

GL_ATI_separate_stencil

Allows changes to stencil format

GL_EXT_blend_equation_separate

Introduces separate RGB and alpha blend values

GL_EXT_framebuffer_object

Define a simple interface for drawing to rendering destinations.

Vendor Extensions available from drivers 14.38 and 15.13

GL_EXT_texture_sRGB

Add new uncompressed and compressed color texture formats with sRGB components.

 

Pixel Buffer Object and Frame Buffer Object Support


OpenGL uses a pipelined architecture; each unit needs data from previous section to complete its job. The vertex data and pixel data are processed through the pipeline, combined and written to the frame buffer for display. Rasterization is the process which combines geometry and pixel data and writes as a fragment. Fragment is an object containing depth, width, color, points and other information necessary for display. Each fragment maps to a pixel in the screen. A frame buffer is a set of buffers containing color, depth, stencil and accumulation buffers. However this frame buffer is windows system provided and managed by the operating system.

Frame Buffer Object (FBO)


The GL_EXT_framebuffer_object extension defines an interface that allows rendering to one or more off screen frame buffers other than the default frame buffer provided to OGL by the operating system. The introduction of these newly defined rendering destinations, referred to as frame buffer-attachable images, provide the functionality that allows:

  • Off screen rendering without the window’s size limitation
  • Direct rendering to textures without the necessity to use glCopyTexImage()
  • Rendering to multiple locations with the use of fragment shaders
  • Rendering to the stencil and depth logical buffers with the use of the newly introduced renderbuffer object.

FBO is supported by Intel 4 series chipsets in Vista (15.11) and XP (14.36) graphics drivers.

Pixel Buffer Object (PBO)


Pixel Buffer Object expands vertex buffer object to store both vertex and pixel data. ARB_vertex_buffer_object is the extension to support vertex buffers. Vertex Buffer objects (VBO) are actually created, when a glBindBuffer() function is called for the first time for a given buffer name.

The 2 pixel path functions affected by PBO are:

  • glDrawPixels() - draws pixels from PBO directly to the frame buffer
  • glReadPixels() - Reads pixels directly from the frame buffer and write the data into PBO.

Two main groups of functions, affected by PBO are:

  • glTexImage*D() – Used to transfer texture from the user memory to the OGL-managed memory
  • glGetTexImage() – Used to transfer texture to the user memory

PBO introduces 2 new targets for binding buffer objects – GL_PIXEL_PACK_BUFFER_ARB and GL_PIXEL_UNPACK_BUFFER_ARB. glReadPixels() and glGetTexImage() are pack pixel functions, whereas glDrawPixels() and glTexImage*D() are unpack operations.

PBO is supported by Intel® 4 Series Express Chipsets in Vista (15.11) and XP (14.36) graphics drivers.

Examples of Using OpenGL extensions

In this section, two examples show how OpenGL extensions can be used.

Using GL_EXT_abgr


The first example illustrates the use of the extension GL_EXT_abgr.

GL_EXT_abgr extends the list of color formats in order to fit big-endian machines. In this format, the pixel color data consists of four components: alpha, blue, green, red, and these components are stored in this order. The color of a pixel is the combination of blue, green and red. The alpha component is the degree of color transparency. Each component has a value between 0 and 255. The alpha value 0 means full transparency, 255 means opaque, and a value between 0 and 255 means some degree of transparency between full transparency and opaque.

A function, called CreateImages, is used to create four images which have ABGR format. The first image is a red square with a degree of transparency (0x80 in this example). The second image is a green square with the same degree of transparency. The third image is a blue square with the same degree of transparency. The last image is a brown square with the same degree of transparency; the brown color is a combination of green and red components.

#include "stdafx.h"
#include <glut.h>

const int iImgLen = 128;
const int iImgSize = iImgLen*iImgLen;

GLubyte RedImg[4*iImgSize];
GLubyte GreenImg[4*iImgSize];
GLubyte BlueImg[4*iImgSize];
GLubyte BrownImg[4*iImgSize];

void CreateImages(void)
{
	glMatrixMode(GL_PROJECTION);
	glLoadIdentity();
	gluPerspective(60.0f, 1.0, 1.0, 400.0);

	glMatrixMode(GL_MODELVIEW);
	glDisable(GL_DITHER);

	int i;

	/* Create a red square */
	for (i=0; i <iImgSize; i++) 
	{
		RedImg[i*4] = 0x80;	// alpha
		RedImg[i*4+1] = 0x00;	// blue
		RedImg[i*4+2] = 0x00;	// green 
		RedImg[i*4+3] = 0xff;	// red
	}

	/* Create a green square */
	for (i=0; i <iImgSize; i++) 
	{
		GreenImg[i*4] = 0x80;	 // alpha
		GreenImg[i*4+1] = 0x00;// blue
		GreenImg[i*4+2] = 0xff;// green 
		GreenImg[i*4+3] = 0x00;// red
	}

	/* Create a blue square */
	for (i=0; i <iImgSize; i++) 
	{
		BlueImg[i*4] = 0x80;	// alpha
		BlueImg[i*4+1] = 0xff; // blue
		BlueImg[i*4+2] = 0x00; // green 
		BlueImg[i*4+3] = 0x00; // red
	}

	/* Create a brown square */
	for (i=0; i <iImgSize; i++) 
	{
		BrownImg[i*4] = 0x80;	 // alpha
		BrownImg[i*4+1] = 0x00;// blue
		BrownImg[i*4+2] = 0x55;// green 
		BrownImg[i*4+3] = 0x66;// red
	}
}


The function called RenderScene is used to draw the above images. In this function, the API call glDrawPixels is used to render the images. Note that in glDrawPixels, the format GL_ABGR is used to draw the image.

void RenderScene(void)
{
	glClearColor(0.0f, 0.0f, 0.0f, 1.0f);  // Set black background
	glClear(GL_COLOR_BUFFER_BIT);

	glEnable(GL_BLEND);
	glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);

	glRasterPos3i(-1.0, -0.5, -2.0);
	glDrawPixels(iImgLen, iImgLen, GL_ABGR_EXT, GL_UNSIGNED_BYTE, RedImg);

	glRasterPos3f(-0.2, -0.5, -2.0);
	glDrawPixels(iImgLen, iImgLen, GL_ABGR_EXT, GL_UNSIGNED_BYTE, GreenImg);


	glRasterPos3f(-0.7, -0.7 , -2.0);
	glDrawPixels(iImgLen, iImgLen, GL_ABGR_EXT, GL_UNSIGNED_BYTE, BlueImg);

	glRasterPos3f(-0.5, -1.0, -2.0);
	glDrawPixels(iImgLen, iImgLen, GL_ABGR_EXT, GL_UNSIGNED_BYTE, BrownImg);

	glFlush();
}


The main program starts by checking whether or not the extension GL_EXT_abgr is supported in the current GPU. If it is not supported, the program simply exits; otherwise, it creates the above images in the ABGR formats and renders them.

 
int _tmain(int argc, char **argv)
{
	glutInit(&argc, argv);
	glutInitDisplayMode(GLUT_RGB | GLUT_SINGLE);	// Type of display mode: RGB, single buffer
	glutCreateWindow("Testing ABGR extension");	// Caption

	if (!glutExtensionSupported("GL_EXT_abgr"))
		exit(-1);

	CreateImages();
	glutDisplayFunc(RenderScene);
	glutMainLoop();
	return 0;
}

 

If the graphics hardware supports GL_EXT_abgr, the result is shown in the picture below. The overlap sections of the four squares have different colors because of the transparency effect of the squares.

Using OpenGL shading language


In this section, we show an example of using OpenGL shading language.

The code below shows how the application uses the vertex shader and fragment shader. The source code of vertex and fragment shaders are first loaded with the API glShaderSourceARB, then they are compiled with glCompileShaderARB to create shader objects. These shader objects are attached to a program object called g_program. A program object is an OpenGL data structure object that contains all shader objects used a specific task. The compiled shader objects are then linked with glLinkProgramARB.

#include "stdafx.h"
#include "glee.h"
#include <glut.h>

GLhandleARB g_program;
char infolog[1024];
char content[1024];

void Resize(int width, int height)
{
   glViewport(0, 0, width, height);
   glMatrixMode(GL_PROJECTION);

   gluPerspective(60, width / height, 0.1, 200.0);
   glMatrixMode(GL_MODELVIEW);
}

void ProcessKey(unsigned char key, int x, int y)
{
	// type ESC to exit normally
	if (key == 27) 
		exit (0);
}     

bool LoadShader(char *file, GLenum type)
{
	// GLSL shader.
	GLhandleARB shaderObj;

	// Load shader's source text.
	FILE *fp;
	unsigned int ByteCount = 0;

	fp = fopen((char*) file, "rb");
	ByteCount = fread(content, sizeof(BYTE), 1024, fp);
	content[ByteCount] = 0;

	// Create the shader from a text file.
	shaderObj = glCreateShaderObjectARB(type);

	const char * p = content;
	glShaderSourceARB(shaderObj, 1, (const char**)&p, NULL);
	glCompileShaderARB(shaderObj);

	GLint result, numChars = 0;
	// Returns the results of the shader compilation.
	glGetObjectParameterivARB(shaderObj, GL_OBJECT_COMPILE_STATUS_ARB, &result);

	// Display shader errors if any.
	if(result == 0)
	{
		// Get the error message and display it.
		glGetInfoLogARB(shaderObj, sizeof(infolog), &numChars, infolog);
		printf("Error in %s...n%sn", file, infolog);
		return false;
	}

	// Attach to the program.
	glAttachObjectARB(g_program, shaderObj);
	glDeleteObjectARB(shaderObj);
	return true;
}

bool InitializeApp()
{
	glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
	glShadeModel(GL_SMOOTH);
	glEnable(GL_DEPTH_TEST);

        //Load the vertex shader.
	if(LoadShader("vs.glsl", GL_VERTEX_SHADER_ARB) == false)
		return false;

	// Load the fragment shader.
	if(LoadShader("fs.glsl", GL_FRAGMENT_SHADER_ARB) == false)
		return false;

	// Link together the vertex and fragment shaders.
	glLinkProgramARB(g_program);

	GLint result, numChars = 0;

	glGetObjectParameterivARB(g_program, GL_OBJECT_LINK_STATUS_ARB, &result);

	if(result == 0)
	{
		// Get the error message and display it.
		glGetInfoLogARB(g_program, sizeof(infolog), &numChars, infolog);
		printf("Error linking shader...n%sn", infolog);
		return false;
	}

	return true;
}


The function called RenderShadedCube is used to render a rotated cube in three dimensions. It defines the eight vertices of a cube. The cube has six square faces, and each face consists of four vertices. In each square face, four vertices have four different colors. The API call glUseProgramObjectARB tells the compiler to install a program object’s executable code.

 

void RenderShadedCube()
{
	static float theta = 0.00;

	glClearColor(0.0f, 0.5f, 0.5f, 1.0f);	// green background
	glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
	glLoadIdentity();

	glTranslatef(0.0f, 0.0f, -5.0f);
	glRotatef(theta,1.0f,1.0f,1.0f);		// rotate in 3-dimension

	glUseProgramObjectARB(g_program);

	// Six faces of the cube
	float vertices[] = {
		1, 1, 1,  1, 1, -1,  1, -1, 1,  1, -1, -1,
		-1, 1, 1, 1, 1, 1, -1, -1, 1 , 1, -1, 1,
		-1, 1, -1, 1, 1, -1, -1, -1, -1 , 1, -1, -1,
		-1, 1, 1, -1, 1, -1, -1, -1, 1, -1, -1, -1,
		-1, 1, 1, 1, 1, 1, -1, 1, -1,  1, 1, -1,
		-1, -1, 1, 1, -1, 1, -1, -1, -1, 1, -1, -1};

	// Color the above faces. Each face vertex has a different color
	float colors[] = {
		1, 0, 0,  0, 1, 0,  0, 0, 1 , 1, 1, 1,
	        1, 0, 0,  0, 1, 0,  0, 0, 1 , 0, 0, 0,
		1, 0, 0,  0, 1, 0,  0, 0, 1 , 1, 0, 1,
		1, 0, 0,  0, 1, 0,  0, 0, 1 , 0, 1, 1,
		1, 0, 0,  0, 1, 0,  0, 0, 1 , 1, 1, 1,
		1, 0, 0,  0, 1, 0,  0, 0, 1 , 0, 0, 0};

	glEnableClientState(GL_VERTEX_ARRAY);
	glVertexPointer(3, GL_FLOAT, 0, vertices);

	glEnableClientState(GL_COLOR_ARRAY);
	glColorPointer(3, GL_FLOAT, 0, colors);
	glDrawArrays(GL_QUAD_STRIP, 0, 24);

	glDisableClientState(GL_VERTEX_ARRAY);
	glDisableClientState(GL_COLOR_ARRAY);

	glUseProgramObjectARB(0);

	glutSwapBuffers();
	glutPostRedisplay();

	// Advance rotation angle.
	theta +=0.05f;
}


The main program starts by checking the OpenGL version supported by the GPU. Since GLSL becomes part of OpenGL starting version 2.0, we can query the shading version if OpenGL version is greater or equal to 2.0. If the OpenGL version is 1.x then we may check the four extensions for GLSL which determines whether or not the current GPU can run GLSL or not. If GLSL is not supported, the program simply exits; otherwise, it renders the rotated cube using the predifined vertex and grament shaders.

int _tmain(int argc, char **argv)
{
	glutInit(&argc, argv);
	glutInitWindowSize(600, 600);
	glutInitWindowPosition(100, 100);
	glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);

	glutCreateWindow("GL Shading Language");

	int maj = 0;
	int min = 0;

	char *glver = (char*) glGetString(GL_VERSION);
	sscanf(glver, "%d.%d", &maj, &min);

	printf("OpenGL version supported -> major:%d minor:%dn", maj, min);

	if (maj >= 2)
	{
		// Version 2+ has shaders
		char *glshadingver = (char*) glGetString(GL_SHADING_LANGUAGE_VERSION);
		sscanf(glshadingver, "%d.%d", &maj, &min);
	}
	else if (maj == 1)
	{
		// Check for OpenGL shader extensions
		if (!glutExtensionSupported("GL_ARB_shader_objects") || 
		    !glutExtensionSupported("GL_ARB_vertex_shader") ||
		    !glutExtensionSupported("GL_ARB_fragment_shader") ||
		    !glutExtensionSupported("GL_ARB_shading_language_100"))
		{
			printf("GLSL is not supported!n");
			exit(-1);
		}

		/* OpenGL 1.x can only have GLSL 1.00 as an extension. */
		maj = 1;
		min = 0;
	}

	printf("GLSL is ready!n");
	printf("GLSL version -> major:%d minor:%dn", maj, min);

	glutDisplayFunc(RenderShadedCube);

	glutReshapeFunc(Resize);
	glutKeyboardFunc(ProcessKey);

	// Create the program associated with shaders
	g_program = glCreateProgramObjectARB();

	if(InitializeApp() == true)
		glutMainLoop();
	else
		printf("Error in InitializeApp()!nn");

	glDeleteObjectARB(g_program);

	return 0;


Finally, the source code of the vertex shader is shown below. Note that it is written in OpenGL shading language, a high-level procedural language.

varying vec4 color;

void main()
{
   gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
   color = gl_Color;
}


Similarly, the source code of the fragment shader is shown below.

varying vec4 color;

void main()
{
   gl_FragColor = color/0.5;
}


We ran this program on a computer equipped with the Intel® 4 Series Express Chipset. A rotated cube is rendered as the result. Note that the shading color on each cube face is the result from the shaders.

Conclusion


Today, Intel Graphics represents a large volume of deployed graphics hardware in the consumer graphics market segment. Since the number of OpenGL applications continues to grow, this article serves as a quick reference for developers who implement OpenGL applications on Intel® 4 Series Express Chipsets. Intel also offers tools to help developers to optimize their applications for Intel® Graphics Technology such as Intel® VTune Performance Analyzer [3], Intel® Graphics Performance Analyzers [4], Intel® Graphics Media Accelerator Driver [5], etc.

References


  1. Quick Reference Guide To Intel Integrated Graphics
  2. Intel® VTune Performance Analyzer
  3. Intel® Graphics Performance Analyzers
  4. Intel® Graphics Media Accelerator Driver v2.1

About the Authors


Loc Q Nguyen received his M.B.A. from the University of Dallas, Texas. He holds a Master’s degree in Electrical Engineering from McGill University, Canada and a Bachelor's in Electrical Engineering from École Polytechnique, Université de Montréal, Canada. He is currently an Application Engineer with Software and Services Group at Intel Corporation.

Murali Madhanagopalreceived his M.S. in Computer Information Systems from Texas A&M University, College Station and his bachelor’s degree in Computer Engineering from College Of Engineering Guindy, Anna University, India. He is currently a Graphics Architect with Visual Computing Group at Intel Corporation; working with ISV’s to enable Intel graphics features on their products.

For more complete information about compiler optimizations, see our Optimization Notice.

4 comments

Top
anonymous's picture

Hello,

You just either save the page or print it directly to your printer using your browser's features. There is no PDF file to download.

Thanks,
Loc

weirdobob's picture

how do i download it? (P.S. these pages take forever to load.)

anonymous's picture

I suppose the Vista / XP drivers should be swapped around. Newest driver for XP i can find is 14.42.

kaarlisk's picture

This article seems out of date. There are 15 additional extensions supported as of the 15.17.1 (8.15.10.2086) driver. Also, there is no information on OpenGL support in Linux.

Add a Comment

Have a technical question? Visit our forums. Have site or software product issues? Contact support.