Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Don't forget to read Tuesday's email newsletter for your chance to win a free copy of Construct 2!


fread

Member Since 04 Dec 2012
Offline Last Active Nov 20 2014 08:02 AM

#5155921 how to send RGBA unsigned byte color to GLSL shader?

Posted by fread on 25 May 2014 - 01:22 PM

C code:

 glenableVertexAttribArray(at_color);
    glvertexAttribPointer(at_color, 4, GL_UNSIGNED_BYTE, GL_TRUE, sizeof(MyVertex), offsetof(MyVertex,colorField));

Shader:

attribute vec4 at_color;"

gives me all black... what's wrong? Stride is OK, "normalized" is GL_TRUE, component type is GL_UNSIGNED_BYTE, component count is 4 because its R G B A color...

 

EDIT: fixed, working, thanks for all! especially radioteeth and JohnnyCode  




#5153317 glGenFramebuffers access violation in gl 3 . Deprecated?

Posted by fread on 13 May 2014 - 08:57 AM

glewExperimental, thank you!




PARTNERS