質問

From what I know, everything about OpenGL changed since 3.1 and now I can't figure out how to re-size the rendering context.

float positionData[] =  {   -0.8f, -0.8f, 0.0f,
                             0.8f, -0.8f, 0.0f,
                             0.0f,  0.8f, 0.0f  };

Is there a setting that can fix this? Or do I have to incorporate the math into the shaders themselves.

OpenGL pretends the window is actually 2.0f by 2.0f

役に立ちましたか?

解決

You don't resize the rendering context (it doesn't make sense to do so), but you can resize the viewport. Use functions like glViewport and friends - you can read about them in the core profile spec.

If you're talking about moving the 'camera' then you'll have to create a matrix and pass it to the shaders. There are many tutorials explaining how to do this.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top