@@ -195,7 +195,7 @@ First create a build directory (we do not recommend in-source builds):
195195> cd build
196196```
197197
198- Configure * glbinding * with your prefered or default generator, e.g., for Visual Studio 2015 in x64 use
198+ Configure * globjects * with your prefered or default generator, e.g., for Visual Studio 2015 in x64 use
199199(note: some IDEs have integrated support for CMake projects, e.g., Qt Creator, and allow you to skip the manual project configuration):
200200``` shell
201201> cmake .. -G " Visual Studio 14 2015 Win64"
@@ -216,7 +216,7 @@ In the projects CMakeLists.txt, add one of the following lines:
216216find_package(globjects QUIET) # if you want to check for existance
217217find_package(globjects REQUIRED) # if it is really required in your project
218218```
219- Finally, just link glbinding to your own library or executable:
219+ Finally, just link globjects to your own library or executable:
220220```
221221target_link_libraries(${target} ... PUBLIC globjects::globjects)
222222```
@@ -262,15 +262,15 @@ int numExtensions = getInteger(GL_NUM_EXTENSIONS);
262262
263263if (isCoreProfile())
264264{
265- return renderer();
265+ return renderer(); // returns the GL_RENDERER string
266266}
267267```
268268
269269##### Buffer
270270
271271A buffer in means of OpenGL can be used for vertex attributes, indices, uniform data, atomic counters, texture data, and shader storage data.
272272``` cpp
273- Buffer * buffer = new Buffer();
273+ auto buffer = new Buffer();
274274
275275// Using buffer data
276276buffer->setData ({{ 0, 1, 2, 3, 4}}, GL_STATIC_DRAW);
@@ -286,7 +286,7 @@ buffer->bindBase(GL_SHADER_STORAGE_BUFFER, 0);
286286
287287Texture supports both traditional interfaces and bindless support.
288288```cpp
289- Texture * texture1 = new Texture(GL_TEXTURE_2D); // type has to be fix during lifetime
289+ auto texture1 = new Texture(GL_TEXTURE_2D); // type has to be fix during lifetime
290290texture1->setParameter(GL_TEXTURE_MIN_FILTER, GL_LINEAR);
291291texture1->setParameter(GL_TEXTURE_MAG_FILTER, GL_LINEAR);
292292texture1->setParameter(GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
@@ -296,7 +296,7 @@ texture1->image2D(0, GL_RGBA8, glm::ivec2(512), 0, GL_RGBA, GL_UNSIGNED_BYTE, nu
296296texture1->clearImage(0, GL_RGBA, GL_UNSIGNED_BYTE, glm::ivec4(255, 255, 255, 255));
297297texture1->generateMipMap();
298298
299- Texture * texture2 = Texture::createDefault(); // creates a default-configured 2D texture
299+ auto texture2 = Texture::createDefault(); // creates a default-configured 2D texture
300300
301301auto handle = texture2->textureHandle(); // for bindless texturing
302302texture2->bindActive(0); // For traditional texturing
@@ -306,13 +306,13 @@ texture2->bindActive(0); // For traditional texturing
306306
307307OpenGL state is wrapped as States, StateSettings and Capabilities, where the latter two are mainly used internally.
308308``` cpp
309- State * currentState = State::currentState(); // full current state; usable for resetting
309+ auto currentState = State::currentState(); // full current state; usable for resetting
310310
311- State * state1 = new State(State::ImmediateMode); // all changes are applied immediately
311+ auto state1 = new State(State::ImmediateMode); // all changes are applied immediately
312312state1->enable (GL_RASTERIZER_DISCARD); // Configuring a Capability
313313state1->primitiveRestartIndex(static_cast<GLuint >(-1)); // Configuring a StateSetting
314314
315- State * state2 = new State(State::DeferredMode); // changes has to be applied explicitly
315+ auto state2 = new State(State::DeferredMode); // changes has to be applied explicitly
316316state2->pointSize(10.0f);
317317state2->apply();
318318
@@ -322,7 +322,7 @@ currentState->apply(); // Reset manipulated state
322322##### Error
323323
324324```cpp
325- Error error = Error::get();
325+ auto error = Error::get();
326326
327327if (error)
328328{
0 commit comments