Jeff Storey
Jeff Storey

Reputation: 57222

OpenGL drawPixels with fragment shader

I'm confused about the OpenGL pipeline. I have an openGL method where I am trying to use glDrawPixels with a fragment shader, so my code looks like:

// I setup the shader before this
glUseProgram(myshader);
glDrawPixels(...);

On some graphics cards the shader gets applied, but on others it does not. I've no problem with nvidia, but problems with various ATI cards. Is this a bug with the ATI card? Or is nvidia just more flexible and I'm misunderstanding the pipeline? Are there alternatives to working around this (other than texture mapping)?

thanks, Jeff

Upvotes: 2

Views: 869

Answers (1)

Bahbar
Bahbar

Reputation: 18015

glDrawPixels should have fragment shaders applied. Figure 3.1 of page 203 of the compatibility profile makes it clear.

Note however, that the core profile removes DrawPixels. Which GL version are you using ?

Upvotes: 1

Related Questions