Professional Documents
Culture Documents
h>
#include <GLFW/glfw3.h>
#define STB_IMAGE_IMPLEMENTATION
#include <stb_image.h>
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <learnopengl/shader.h>
#include <learnopengl/camera.h>
#include <iostream>
#define PI 3.14159265
// settings
const unsigned int SCR_WIDTH = 800;
const unsigned int SCR_HEIGHT = 600;
const float impact_radius =4 ;
int count1 = 0;
int topToggle = 1;
// camera
Camera camera(glm::vec3(0.0f, 0.0f, 3.0f));
float lastX = SCR_WIDTH / 2.0f;
float lastY = SCR_HEIGHT / 2.0f;
//bool firstMouse = true;
// toggle
int toggle = 1 ;
int win = 0;
// points
int Points[] = { 0,0 };
};
glm::vec3 initialcubePositions[] = {
glm::vec3(0.0f, 0.0f, 0.0f),
glm::vec3(0.0f, 12.0f, 0.0f),
};
glm::vec3 ballPositions[] = {
glm::vec3(0.0f, 0.0f, 0.5f),
glm::vec3(0.0f, 12.0f, 0.5f),
};
//toope
//player1
float yaw1 = 0.0f;
float pitch1 = 0.0f;
//player2
float yaw2 = 0.0f;
float pitch2 = 0.0f;
// timing
float deltaTime = 0.0f; // time between current frame and last frame
float lastFrame = 0.0f;
int main()
{
// glfw: initialize and configure
// ------------------------------
glfwInit();
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
#ifdef __APPLE__
glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this
statement to fix compilation on OS X
#endif
// --------------------
GLFWwindow* window = glfwCreateWindow(SCR_WIDTH, SCR_HEIGHT, "LearnOpenGL",
NULL, NULL);
if (window == NULL)
{
std::cout << "Failed to create GLFW window" << std::endl;
glfwTerminate();
return -1;
}
glfwMakeContextCurrent(window);
glfwSetFramebufferSizeCallback(window, framebuffer_size_callback);
//glfwSetCursorPosCallback(window, mouse_callback);
glfwSetScrollCallback(window, scroll_callback);
float field[] = {
-6.0f, -6.0f, -0.5f, 0.0f, 0.0f,
6.0f, -6.0f, -0.5f, 1.0f, 0.0f,
6.0f, 20.0f, -0.5f, 1.0f, 1.0f,
6.0f, 20.0f, -0.5f, 1.0f, 1.0f,
-6.0f, 20.0f, -0.5f, 0.0f, 1.0f,
-6.0f, -6.0f, -0.5f, 0.0f, 0.0f, };
float vertices[] = {
-0.5f, -0.5f, -0.5f, 0.0f, 0.0f,
0.5f, -0.5f, -0.5f, 1.0f, 0.0f,
0.5f, 0.5f, -0.5f, 1.0f, 1.0f,
0.5f, 0.5f, -0.5f, 1.0f, 1.0f,
-0.5f, 0.5f, -0.5f, 0.0f, 1.0f,
-0.5f, -0.5f, -0.5f, 0.0f, 0.0f,
float launcher[] = {
-0.025f, 0.0f, -0.025f, 0.0f, 0.0f,
0.025f, 0.0f, -0.025f, 1.0f, 0.0f,
0.025f, 0.75f, -0.025f, 1.0f, 1.0f,
0.025f, 0.75f, -0.025f, 1.0f, 1.0f,
-0.025f, 0.75f, -0.025f, 0.0f, 1.0f,
-0.025f, 0.0f, -0.025f, 0.0f, 0.0f,
float missile[] = {
-0.025f, 0.0f, -0.025f, 0.0f, 0.0f,
0.025f, 0.0f, -0.025f, 1.0f, 0.0f,
0.025f, 0.025f, -0.025f, 1.0f, 1.0f,
0.025f, 0.025f, -0.025f, 1.0f, 1.0f,
-0.025f, 0.025f, -0.025f, 0.0f, 1.0f,
-0.025f, 0.0f, -0.025f, 0.0f, 0.0f,
glBindVertexArray(VAO);
/////tank
glBindBuffer(GL_ARRAY_BUFFER, VBO[0]);
glBufferData(GL_ARRAY_BUFFER, sizeof(vertices), vertices, GL_STATIC_DRAW);
// position attribute
glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 5 * sizeof(float), (void*)0);
glEnableVertexAttribArray(0);
// texture coord attribute
glVertexAttribPointer(1, 2, GL_FLOAT, GL_FALSE, 5 * sizeof(float), (void*)(3
* sizeof(float)));
glEnableVertexAttribArray(1);
//////launcher
glBindBuffer(GL_ARRAY_BUFFER, VBO[1]);
glBufferData(GL_ARRAY_BUFFER, sizeof(launcher), launcher, GL_STATIC_DRAW);
glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 5 * sizeof(float), (void*)0);
glEnableVertexAttribArray(0);
// texture coord attribute
glVertexAttribPointer(1, 2, GL_FLOAT, GL_FALSE, 5 * sizeof(float), (void*)(3
* sizeof(float)));
glEnableVertexAttribArray(1);
/////missile
glBindBuffer(GL_ARRAY_BUFFER, VBO[2]);
glBufferData(GL_ARRAY_BUFFER, sizeof(missile), missile, GL_STATIC_DRAW);
glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 5 * sizeof(float), (void*)0);
glEnableVertexAttribArray(0);
// texture coord attribute
glVertexAttribPointer(1, 2, GL_FLOAT, GL_FALSE, 5 * sizeof(float), (void*)(3
* sizeof(float)));
glEnableVertexAttribArray(1);
////feild
glBindBuffer(GL_ARRAY_BUFFER, VBO[3]);
glBufferData(GL_ARRAY_BUFFER, sizeof(field), field, GL_STATIC_DRAW);
glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 5 * sizeof(float), (void*)0);
glEnableVertexAttribArray(0);
// texture coord attribute
glVertexAttribPointer(1, 2, GL_FLOAT, GL_FALSE, 5 * sizeof(float), (void*)(3
* sizeof(float)));
glEnableVertexAttribArray(1);
// load and create a texture
// -------------------------
unsigned int texture1, texture2, texture3,texture4,texture5,texture6;
// texture 1
// ---------
glGenTextures(1, &texture1);
glBindTexture(GL_TEXTURE_2D, texture1);
// set the texture wrapping parameters
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
// set texture filtering parameters
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
// load image, create texture and generate mipmaps
int width, height, nrChannels;
stbi_set_flip_vertically_on_load(true); // tell stb_image.h to flip loaded
texture's on the y-axis.
unsigned char *data = stbi_load("C:\\Users\\HP Pavilion\\Desktop\\army
color.jpg", &width, &height, &nrChannels, 0);
if (data)
{
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, width, height, 0, GL_RGB,
GL_UNSIGNED_BYTE, data);
glGenerateMipmap(GL_TEXTURE_2D);
}
else
{
std::cout << "Failed to load texture" << std::endl;
}
stbi_image_free(data);
// texture 2
// ---------
glGenTextures(1, &texture2);
glBindTexture(GL_TEXTURE_2D, texture2);
// set the texture wrapping parameters
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
// set texture filtering parameters
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
// load image, create texture and generate mipmaps
data = stbi_load("C:\\Users\\HP Pavilion\\Desktop\\toope.jpg", &width,
&height, &nrChannels, 0);
if (data)
{
// note that the awesomeface.png has transparency and thus an alpha
channel, so make sure to tell OpenGL the data type is of GL_RGBA
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, width, height, 0, GL_RGB,
GL_UNSIGNED_BYTE, data);
glGenerateMipmap(GL_TEXTURE_2D);
}
else
{
std::cout << "Failed to load texture" << std::endl;
}
stbi_image_free(data);
// texture3
glGenTextures(1, &texture3);
glBindTexture(GL_TEXTURE_2D, texture3);
// set the texture wrapping parameters
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
// set texture filtering parameters
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
// load image, create texture and generate mipmaps
//texture 4
glGenTextures(1, &texture4);
glBindTexture(GL_TEXTURE_2D, texture4);
// set the texture wrapping parameters
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
// set texture filtering parameters
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
// load image, create texture and generate mipmaps
//texture5
glGenTextures(1, &texture5);
glBindTexture(GL_TEXTURE_2D, texture5);
// set the texture wrapping parameters
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
// set texture filtering parameters
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
// load image, create texture and generate mipmaps
//texture6
glGenTextures(1, &texture6);
glBindTexture(GL_TEXTURE_2D, texture6);
// set the texture wrapping parameters
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
// set texture filtering parameters
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
// load image, create texture and generate mipmaps
//stbi_set_flip_vertically_on_load(true); // tell stb_image.h to flip loaded
texture's on the y-axis.
data = stbi_load("C:\\Users\\HP Pavilion\\Desktop\\2 WINS.png", &width,
&height, &nrChannels, 0);
if (data)
{
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, width, height, 0, GL_RGB,
GL_UNSIGNED_BYTE, data);
glGenerateMipmap(GL_TEXTURE_2D);
}
else
{
std::cout << "Failed to load texture" << std::endl;
}
stbi_image_free(data);
// tell opengl for each sampler to which texture unit it belongs to (only has
to be done once)
//
-----------------------------------------------------------------------------------
--------
ourShader.use();
ourShader.setInt("texture1", 0);
ourShader.setInt("texture2", 1);
ourShader.setInt("texture3", 2);
ourShader.setInt("texture4", 3);
ourShader.setInt("texture5", 4);
ourShader.setInt("texture6", 5);
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////
// input
// -----
processInput(window);
// render
// ------
glClearColor(0.2f, 0.3f, 0.3f, 1.0f);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
// pass projection matrix to shader (note that in this case it could change
every frame)
glm::mat4 projection = glm::perspective(glm::radians(camera.Zoom),
(float)SCR_WIDTH / (float)SCR_HEIGHT, 0.1f, 100.0f);
ourShader.setMat4("projection", projection);
// camera/view transformation
glm::mat4 view = camera.GetViewMatrix();
camera.viewsetter(toggle, cubePositions[0], cubePositions[1]);
ourShader.setMat4("view", view);
// render boxes
glBindVertexArray(VAO);
for (unsigned int i = 0; i < 2; i++)
{
if (i == 0) {
glm::mat4 model = glm::mat4(1.0f); // make sure to initialize
matrix to identity matrix first
model = glm::translate(model, cubePositions[i]);
model = glm::rotate(model, glm::radians(0.0f), glm::vec3(1.0f,
0.0f, 0.0f));
ourShader.setMat4("model", model);
}
if (i == 1) {
glm::mat4 model1 = glm::mat4(1.0f);
model1 = glm::translate(model1, cubePositions[i]);
model1 = glm::rotate(model1, glm::radians(180.0f),
glm::vec3(1.0f, 0.0f, 0.0f));
ourShader.setMat4("model", model1);
}
ourShader.setInt("id", 1);
glBindBuffer(GL_ARRAY_BUFFER, VBO[0]);
glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 5 * sizeof(float),
(void*)0);
glEnableVertexAttribArray(0);
glVertexAttribPointer(1, 2, GL_FLOAT, GL_FALSE, 5 * sizeof(float),
(void*)(3 * sizeof(float)));
glEnableVertexAttribArray(1);
glDrawArrays(GL_TRIANGLES, 0, 36);
ourShader.setInt("id", 2);
glBindBuffer(GL_ARRAY_BUFFER, VBO[1]);
glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 5 * sizeof(float),
(void*)0);
glEnableVertexAttribArray(0);
glVertexAttribPointer(1, 2, GL_FLOAT, GL_FALSE, 5 * sizeof(float),
(void*)(3 * sizeof(float)));
glEnableVertexAttribArray(1);
glDrawArrays(GL_TRIANGLES, 0, 36);
}
// glfw: swap buffers and poll IO events (keys pressed/released, mouse moved
etc.)
//
-------------------------------------------------------------------------------
glfwSwapBuffers(window);
glfwPollEvents();
int count = 0;
int ball1 = 0;
int ball2 = 0;
int ballspeed = 1;
float g = 9.80;
// input
// -----
processInput(window);
// render
// ------
glClearColor(0.2f, 0.3f, 0.3f, 1.0f);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
// activate shader
ourShader.use();
// camera/view transformation
// render boxes
glBindVertexArray(VAO);
ourShader.setInt("id", 4);
if (i == 0) {
ourShader.setInt("id", 1);
ourShader.setInt("id", 2);
glm::mat4 modelt = glm::mat4(1.0f);// make sure to
initialize matrix to identity matrix first
modelt = glm::translate(modelt, glm::vec3(cubePositions[i]
[0], cubePositions[i][1], cubePositions[i][2]+0.5f));
modelt = glm::rotate(modelt, glm::radians(float(yaw1)),
glm::vec3(0.0f, 0.0f, 1.0f));
modelt = glm::rotate(modelt, glm::radians(float(pitch1)),
glm::vec3(1.0f, 0.0f, 0.0f));
ourShader.setMat4("model", modelt);
glBindBuffer(GL_ARRAY_BUFFER, VBO[1]);
glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 5 *
sizeof(float), (void*)0);
glEnableVertexAttribArray(0);
glVertexAttribPointer(1, 2, GL_FLOAT, GL_FALSE, 5 *
sizeof(float), (void*)(3 * sizeof(float)));
glEnableVertexAttribArray(1);
glDrawArrays(GL_TRIANGLES, 0, 36);
}
if (i == 1) {
ourShader.setInt("id", 1);
ourShader.setInt("id", 2);
glm::mat4 modelt1 = glm::mat4(1.0f);
modelt1 = glm::translate(modelt1,
glm::vec3(cubePositions[i][0], cubePositions[i][1], cubePositions[i][2] + 0.5f));
modelt1 = glm::rotate(modelt1, glm::radians(float(yaw2)),
glm::vec3(0.0f, 0.0f, 1.0f));
modelt1 = glm::rotate(modelt1, glm::radians(float(pitch2)),
glm::vec3(1.0f, 0.0f, 0.0f));
modelt1 = glm::rotate(modelt1, glm::radians(180.0f),
glm::vec3(1.0f, 0.0f, 0.0f));
ourShader.setMat4("model", modelt1);
glBindBuffer(GL_ARRAY_BUFFER, VBO[1]);
glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 5 *
sizeof(float), (void*)0);
glEnableVertexAttribArray(0);
glVertexAttribPointer(1, 2, GL_FLOAT, GL_FALSE, 5 *
sizeof(float), (void*)(3 * sizeof(float)));
glEnableVertexAttribArray(1);
glDrawArrays(GL_TRIANGLES, 0, 36);
}
}
//std::cout << Points[0];
//std::cout << Points[1];
//std::cout << "\n\0";
if (ball1)
{
ourShader.setInt("id", 3);
glm::mat4 model3 = glm::mat4(1.0f); // make sure to initialize matrix
to identity matrix first
model3 = glm::translate(model3, ballPositions[0]);
model3 = glm::rotate(model3, glm::radians(0.0f), glm::vec3(1.0f,
0.0f, 0.0f));
ourShader.setMat4("model", model3);
glBindBuffer(GL_ARRAY_BUFFER, VBO[2]);
glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 5 *
sizeof(float), (void*)0);
glEnableVertexAttribArray(0);
glVertexAttribPointer(1, 2, GL_FLOAT, GL_FALSE, 5 *
sizeof(float), (void*)(3 * sizeof(float)));
glEnableVertexAttribArray(1);
glDrawArrays(GL_TRIANGLES, 0, 36);
ballPositions[0][0] += ball1velocity[0] * deltaTime;
ballPositions[0][1] += ball1velocity[1] * deltaTime;
ballPositions[0][2] += ball1velocity[2] * deltaTime;
ball1velocity[2] -= g*deltaTime ;
}
}
ballPositions[0] = initialcubePositions[0];
if (ball2) {
ourShader.setInt("id", 3);
glm::mat4 model4 = glm::mat4(1.0f); // make sure to initialize
matrix to identity matrix first
model4 = glm::translate(model4, ballPositions[1]);
model4 = glm::rotate(model4, glm::radians(180.0f),
glm::vec3(1.0f, 0.0f, 0.0f));
ourShader.setMat4("model", model4);
glBindBuffer(GL_ARRAY_BUFFER, VBO[2]);
glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 5 *
sizeof(float), (void*)0);
glEnableVertexAttribArray(0);
glVertexAttribPointer(1, 2, GL_FLOAT, GL_FALSE, 5 *
sizeof(float), (void*)(3 * sizeof(float)));
glEnableVertexAttribArray(1);
glDrawArrays(GL_TRIANGLES, 0, 36);
ballPositions[1][0] += ball2velocity[0] * deltaTime;
ballPositions[1][1] += ball2velocity[1] * deltaTime;
ballPositions[1][2] += ball2velocity[2] * deltaTime;
ball2velocity[2] -= g * deltaTime;
ballPositions[1] = initialcubePositions[1];
if (win == 1)
{
ourShader.setInt("id", 5);
glm::mat4 model6 = glm::mat4(1.0f); // make sure to initialize
matrix to identity matrix first
model6 = glm::translate(model6, glm::vec3(0.0f, 6.0f, 2.0f));
model6 = glm::rotate(model6, glm::radians(0.0f), glm::vec3(1.0f,
0.0f, 0.0f));
ourShader.setMat4("model", model6);
glBindBuffer(GL_ARRAY_BUFFER, VBO[0]);
glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 5 *
sizeof(float), (void*)0);
glEnableVertexAttribArray(0);
glVertexAttribPointer(1, 2, GL_FLOAT, GL_FALSE, 5 *
sizeof(float), (void*)(3 * sizeof(float)));
glEnableVertexAttribArray(1);
glDrawArrays(GL_TRIANGLES, 0, 36);
}
if (win == 2)
{
ourShader.setInt("id", 6);
glm::mat4 model7 = glm::mat4(1.0f); // make sure to initialize
matrix to identity matrix first
model7 = glm::translate(model7, glm::vec3(0.0f, 6.0f, 2.0f));
model7 = glm::rotate(model7, glm::radians(0.0f), glm::vec3(1.0f,
0.0f, 0.0f));
ourShader.setMat4("model", model7);
glBindBuffer(GL_ARRAY_BUFFER, VBO[0]);
glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 5 *
sizeof(float), (void*)0);
glEnableVertexAttribArray(0);
glVertexAttribPointer(1, 2, GL_FLOAT, GL_FALSE, 5 *
sizeof(float), (void*)(3 * sizeof(float)));
glEnableVertexAttribArray(1);
glDrawArrays(GL_TRIANGLES, 0, 36);
}
ballspeed = 20;
if (toggle == int(1))
{
ball1velocity = glm::vec3(-cos(PI*pitch1 /
180.0)*sin(PI*yaw1 / 180.0)*ballspeed, cos(PI*pitch1 / 180.0)*cos(PI*yaw1 /
180.0)*ballspeed, sin(PI*pitch1/180.0)*ballspeed);
ball1 = 1;
toggle = int(2);
}
else if (toggle == int(2))
{
ball2velocity = glm::vec3(cos(-PI*pitch2 /
180.0)*sin(PI*yaw2 / 180.0)*ballspeed, -cos(-PI*pitch2 / 180.0)*cos(PI*yaw2 /
180.0)*ballspeed, sin(-PI*pitch2/ 180.0)*ballspeed);
ball2 = 1;
toggle = int(1);
// process all input: query GLFW whether relevant keys are pressed/released this
frame and react accordingly
//
-----------------------------------------------------------------------------------
----------------------
void processInput(GLFWwindow *window)
{
}
if ((glfwGetKey(window, GLFW_KEY_J) == GLFW_PRESS) && (!(win)))
{
float velocity = speedt * deltaTime;
if (toggle == 1)
{
yaw1 -= velocity;
}
if (toggle == 2)
{
yaw2 -= velocity;
}
}
}
}
// glfw: whenever the window size changed (by OS or user resize) this callback
function executes
//
-----------------------------------------------------------------------------------
----------
void framebuffer_size_callback(GLFWwindow* window, int width, int height)
{
// make sure the viewport matches the new window dimensions; note that width
and
// height will be significantly larger than specified on retina displays.
glViewport(0, 0, width, height);
}
camera.ProcessMouseMovement(xoffset, yoffset);
}*/
// glfw: whenever the mouse scroll wheel scrolls, this callback is called
// ----------------------------------------------------------------------
void scroll_callback(GLFWwindow* window, double xoffset, double yoffset)
{
camera.ProcessMouseScroll(yoffset);
}
//"C:\\Users\\HP Pavilion\\Desktop\\OpenGLRoot\\External
Resouces\\textureshadervs.txt", "C:\\Users\\HP
Pavilion\\Desktop\\OpenGLRoot\\External Resouces\\textureshaderfs.txt"
//"C:\\Users\\HP Pavilion\\Desktop\\container.jpg"
//"C:\\Users\\HP Pavilion\\Pictures\\Saved Pictures\\images.jpg"
//#define STB_IMAGE_IMPLEMENTATION