Bonjour,

j'utilise en général les FBOs pour tout ce qui est offscreen rendering, mais mon programme actuel doit tourner sur une machine de m.... disposant du fantastique intel 945G (du vrai bonheur à programmer tout ca...bah au moins j'apprends des trucs

Bref, en utilisant le très bon GLView j'ai pu vérifier que les FBOs ne sont pas supportés, mais que les Pbuffer le sont.

Après m'être battu pour faire tourner les Pbuffer sur ma machine de développement, j'ai été pas mal refroidi en voyant que ca ne tourne pas sur l'autre (celle avec l'Intel 945G).

Un peu de débugging me montre que c'est qui retourne 0, donc c'est là que ca foire. Par contre un GlGetError juste après ne me sort aucune erreur et du coup je ne sais pas trop où chercher. J'ai vérifié le nombre de pixel formats valides et il y en a au moins un.

Comme dit, ca tourne sur mon ordi de développement, donc le code est correct à priori (aux détails près des pixel formats, mais comme dit il m'en trouve au moins un sur la machine de test).

J'ai pensé aux drivers, mais vu que GLView me dit que les extensions sont supportées ca ne doit pas venir de là, si?
Le probleme est que je nme peux pas mettre à jour ces drivers. C'est un ordi Dell et seuls les drivers Dell acceptent de s'installer. J'ai pû passer hier d'une version 2005 à une de 2006, mais pas au delà (alors qu'Intel continue d'updater les drivers pour la 945G....merci Dell).
Bref, si il y a une chance que ca vienne de là, peut-on contourner le probleme d'installation des drivers (par exemple comme avec les omega sur un ordi portable)?

Voilà mon code de création du pbuffer:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
 
g_pbuffer.hPBuffer = NULL;
g_pbuffer.nWidth   = m_originalTexture->Width;
g_pbuffer.nHeight  = m_originalTexture->Height;
 
//
// Define the minimum pixel format requirements we will need for our 
// p-buffer. A p-buffer is just like a frame buffer, it can have a depth 
// buffer associated with it and it can be double buffered.
//
int pf_attr[] =
{
	WGL_SUPPORT_OPENGL_ARB, TRUE,       // P-buffer will be used with OpenGL
	WGL_DRAW_TO_PBUFFER_ARB, TRUE,      // Enable render to p-buffer
	WGL_RED_BITS_ARB, 8,                // At least 8 bits for RED channel
	WGL_GREEN_BITS_ARB, 8,              // At least 8 bits for GREEN channel
	WGL_BLUE_BITS_ARB, 8,               // At least 8 bits for BLUE channel
	WGL_ALPHA_BITS_ARB, 8,              // At least 8 bits for ALPHA channel
	WGL_DEPTH_BITS_ARB, 16,             // At least 16 bits for depth buffer
	WGL_DOUBLE_BUFFER_ARB, FALSE,       // We don't require double buffering
	0                                   // Zero terminates the list
	};
 
	unsigned int count = 0;
	int pixelFormat;
 
	HDC		g_hDC = wglGetCurrentDC();
	HDC		oldDC = wglGetCurrentDC();
	HGLRC	oldRC = wglGetCurrentContext();
 
	wglChoosePixelFormatARB( g_hDC,(const int*)pf_attr, NULL, 1, &pixelFormat, &count);
 
	if( count == 0 )
	{
		MessageBox(NULL,"Could not find an acceptable pixel format!",
			"ERROR",MB_OK|MB_ICONEXCLAMATION);
		exit(-1);
	}
 
	//
	// Create a generic p-buffer...
	//
	g_pbuffer.hPBuffer = wglCreatePbufferARB( g_hDC, pixelFormat, g_pbuffer.nWidth, g_pbuffer.nHeight, NULL );
 
	if( !g_pbuffer.hPBuffer )
	{
		MessageBox(NULL,"Could not create the p-buffer",
			"ERROR",MB_OK|MB_ICONEXCLAMATION);
 
		DWORD err = GetLastError();
 
		// Create corresponding file
		FILE *logFile = NULL;
		fopen_s(&logFile, "C:\\temp\\2DGlassLog.txt", "w");
 
		if(logFile)
		{
			fprintf(logFile, "Pixel formats count: %d\n", count );
 
	       fprintf(logFile, "pbuffer creation error:  wglCreatePbufferARB() failed\n" );
 
		   if		(err == ERROR_INVALID_PIXEL_FORMAT) fprintf(logFile, "error:  ERROR_INVALID_PIXEL_FORMAT\n" );
		   else if	(err == ERROR_NO_SYSTEM_RESOURCES)	fprintf(logFile, "error:  ERROR_NO_SYSTEM_RESOURCES\n" );
		   else if	(err == ERROR_INVALID_DATA)			fprintf(logFile, "error:  ERROR_INVALID_DATA\n" );
		   fclose(logFile);
		}
		exit(-1);
	}
 
	g_pbuffer.hDC      = wglGetPbufferDCARB( g_pbuffer.hPBuffer );
	g_pbuffer.hRC      = wglCreateContext( g_pbuffer.hDC );
 
	//
	// We were successful in creating a p-buffer. We can now make its context 
	// current and set it up just like we would a regular context 
	// attached to a window.
	//
 
	if( !wglMakeCurrent( g_pbuffer.hDC, g_pbuffer.hRC ) ) 
	{
		MessageBox(NULL,"Could not make the p-buffer's context current!",
			"ERROR",MB_OK|MB_ICONEXCLAMATION);
		exit(-1);
	}
Et voilà le raport que me donne GLView (NOTE: quand j'essaie de lancer un test de pbuffers avec GLView, ca plante au moment de trouver un pixel format...alors que dans mon programme ca (au moins) , ca marche...bizarre...)

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
 
Renderer: Intel 945G
Vendor: Intel
Memory: 224 MB
Version: 1.4.0 - Build 4.14.10.4543
Shading language version: N/A
Max number of light sources: 16
Max viewport size: 2048 x 2048
Max texture size: 2048 x 2048
Max anisotropy: 4
Max samples: 0
Max draw buffers: 0
Max texture coordinates: 8
Max vertex texture image units: 0
 
 
Extensions: 52
 
GL_3DFX_texture_compression_FXT1
GL_ARB_depth_texture
GL_ARB_fragment_program
GL_ARB_multitexture
GL_ARB_point_parameters
GL_ARB_shadow
GL_ARB_texture_border_clamp
GL_ARB_texture_compression
GL_ARB_texture_cube_map
GL_ARB_texture_env_add
GL_ARB_texture_env_combine
GL_ARB_texture_env_crossbar
GL_ARB_texture_env_dot3
GL_ARB_transpose_matrix
GL_ARB_vertex_buffer_object
GL_ARB_vertex_program
GL_ARB_window_pos
GL_EXT_abgr
GL_EXT_bgra
GL_EXT_blend_color
GL_EXT_blend_func_separate
GL_EXT_blend_minmax
GL_EXT_blend_subtract
GL_EXT_clip_volume_hint
GL_EXT_compiled_vertex_array
GL_EXT_cull_vertex
GL_EXT_draw_range_elements
GL_EXT_fog_coord
GL_EXT_multi_draw_arrays
GL_EXT_packed_pixels
GL_EXT_rescale_normal
GL_EXT_secondary_color
GL_EXT_separate_specular_color
GL_EXT_shadow_funcs
GL_EXT_stencil_two_side
GL_EXT_stencil_wrap
GL_EXT_texture3D
GL_EXT_texture_compression_s3tc
GL_EXT_texture_env_add
GL_EXT_texture_env_combine
GL_EXT_texture_filter_anisotropic
GL_IBM_texture_mirrored_repeat
GL_NV_blend_square
GL_NV_texgen_reflection
GL_SGIS_generate_mipmap
GL_WIN_swap_hint
WGL_ARB_buffer_region
WGL_ARB_extensions_string
WGL_ARB_make_current_read
WGL_ARB_pbuffer
WGL_ARB_pixel_format
WGL_EXT_swap_control
 
Core features
v1.1 (100 % - 7/7)
v1.2 (100 % - 8/8)
v1.3 (100 % - 9/9)
v1.4 (100 % - 15/15)
v1.5 (66 % - 2/3)
v2.0 (10 % - 1/10)
v2.1 (0 % - 0/3)
 
OpenGL driver version check (Current: 6.14.10.4299, Latest known: 6.14.10.4543):
Outdated version of display drivers detected
According the database, you are might be not using the latest version of display drivers for your video card.
 
Compiled vertex array support
This feature improves OpenGL performance by using video memory to cache transformed vertices.
 
Multitexture support
This feature accelerates complex rendering such as lightmaps or environment mapping.
 
Secondary color support
This feature provides an alternate method of coloring specular highlights on polygons.
 
S3TC compression support
This feature improves texture mapping performance in some applications by using lossy compression.
 
No texture edge clamp support
This feature adds clamping control to edge texel filtering. Some programs may not render textures correctly (black line on borders.)
 
Vertex program support
This feature enables a wide variety of effects via flexible vertex programming (equivalent to DX8 Vertex Shader.)
 
Fragment program support
This feature enables a wide variety of effects via per pixel programming (equivalent to DX9 Pixel Shader.)
 
Texture anisotropic filtering support
This feature improves the quality of texture mapping on oblique surfaces.
 
No OpenGL Shading Language support
This may break compatibility for applications using per pixel shading.
 
No Frame buffer object support
This may break compatibility for applications using render to texture functions.
 
Extension verification: 
GL_ARB_imaging was not found, but has the entry point glBlendEquation 
WGL_EXT_extensions_string was not found, but has the entry point wglGetExtensionsStringEXT 
GL_EXT_texture_lod_bias was not found, but is available in driver version 6.14.10.4859 
GL_SGIS_texture_edge_clamp was not found, but is available in driver version 6.14.10.4859 
GL_SGIS_texture_lod was not found, but is available in driver version 6.14.10.4859 
WGL_EXT_extensions_string was not found, but is available in driver version 6.14.10.4859
Merci d'avance à tous ceux qui pourront m'aider!