glTranslatef not working within glBegin .. glEnd

前端 未结 2 781
感情败类
感情败类 2021-01-22 07:41

I\'m trying to draw 2 squares side by side of different colours, my problem is I can\'t get glTranslatef to move my second square to the right, the second square just draws over

2条回答
  •  感动是毒
    2021-01-22 08:35

    You cannot translate inside a glBegin/glEnd block, you have break it up into two blocks.

    I recommend to start using glGetError() in your code, it will help you find mistakes like this.

提交回复
热议问题