mirror of
https://github.com/JoeyDeVries/LearnOpenGL.git
synced 2026-01-30 20:13:22 +08:00
Code/content re-work: getting started.
This commit is contained in:
@@ -20,19 +20,20 @@ void processInput(GLFWwindow *window);
|
||||
unsigned int loadTexture(const char *path);
|
||||
void renderSphere();
|
||||
|
||||
// settings
|
||||
const unsigned int SCR_WIDTH = 1280;
|
||||
const unsigned int SCR_HEIGHT = 720;
|
||||
|
||||
// camera
|
||||
Camera camera(glm::vec3(0.0f, 0.0f, 3.0f));
|
||||
float lastX = 800.0f / 2.0;
|
||||
float lastY = 600.0 / 2.0;
|
||||
bool firstMouse = true;
|
||||
|
||||
// timing
|
||||
float deltaTime = 0.0f;
|
||||
float lastFrame = 0.0f;
|
||||
|
||||
// settings
|
||||
const unsigned int SCR_WIDTH = 1280;
|
||||
const unsigned int SCR_HEIGHT = 720;
|
||||
|
||||
int main()
|
||||
{
|
||||
// glfw: initialize and configure
|
||||
|
||||
@@ -20,19 +20,20 @@ void processInput(GLFWwindow *window);
|
||||
unsigned int loadTexture(const char *path);
|
||||
void renderSphere();
|
||||
|
||||
// settings
|
||||
const unsigned int SCR_WIDTH = 1280;
|
||||
const unsigned int SCR_HEIGHT = 720;
|
||||
|
||||
// camera
|
||||
Camera camera(glm::vec3(0.0f, 0.0f, 3.0f));
|
||||
float lastX = 800.0f / 2.0;
|
||||
float lastY = 600.0 / 2.0;
|
||||
bool firstMouse = true;
|
||||
|
||||
// timing
|
||||
float deltaTime = 0.0f;
|
||||
float lastFrame = 0.0f;
|
||||
|
||||
// settings
|
||||
const unsigned int SCR_WIDTH = 1280;
|
||||
const unsigned int SCR_HEIGHT = 720;
|
||||
|
||||
int main()
|
||||
{
|
||||
// glfw: initialize and configure
|
||||
|
||||
@@ -20,19 +20,20 @@ void processInput(GLFWwindow *window);
|
||||
void renderSphere();
|
||||
void renderCube();
|
||||
|
||||
// settings
|
||||
const unsigned int SCR_WIDTH = 1280;
|
||||
const unsigned int SCR_HEIGHT = 720;
|
||||
|
||||
// camera
|
||||
Camera camera(glm::vec3(0.0f, 0.0f, 3.0f));
|
||||
float lastX = 800.0f / 2.0;
|
||||
float lastY = 600.0 / 2.0;
|
||||
bool firstMouse = true;
|
||||
|
||||
// timing
|
||||
float deltaTime = 0.0f;
|
||||
float lastFrame = 0.0f;
|
||||
|
||||
// settings
|
||||
const unsigned int SCR_WIDTH = 1280;
|
||||
const unsigned int SCR_HEIGHT = 720;
|
||||
|
||||
int main()
|
||||
{
|
||||
// glfw: initialize and configure
|
||||
|
||||
@@ -20,19 +20,20 @@ void processInput(GLFWwindow *window);
|
||||
void renderSphere();
|
||||
void renderCube();
|
||||
|
||||
// settings
|
||||
const unsigned int SCR_WIDTH = 1280;
|
||||
const unsigned int SCR_HEIGHT = 720;
|
||||
|
||||
// camera
|
||||
Camera camera(glm::vec3(0.0f, 0.0f, 3.0f));
|
||||
float lastX = 800.0f / 2.0;
|
||||
float lastY = 600.0 / 2.0;
|
||||
bool firstMouse = true;
|
||||
|
||||
// timing
|
||||
float deltaTime = 0.0f;
|
||||
float lastFrame = 0.0f;
|
||||
|
||||
// settings
|
||||
const unsigned int SCR_WIDTH = 1280;
|
||||
const unsigned int SCR_HEIGHT = 720;
|
||||
|
||||
int main()
|
||||
{
|
||||
// glfw: initialize and configure
|
||||
|
||||
@@ -21,19 +21,20 @@ void renderSphere();
|
||||
void renderCube();
|
||||
void renderQuad();
|
||||
|
||||
// settings
|
||||
const unsigned int SCR_WIDTH = 1280;
|
||||
const unsigned int SCR_HEIGHT = 720;
|
||||
|
||||
// camera
|
||||
Camera camera(glm::vec3(0.0f, 0.0f, 3.0f));
|
||||
float lastX = 800.0f / 2.0;
|
||||
float lastY = 600.0 / 2.0;
|
||||
bool firstMouse = true;
|
||||
|
||||
// timing
|
||||
float deltaTime = 0.0f;
|
||||
float lastFrame = 0.0f;
|
||||
|
||||
// settings
|
||||
const unsigned int SCR_WIDTH = 1280;
|
||||
const unsigned int SCR_HEIGHT = 720;
|
||||
|
||||
int main()
|
||||
{
|
||||
// glfw: initialize and configure
|
||||
|
||||
@@ -22,19 +22,20 @@ void renderSphere();
|
||||
void renderCube();
|
||||
void renderQuad();
|
||||
|
||||
// settings
|
||||
const unsigned int SCR_WIDTH = 1280;
|
||||
const unsigned int SCR_HEIGHT = 720;
|
||||
|
||||
// camera
|
||||
Camera camera(glm::vec3(0.0f, 0.0f, 3.0f));
|
||||
float lastX = 800.0f / 2.0;
|
||||
float lastY = 600.0 / 2.0;
|
||||
bool firstMouse = true;
|
||||
|
||||
// timing
|
||||
float deltaTime = 0.0f;
|
||||
float lastFrame = 0.0f;
|
||||
|
||||
// settings
|
||||
const unsigned int SCR_WIDTH = 1280;
|
||||
const unsigned int SCR_HEIGHT = 720;
|
||||
|
||||
int main()
|
||||
{
|
||||
// glfw: initialize and configure
|
||||
|
||||
Reference in New Issue
Block a user