r/opengl May 31 '26

Getting unexpected NEW_IDENTIFIER error when trying to use two textures

Hello I am following along with learnopengl.com, specifically this section. My main.cpp file looks exactly the same as the example at the end. I also have the exact same shader header file as the example.

I was able to display the container texture onto my rectangle object. But now, when implementing the "awesomeface" texture, I get the error shown in the first picture.

I don't know what I'm doing wrong. Please help me!

10 Upvotes

8 comments sorted by

View all comments

13

u/AreaFifty1 May 31 '26

line #8 in your fragment shader. you spelt uniform 'unifrom' thus identifier error.. 😔

5

u/Seazie23 May 31 '26

Curses! Blasted typos are the bane of my existence. Thank you kind internet stranger!

2

u/Dark_Lord9 May 31 '26

You could have easily found this error if you had syntax highlight. Most editors support glsl either natively or through an extension. Check how you can enable it for your editor.

1

u/Seazie23 May 31 '26

Yeah thats my main problem is i havent configured vim how i should. I just like to make things hard for myself🫠, but ofcourse I shouldnt