JimFing
JimFing

Reputation: 151

Can you use GlVertexAttribPointer without shaders

According to the following wiki page:

OpenGL Wiki Page

It says "One of the requirements is to use shaders.". Is this true? To use GlVertexAttribPointer do I have to use shaders? I'm just starting out in OpenGL and just want to keep things simple for now, without having to introduce shaders at such an early stage of development. I will be using GLSL eventually, but want to get each feature "working" before adding any new features to my code.

Thanks

Upvotes: 1

Views: 1277

Answers (1)

Dr. Snoopy
Dr. Snoopy

Reputation: 56357

Yes, it's true, you need shaders to use generic vertex attributes, if not, how would OpenGL know that attribute 0 is normals, 1 is position and 2 is texture coordinates? There is no API for doing that in the Fixed Function pipeline.

It might work, but that's just luck, not defined behaviour.

Upvotes: 2

Related Questions