Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [opengl]

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 applications like CAD software and computer games. It is also cross-platform and with bindings for several programming languages.

3
votes
1answer
50 views

C++ OpenGL - GLFW Window Abstraction

I made a GLFW window abstraction, as I find it very useful for me to make such abstractions while learning an API, and It actually pretty much eases my work while coding. Anyways, share your ...
3
votes
1answer
57 views

C++ OpenGL GPU resource wrapper pattern

So with OpenGL(and I'm assuming other GPU APIs) you create different buffers/programs/etc that live on the GPU and you are given a handle to them when created. For instance, if you want a buffer to ...
3
votes
0answers
27 views

Using a large number of actors in one render scene with vtk python

I used vtk python examples to write this function where it produces two lines with respect to a reference point like [0, 0, 0]. This function will return an actor ...
0
votes
0answers
40 views

C++ OpenGL minimal VAO example

Alright, so first, the reason I'm posting this is because I've seen so many tutorials that conflict with each other, and I would like to get this all straightened out. (Ignore the lack of shaders/mvp ...
2
votes
3answers
55 views

Refining an OpenGL tutorial demo

I'm working my way through the examples in an OpenGL website; I'm now on tutorial 2 ("the first triangle"). Among the (many) things I've changed from the sample include: Replacing the hodge-podge of ...
5
votes
1answer
36 views

Mouse control of a camera in an OpenGL program

Introduction I'm doing an OpenGL program in C. As of now I'm working on the 3D camera system and got the control right. Now I'm working on the mouse control. It works, but I have used two different ...
3
votes
0answers
41 views

Implementing Cyrus Beck algorithm for convex polygons

I have found the coordinates of the centroid for finding the direction of the normal vectors of the edges of the convex polygons. This method seems to work in the cases I tested. Is this fool proof ? ...
6
votes
2answers
140 views

Abstracting OpenGL shaders and uniforms into objects for ease of use

I am following an OpenGL tutorial series and it got to the point where the program needed some code abstraction. I followed the tutorial on the abstraction of VBOs, IBOs and the like and when it got ...
6
votes
2answers
276 views

Simple OpenGL / C++ Game Engine

I come from a C# background and recently have been trying to improve my C++ and OpenGL. I've hacked together a basic 3d engine and am looking for feedback as to how to improve it. One bit I'm most ...
3
votes
1answer
145 views

2D rendering abstraction

This is a simple 2D rendering abstraction that I've been using for my game. It's basically a vector of quads. It has functions for defining quads (position, rotation, texture coordinates) and a ...
2
votes
2answers
93 views

C++ OpenGL Debug Utility (Completed)

So I had posted C++ OpenGL Debug Utility before to get some feedback on it, this is a more complete version of the class. (Again, looking for feedback/critiquing of any sort. {As I'm in the early ...
3
votes
1answer
84 views

C++ OpenGL Debug Utility

Edit: A follow up post can be found here. So I've started a c++ project, coming from Java / C# there are many obvious differences. Below is an example of a class I've been working on: .h ...
1
vote
0answers
83 views

GLSL Simplex Noise with derivatives

I recently made 2d simplex noise based coherent noise in GLSL. [Here] is the shader toy. I wanted to make an implementation of simplex noise on the gpu in order to get better performance than the CPU ...
2
votes
1answer
97 views

Voxel engine to draw cubes

I am an amateur in OpenGl and for this reason I am seeking to learn only modern OpenGl the 4.x stuff. Once I had completed basic tutorials (rotating cubes, for example) I decided I would try and ...
2
votes
1answer
139 views

GLFW simple event handler

I wrote a simple concept of an event system in cpp. It is uses a namespace and a global state, but normally a global state with namespaces is bad practice. Is there a better way to do simple event ...
3
votes
1answer
782 views

Window class for a game engine

I am writing my own game engine, and I wanted to share with my own window class written in C++ using GLFW as the windowing API. Is there someone who can help me better this class? I'm not a complete ...
4
votes
0answers
652 views

3D FPS Camera in OpenGL

So I've got a basic FPS camera working which can move around the 3D space. Having trouble with physics but thats not why I'm here! So the code below creates a scenegraph which contains torus model ...
1
vote
0answers
95 views

Golang Opengl OBJ Loader

I'm trying to get better in go by make a 3D game. (Yes, I know that's a lot of work but I'm doing it for experience and not to make a profit.) And I want to improve the loading of the OBJ Files as ...
2
votes
1answer
709 views

Better QOpenGLWidget by delaying GL code to initializeGL with lambda functions

When I am writing OpenGL applications with the QOpenGLWidget class, deciding what code goes into the initializeGL function has ...
1
vote
1answer
338 views

Modern OpenGL shader wrapper v2

This is a fixed up version (following RAII principles) of my previous reviewal. I have moved the construction of the object entirely to the constructor to prevent any bad object states. The only ...
2
votes
1answer
181 views
0
votes
1answer
100 views

OpenGL framework “SOGL”

Here is my repo, pull requests are always welcome ^^ I know that OpenGL frameworks already exists (OGLPlus, for example) but I developing another one following this set of reasons: To understand how ...
2
votes
1answer
599 views

Modern OpenGL wrapper abstractions (shaders)

I am experienced with other languages, but not so much with the latest C++ standards. I was wondering if anyone had any tips on how to improve my code or any critique on my implementation. This is not ...
1
vote
1answer
362 views

Vulkan and Opengl swapable rendering backend

I'm working on a multi render library. The point of it is to have a swapable backend at runtime to render the same item. The renderer is given to the window (which is a wrapper over SDL2). Then the ...
1
vote
0answers
79 views

Purely functional minecraft-like mesh compiler

I'm creating a minecraft clone (for practice), in scala, using largely functional programming. When a chunk doesn't have a mesh loaded into VRAM, it create a Future for the vertex and index arrays, ...
4
votes
1answer
619 views

OpenGL 3 Mandelbrot Set

I've written a short program to learn about computing with drawing using OpenGL 3. To do so, I created a program to create two triangles, which form a quad, and pass all the arguments for computing ...
7
votes
1answer
534 views

Metaballs and Gravity game;

For past two days I made my first OpenGL project, I know, It's fixed pipeline, but my focus was on gravity algorithm, so, tell what do you think, and how can I make it faster? main.cpp ...
4
votes
1answer
274 views

OpenGL 4.5 Core Buffer wrapper

I recently wrote this OpenGL buffer wrapper which covers the 4.5 Core specification. I feel like the typed interface could be done better. Any feedback is greatly appreciated. ...
10
votes
2answers
797 views

Mandelbrot Fractal Drawer in C++

As an exercise to learn how OpenGL and image creation worked, as well as to satisfy a curiosity I've developed for Chaos Theory, I decided to create a mandelbrot fractal drawer in C++, which can ...
4
votes
1answer
901 views

Simple Minesweeper using OpenGL / GLUT

I'm trying to make minesweeper similar to windows 3.1 minesweeper by using OpenGL / GLUT. The game still in early stage but playable. I would like to know, how can I improve it. EDIT 1: i added ...
4
votes
0answers
334 views

Python Code For Drawing a Fractal Tree using pyglet

So I've just finished doing a coding challenge that involved drawing a fractal tree. Instead of doing it recursively(which is what I did initially but it proved to be to slow for branches greater than ...
1
vote
0answers
424 views

Texture Loading in LWJGL 3 - follow-up

Here's my optimized Texture class: ...
1
vote
1answer
449 views

Texture loading in LWJGL 3

I made the following class to simpify texture loading in LWJGL 3, and modeled it after the slick-util API: ...
6
votes
2answers
261 views

Designing a Robust Texture and Framebuffer class for Game Engine

As part of my ongoing development of a 3D game engine based on PyOpenGL, I am trying to do some refactoring to make working with textures and framebuffers as painless as possible. I feel this ...
0
votes
1answer
2k views

Custom OpenGL Buttons

I'm writing a very simple engine which I hope to use to create a game at some point and felt that I needed buttons to allow the user to select options in a menu, so I wrote up a rudimentary button ...
2
votes
0answers
528 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
218 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
994 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
126 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
3k 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
113 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
475 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 ...
5
votes
1answer
473 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
6k 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
46 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
257 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
476 views

Platformer in C

GitHub repo. main.c ...
7
votes
2answers
1k 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
399 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
697 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. ...