Mat4 and vec4 multiplication produces empty screen


#version 330 core

layout(location = 0) in vec3 aPos;
layout(location = 1) in vec3 aColor;
layout(location = 2) in vec2 aTex;

out vec4 ourColor;
out vec2 Texture;

uniform mat4 transform;

void main(){
    transform;
    gl_Position = transform * vec4(aPos,1.0f);
    ourColor = vec4(aColor,1.0);
    Texture = vec2(aTex.x,1 - aTex.y);
}

This is my vertex shader code. When I run my program with this shader, An black screen appears. If I delete the code at below,

transform *

my program runs great and it shows colors and picture.

My code runs clearly without

transform *

It would tend to suggest you are not populating the transform uniform properly, or not populating it with a value that places the content on-screen.

Try populating it with the identity transform.

[QUOTE=Dark Photon;1292269]It would tend to suggest you are not populating the transform uniform properly, or not populating it with a value that places the content on-screen.

Try populating it with the identity transform.[/QUOTE]

It worked. I thank you so much.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.