Bonjour / Bonsoir,
J'ai un problème de compatibilité ou version avec mes shaders,
Je ne comprend pas l'erreur et semble récurrente chez AMD, ayant parcouru plusieurs page sur google a la recherche d'une correction pour se bug, rien a faire...

Techno:
Langage: C
Libs: OpenGL, GLFW, GLEW
OS: Window 10

Log d'erreur:
WARNING: warning(#272) Implicit version number 110 not supported by GL3 forward compatible context

Materiel:
- Processeur AMD FX 8350 Black Edition
- Carte mère ASUS M5A97 R2.0
- 24 Go de mémoire vive
- Carte graphique AMD Radeon R9 270X 2Go

Screen:
Nom : bug.png
Affichages : 235
Taille : 10,5 Ko

Source sur Github

Source Shader:
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
#include "visiobj.h"
 
static void	test_shader(GLuint id, GLint type)
{
	GLint	log_len;
	GLchar	*log_content;
 
	glGetShaderiv(id, GL_INFO_LOG_LENGTH, &log_len);
	if (log_len <= 0)
		return ;
	if (type == GL_VERTEX_SHADER)
		ft_putstr("Error Vertex Shader:\n\t");
	else if (type == GL_FRAGMENT_SHADER)
		ft_putstr("Error Fragment Shader:\n\t");
	else
		ft_putstr("Error Geometry Shader:\n\t");
	if (!(log_content = (char *)malloc(sizeof(char) * log_len)))
		die("Malloc failure, test_shader!\n");
	glGetShaderInfoLog(id, log_len, &log_len, log_content);
	ft_putstr(log_content);
	free(log_content);
	die("\n");
}
 
static void	test_program(GLuint id)
{
	GLint	log_len;
	GLchar	*log_content;
 
	glGetProgramiv(id, GL_INFO_LOG_LENGTH, &log_len);
	if (log_len <= 0)
		return ;
	ft_putstr("Error Program Shader:\n\t");
	if (!(log_content = (char *)malloc(sizeof(char) * log_len)))
		die("Malloc failure, test_program!\n");
	glGetProgramInfoLog(id, log_len, &log_len, log_content);
	ft_putstr(log_content);
	free(log_content);
	die("\n");
}
 
GLuint		shaders_load(const GLchar *vertex_src, const GLchar *fragment_src)
{
	GLuint	vertex_id;
	GLuint	fragment_id;
	GLuint	program;
 
	vertex_id = glCreateShader(GL_VERTEX_SHADER);
	glShaderSource(vertex_id, 1, &vertex_src, NULL);
	glCompileShader(vertex_id);
	test_shader(vertex_id, GL_VERTEX_SHADER);
	fragment_id = glCreateShader(GL_FRAGMENT_SHADER);
	glShaderSource(fragment_id, 1, &fragment_src, NULL);
	glCompileShader(fragment_id);
	test_shader(fragment_id, GL_FRAGMENT_SHADER);
	program = glCreateProgram();
	glAttachShader(program, vertex_id);
	glAttachShader(program, fragment_id);
	glLinkProgram(program);
	test_program(program);
	glDetachShader(program, vertex_id);
	glDetachShader(program, fragment_id);
	glDeleteShader(vertex_id);
	glDeleteShader(fragment_id);
	return (program);
}
 
void		uniform_mat4(GLuint program, GLchar *name, GLfloat *mat)
{
	GLint id;
 
	id = glGetUniformLocation(program, name);
	glUniformMatrix4fv(id, 1, GL_FALSE, mat);
}
glfwinfo.exe:
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
GLFW header version: 3.2.1
GLFW library version: 3.2.1
GLFW library version string: "3.2.1 Win32 WGL EGL MinGW"
OpenGL context version string: "4.5.13467 Compatibility Profile Context 21.19.413.0"
OpenGL context version parsed by GLFW: 4.5.13467
OpenGL context flags (0x00000000):
OpenGL context flags parsed by GLFW:
OpenGL profile mask (0x00000002): compat
OpenGL profile mask parsed by GLFW: compat
OpenGL context renderer string: "AMD Radeon HD 7800 Series"
OpenGL context vendor string: "ATI Technologies Inc."
OpenGL context shading language version: "4.50"
OpenGL framebuffer:
 red: 8 green: 8 blue: 8 alpha: 8 depth: 24 stencil: 8
 samples: 0 sample buffers: 0
 accum red: 0 accum green: 0 accum blue: 0 accum alpha: 0 aux buffers: 4
Vulkan loader: available
Vulkan required instance extensions: VK_KHR_surface VK_KHR_win32_surface
Vulkan discrete GPU device: "AMD Radeon HD 7800 Series"
Lien pastebin glewinfo.exe

Si vous avez besoin d'autre information, n’hésite pas a me les demander.