1

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

Griallia
  • 171
  • 2
  • 6

1 Answers1

3

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.

Pubby
  • 51,882
  • 13
  • 139
  • 180
  • What he said. Also http://stackoverflow.com/a/9793178/524368 with the addition, that instead of predefined fixed function matrices you're no to expected to define everything yourself, for greater flexibility. – datenwolf Mar 24 '12 at 11:41