mirror of
https://github.com/kuhyx/engineer-thesis-WUT.git
synced 2026-07-04 13:03:07 +02: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": [
|
||||
{
|
||||
"type": "cppbuild",
|
||||
"label": "C/C++: g++-11 build active file",
|
||||
"label": "C/C++: g++-20 build active file",
|
||||
"command": "/usr/bin/g++",
|
||||
"args": [
|
||||
"-g",
|
||||
|
||||
Binary file not shown.
@ -89,7 +89,7 @@ unsigned int generateBindVAO()
|
||||
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
|
||||
glBindBuffer(boundBufferTarget, vertexBufferObject);
|
||||
|
||||
@ -6,13 +6,12 @@
|
||||
#include "constants.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
|
||||
// will store shader program id
|
||||
unsigned int shaderProgram;
|
||||
// creates program
|
||||
shaderProgram = glCreateProgram();
|
||||
const unsigned int shaderProgram = glCreateProgram();
|
||||
|
||||
// attachShaders
|
||||
glAttachShader(shaderProgram, vertexShaders);
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
#include <GLFW/glfw3.h>
|
||||
#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();
|
||||
unsigned int compileShader(const GLenum shaderType, const char *shaderSource);
|
||||
int shaderCompilationSuccessful(const unsigned int shader);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user