OpenGL is a graphics standard and API which targets the Desktop, workstation and mobile markets. It is designed to be easy to accelerate with dedicated computer hardware, and hence most implementations give greatly improved performance over traditional software rendering. OpenGL is used for ...
2
votes
0answers
49 views
OpenGL Shape class constructor
I'm coding a wrapper for OpenGL 3.3, and I have some questions about the design of my Shape class. To be short, It's a class that englobes a VBO, a VAO, and an EBO ...
4
votes
1answer
49 views
C++ OpenGLBuffer class, wrapper around the raw OpenGL api
I am trying to code a thin wrapper around the OpenGL so I can use it more convenient. This class is not 100% done yet, but I don't want to do all typing for nothing. And I think the design is clear. I ...
3
votes
1answer
79 views
Chip 8 Emulator
I've recently started learning OpenGL and thought that a great way to start using it in its simplest form would be to create a Chip8 emulator using the keyboard callbacks and graphics that GLFW and ...
1
vote
0answers
72 views
C++ OpenGL3.3 wrapper
To learn OpenGL, I am writing a little wrapper using the (almost) latest C++ standard. I would like a review on the shape and ...
3
votes
1answer
140 views
4x4 matrix implementation in C++
I've been doing some 3D graphics in OpenGL lately and I needed a way to work with 4x4 matrices. My implementation supports the following operations:
Matrix-matrix addition.
Matrix-matrix subtraction.
...
5
votes
1answer
75 views
Game of Life implementation is too slow
I was tasked with implementing Conway's Game of Life. It seems to work fine but the implementation is lacking as I find that it takes a long time to generate the next generation of the grid. I'm ...
2
votes
2answers
77 views
Hello Triangle in Win32 and OpenGL
At the moment, I'm trying to get some experience writing C++, Win32 and OpenGL, so I decided to implement a "Hello World" of sorts. However, instead of printing ...
4
votes
1answer
92 views
Efficient visualization of large number of particles using openGL
I have been looking into using some software to perform industrial-scale DEM simulations. These type of simulations will require millions of particles to be simulated.
Currently, the software I ...
5
votes
1answer
225 views
C++ OpenGL Snake clone
I have made a multi-platform Snake clone in C++ using OpenGL and GLUT. I am a beginner in graphic game development. I would like to add more features, but I have programmed the base game so far. I ...
1
vote
0answers
23 views
Improving rendering of JOGL
I'm trying to use JOGL and Java to draw a hexagonal based game. I currently have it so that it displays correctly, however it seems to run poorly and needs optimization.
Currently I create a glList ...
2
votes
0answers
58 views
API design for loading OpenGL textures asynchronously
What do you think about this API for loading OpenGL textures asynchronously?
My main concern is that the loader class executes code on the client io_service. This takes away some control from the ...
12
votes
1answer
111 views
7
votes
2answers
322 views
Simple OpenGL image viewer in C
I'm making an image viewer and before I continue development I want to make sure I haven't done anything bad. In particular, I was wondering if my error handling is sane.
Most of the code is OpenGL/...
4
votes
1answer
131 views
Game engine/C++11 software 3D renderer/WebGL library
I am a graphics programmer and was wondering about my code quality.
I selected these three examples:
Game engine, which uses OpenGL and has a lot of other non-graphics code
A 3D software renderer, ...
10
votes
2answers
180 views
OpenGL shader class
I'm working my way through some basic OpenGL tutorials and have decided to offload the shader loading/compiling/linking to a separate object that I'll use for the remainder of the tutorial material. ...
3
votes
1answer
128 views
OpenGL program / animation
I have been playing around with OpenGL and created a fairly basic 2D animation was just hoping someone could take a look and give me some pointers.
Main.cpp:
...
2
votes
1answer
139 views
Implementing a sprite batch in OpenGL
I wrote a simple 2D renderer in OpenGL that works pretty well. I can render about 16,000k sprites in 1 draw call if it uses the same texture. I wanted to refactor this code out and put it in its own ...
3
votes
2answers
260 views
OpenGL mesh renderer implementation
I'm writing a C++ game engine and I have a Renderer class that I'd like to present as a code example to a team that are interested in my skills.
The renderer is ...
1
vote
1answer
102 views
Basic OpenGL drawing shapes
I'm drawing shapes to OpenGL using the standard commands and function calls to OpenGL. Everything works fine, however since this is a learning process I know sometimes what works in theory and using ...
6
votes
1answer
278 views
Simple OpenGL-2D Program
I have created mini-opengl program that draw simple chess board on screen by using SFML windows model only. The program runs fine. The main purpose of this program is to keep it as simple as possible ...
15
votes
1answer
461 views
Battle Tanks game
I created a simple 2D game that I made for myself in C++ with SDL2.0 + OpenGL + Box2D, but I'm insecure about the code and structure because I developed the game using everything I've learned on the ...
5
votes
1answer
62 views
Initializing an EGL display
I'm somewhat new to writing real-world projects in C, so I'm not familiar with best practices and standards. I'm writing code dealing with EGL and OpenGL, and some setup calls might fail for reasons ...
3
votes
1answer
251 views
Efficient C++ Resource Manager
This is my final attempt of making an efficient ResourceManager class, which takes care of allocating OpenGL objects (like Shader, Textures, Meshes, ...). It stores ...
4
votes
2answers
115 views
Draw multiple objects
The OpenGL tutorial that I was following only used a single model to demonstrate various points. I wanted to draw more than one model. After some research, I came to the conclusion that I needed to ...
0
votes
1answer
131 views
Simple rendering system in OpenGL
Recently, I added this 'batch' based rendering system in my game engine, which takes care of rendering Spatials (those are actually wrappers for a mesh and a ...
4
votes
1answer
373 views
2D Points painting program in C++
I've written a simple program in C++ to practice OpenGL. It takes a set of numbers through stdin and then plots it in Decartes coordinate system with x for position ...
4
votes
1answer
110 views
8 shades of grey (sliding puzzle)
I've written a smaller version of 15 puzzle in C, using OpenGL 3.3 and freeglut. I've found a place you can play it online to get familiar. I'm new to OpenGL, so I have no idea if I'm doing this in ...
1
vote
2answers
219 views
Node-based rendering
Recently, I started wrapping Meshes and Transform classes into new ones, but by doing this I came upon a problem: I needed to ...
3
votes
1answer
164 views
Simple CubeMap opengl wrapper class
I recently added this CubeMap class to my engine to make handling skyboxes easier. I would like to ask if my OpenGL coding semantics are good, and if I could ...
3
votes
1answer
73 views
Graphic object class
I am trying to implement graphic objects that can be either Sprite, Base, Point or some ...
3
votes
1answer
151 views
Basic OpenGL Renderer
I recently added this ShaderBatch to my engine, which takes care of rendering objects which share the same render technique (shader), like billboards and lights. I ...
3
votes
0answers
42 views
Calculating OpenGL view matrices
I'd like a little help here calculating the view matrix for OpenGL based on the lookat type function:
...
3
votes
1answer
213 views
Drawing a colored rectangle on-screen
I have made my first program that draws a colored rectangle on-screen. I want to know the best practices of making OpenGL and GLSL programs.
...
3
votes
1answer
114 views
Implementation of a VertexBufferObject class
I have been working a simple 2D Game using C# language with OpenTK (OpenGL wrapper/binding for .NET). It uses a lot of sprites.
Since it uses lot of sprites, I think it's important to make everything ...
1
vote
1answer
76 views
4D matrix math library for use with OpenGL
I am trying to create a simple library for C to handle OpenGL matrix operations.
You can see the vec3fscalar here.
...
2
votes
1answer
101 views
OpenGL ES 2.0 Sprite rendering
Is this a good method to render sprites (textured quads) or is there a faster or better way?
Example use:
...
5
votes
2answers
1k views
Basic OpenGL Renderer class
I made this Renderer class recently, to simplify the user interface of my library's API. I would like to ask advice about the move semantics (copy constructor, <...
10
votes
2answers
484 views
Yet another OpenGL Shader: the Builder pattern and lifetime management
I've noticed that whenever a shader program class is implemented (from some questions on this site, as well as more reputable implementations), that:
The class tries to do too much. Binding to the ...
2
votes
1answer
107 views
RenderBatch for game engine
Recently, I implemented an RenderBatch class, which renders any objects, using a specific shader (with its configuration). I'd like to improve on the way my render ...
11
votes
2answers
222 views
OpenGL game engine
I'm making a C++ game engine for entertainment and am using OpenGL to render my stuff. I made a batch renderer that was able to render 50K sprites with 300 FPS (untextured). My old setup that was able ...
3
votes
1answer
116 views
OpenGL-based library
I've been working, for a month, on an OpenGL library called alpha++. Basically, it is a framework that allows the user to create 3D scenes easily.
I would like to ask your advice on how I could make ...
1
vote
1answer
1k views
Modern Opengl GLSL Shader Class
I've finally written my own Shader class. It's a basic implementation based on a tutorial, and it works perfectly. Any suggestions on how to improve, or correct my ...
3
votes
2answers
194 views
Load an OpenGL buffer from file
The function's job is to load a vertex attribute buffer or an element buffer from a specified path, and upload it to OpenGL. Also, optionally, return the number of vertices/indices loaded through an ...
0
votes
1answer
2k views
Managing shaders in OpenGL - A Shader class
I've create a basic Shader class in modern OpenGL (3.1) which works perfectly, though it is not feature complete yet. It still lacks the functionality to allow the ...
6
votes
2answers
285 views
2D OpenGL tile atlas fragment shader
I am currently using the following glsl code to retrieve separate textures from a tile atlas:
...
13
votes
3answers
861 views
WebGL shader program management
I'm writing a tiny WebGL/JS framework to improve my knowledge of JavaScript and WebGL. Following is a class that wraps a Shader Program and provides methods for setting the shader parameters (AKA ...
2
votes
1answer
1k views
YUYV OpenGL Fragment Shader
I made a shader to display a YUYV surface (data arranged as: Y0 U0 Y1 V0). It's working, but I don't know anything about shaders, or openGL, or anything graphic related as a matter of fact. I feel ...
7
votes
2answers
1k views
Makefile for C++ OpenGL with GLFW and glad
This is a makefile I wrote to compile a simple OpenGL test project which is going to use the libraries GLFW and the C library glad.c.
...
0
votes
1answer
1k views
TextRenderer class for rendering text with OpenGL [closed]
I'm writing a class called TextRenderer to render text with OpenGL.
Here's my TextRenderer.hpp file
...
6
votes
2answers
174 views
Quaternion rotations and preparing matrices for a shader
I am implementing an OpenGL ES 2.0 renderer in c. I want to use quaternions for rotations. Please take a look at the way I am implementing the rotation math. Everything looks as expected when the ...