mirror of
https://github.com/kuhyx/engineer-thesis-WUT.git
synced 2026-11-22 16:32:24 +01:00
chore: finish adding const
This commit is contained in:
parent
f8854f4bfa
commit
7225191a23
2
.vscode/tasks.json
vendored
2
.vscode/tasks.json
vendored
@ -2,7 +2,7 @@
|
|||||||
"tasks": [
|
"tasks": [
|
||||||
{
|
{
|
||||||
"type": "cppbuild",
|
"type": "cppbuild",
|
||||||
"label": "C/C++: g++-11 build active file",
|
"label": "C/C++: g++-20 build active file",
|
||||||
"command": "/usr/bin/g++",
|
"command": "/usr/bin/g++",
|
||||||
"args": [
|
"args": [
|
||||||
"-g",
|
"-g",
|
||||||
|
|||||||
Binary file not shown.
@ -89,7 +89,7 @@ unsigned int generateBindVAO()
|
|||||||
return vertexArrayObject;
|
return vertexArrayObject;
|
||||||
}
|
}
|
||||||
|
|
||||||
void copyVerticesArray(unsigned int vertexBufferObject, const float vertices[], const size_t sizeOfVertices, const GLenum boundBufferTarget)
|
void copyVerticesArray(const unsigned int vertexBufferObject, const float vertices[], const size_t sizeOfVertices, const GLenum boundBufferTarget)
|
||||||
{
|
{
|
||||||
// copy vertices array in array useful for OGL
|
// copy vertices array in array useful for OGL
|
||||||
glBindBuffer(boundBufferTarget, vertexBufferObject);
|
glBindBuffer(boundBufferTarget, vertexBufferObject);
|
||||||
|
|||||||
@ -6,13 +6,12 @@
|
|||||||
#include "constants.hpp"
|
#include "constants.hpp"
|
||||||
#include "misc.hpp"
|
#include "misc.hpp"
|
||||||
|
|
||||||
unsigned int linkShaderObjectsShaderProgram(unsigned int vertexShaders, unsigned int fragmentShader)
|
unsigned int linkShaderObjectsShaderProgram(const unsigned int vertexShaders, const unsigned int fragmentShader)
|
||||||
{
|
{
|
||||||
// link shader objects into shader program
|
// link shader objects into shader program
|
||||||
// will store shader program id
|
// will store shader program id
|
||||||
unsigned int shaderProgram;
|
|
||||||
// creates program
|
// creates program
|
||||||
shaderProgram = glCreateProgram();
|
const unsigned int shaderProgram = glCreateProgram();
|
||||||
|
|
||||||
// attachShaders
|
// attachShaders
|
||||||
glAttachShader(shaderProgram, vertexShaders);
|
glAttachShader(shaderProgram, vertexShaders);
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
#include <GLFW/glfw3.h>
|
#include <GLFW/glfw3.h>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
unsigned int linkShaderObjectsShaderProgram(unsigned int vertexShaders, unsigned int fragmentShader);
|
unsigned int linkShaderObjectsShaderProgram(const unsigned int vertexShaders, const unsigned int fragmentShader);
|
||||||
std::pair<unsigned int, unsigned int> compileShaders();
|
std::pair<unsigned int, unsigned int> compileShaders();
|
||||||
unsigned int compileShader(const GLenum shaderType, const char *shaderSource);
|
unsigned int compileShader(const GLenum shaderType, const char *shaderSource);
|
||||||
int shaderCompilationSuccessful(const unsigned int shader);
|
int shaderCompilationSuccessful(const unsigned int shader);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user