mirror of
https://github.com/SFML/SFML.git
synced 2024-11-25 04:41:05 +08:00
Minor fix in Window and OpenGL examples
This commit is contained in:
parent
7fc29c78f7
commit
7c9f9cc41c
@ -75,7 +75,7 @@ int main()
|
|||||||
glEnable(GL_TEXTURE_2D);
|
glEnable(GL_TEXTURE_2D);
|
||||||
glBindTexture(GL_TEXTURE_2D, texture);
|
glBindTexture(GL_TEXTURE_2D, texture);
|
||||||
|
|
||||||
// Define a 3D cube (8 faces made of 2 triangles composed by 3 vertices)
|
// Define a 3D cube (6 faces made of 2 triangles composed by 3 vertices)
|
||||||
GLfloat cube[] =
|
GLfloat cube[] =
|
||||||
{
|
{
|
||||||
// positions // texture coordinates
|
// positions // texture coordinates
|
||||||
|
@ -44,7 +44,7 @@ int main()
|
|||||||
GLfloat ratio = static_cast<float>(window.getSize().x) / window.getSize().y;
|
GLfloat ratio = static_cast<float>(window.getSize().x) / window.getSize().y;
|
||||||
glFrustum(-ratio, ratio, -1.f, 1.f, 1.f, 500.f);
|
glFrustum(-ratio, ratio, -1.f, 1.f, 1.f, 500.f);
|
||||||
|
|
||||||
// Define a 3D cube (8 faces made of 2 triangles composed by 3 vertices)
|
// Define a 3D cube (6 faces made of 2 triangles composed by 3 vertices)
|
||||||
GLfloat cube[] =
|
GLfloat cube[] =
|
||||||
{
|
{
|
||||||
// positions // colors (r, g, b, a)
|
// positions // colors (r, g, b, a)
|
||||||
|
Loading…
Reference in New Issue
Block a user