Jump to content
  • Advertisement
Sign in to follow this  

OpenGL image1D as function parameter in glsl

This topic is 1499 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi like the topic suggests I am trying to find a way to pass an image1D (2D or whatever) in a parameterlist of a glsl function like:

vec4 myImageLoad (in image1D tex, int pos) {...}

This is simply for convenience when i need to do some more calcularion on the texel value.


However i did not get my driver (AMD HD6950) to compile this, the error would be "missing or invalid layout qualifier"

when I use a layout qualifier like this:

vec4 myImageLoad (layout (rgba32f) in image1D paramtex, int light) {...}

The compiler suggests: "parse error on 'layout'".


Since the glwiki told me this would be possible, but didnt give a syntax example (http://www.opengl.org/wiki/Image_Load_Store#Image_variables), one of you guys might give me a hint.


Edited by Wh0p

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!