Upload Code
loading-left
loading loading loading
loading-right

Loading

Profile
No self-introduction
codes (1)
Coding 3D game
no vote
3D training i write a programming about 3D game training glUseProgram(m_programSkyBox.Program); glGenBuffers(1, &skyBoxVertexBuffer); glBindBuffer(GL_ARRAY_BUFFER, skyBoxVertexBuffer); float vertices[24] = { -1.0, -1.0, 1.0, 1.0, -1.0, 1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, 1.0, -1.0, -1.0, -1.0, 1.0, -1.0, 1.0, 1.0, -1.0, }; glBufferData(GL_ARRAY_BUFFER, sizeof(vertices), vertices, GL_STATIC_DRAW); glGenBuffers(1, &skyBoxIndexBuffer); glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, skyBoxIndexBuffer); GLubyte indices[14] = {0, 1, 2, 3, 7, 1, 5, 4, 7, 6, 2, 4, 0, 1}; glBufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(indices), indices, GL_STATIC_DRAW); Drawing the skybox: glClearColor(0.5f, 0.5f, 0.5f, 1); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glUseProgram(m_programSkyBox.Program); glDisable(GL_D
kuetli
2016-08-23
1
1
No more~