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 ...

learn more… | top users | synonyms

2
votes
1answer
77 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
84 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
52 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
77 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
59 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
61 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
37 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
59 views

Graphic object class

I am trying to implement graphic objects that can be either Sprite, Base, Point or some ...
3
votes
1answer
122 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 ...
1
vote
0answers
27 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
70 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
75 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
53 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
70 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
95 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, ...
8
votes
2answers
209 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
72 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 ...
10
votes
2answers
156 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
93 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
144 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
99 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
260 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 ...
5
votes
2answers
129 views

2D OpenGL tile atlas fragment shader

I am currently using the following glsl code to retrieve separate textures from a tile atlas: ...
11
votes
3answers
313 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
235 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 ...
6
votes
2answers
542 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
332 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
142 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 ...
15
votes
1answer
210 views

Virtual Texturing - Page Indirection Table

I'm working on a Virtual Texturing library for mobile devices based on OpenGL-ES. This is the PageIndirectionTable, one of the library components I would like to ...
2
votes
0answers
113 views

Updating OpenGL version to 4.1 (LWJGL) [closed]

I have a 2D rendering system that's working (for the most part). I want start making use of shaders to implement transformation, rotation, scale, etc., and I want to do it using the latest version of ...
6
votes
2answers
139 views

Using a CRTP approach for loading OpenGL programs

I wanted to try using CRTP (also new for me) to try making the loading of shared resources implicit. (Specifically I'm using it for loading OpenGl shader programs) This will also help separate some ...
9
votes
2answers
263 views

OpenGL text rendering library for Lua built on freetype-gl

FTGL wasn't making me happy, so I decided to try something else. This isn't completely finished; I plan to work more on layouts and alignment, and add a few other things. It should be far enough along ...
11
votes
1answer
128 views

Lua bindings for FTGL (FreeType font rendering in OpenGL)

I wrote some Lua bindings for FTGL's C API. This works well enough, but I ended up with lots of macros, one for each Lua function signature. For example, LUD_NUMBER_NUMBER_TO_NUMBER creates a Lua ...
18
votes
1answer
439 views

Tiny Lua library to get char pointer from string

Background I'm using Lua with luaglut to do some OpenGL stuff. The luaglut API is almost identical to the gl/glut C APIs. Sometimes, gl functions want a pointer to some data, for example: ...
7
votes
1answer
279 views

Sorting objects to be rendered by their state

I'm writing a renderer to learn my way around OpenGL and right now I'm trying to understand how to sort the objects to be rendered. As I understand there are a few rules to this: Sort to minimize ...
7
votes
1answer
209 views

Perfect game loop

I've been working on development for an Android game, and this is the game loop I have so far: ...
12
votes
1answer
585 views

OpenGL Instanced Rendering

I have a very basic OpenGL instanced rendering setup, which is compiling and running, however it is super slow, and even though I spent days of asking and reading how to fix it, I still have no clue, ...
5
votes
2answers
689 views

User controlled rotation with arcBall

I am trying to visualize a pointcloud centered around the origin. I also want to have a user controlled rotation for which I found the arcball. rMat is the model ...
10
votes
1answer
281 views

Sprite drawing class

I have written a very XNA spritebatch like interface for drawing sprites in OpenGL. When begin is called the vertex data buffer is mapped to a float*. The index buffer and vertex buffer are bound in ...
4
votes
1answer
522 views

OpenGL first person jumping code

I'm making a game in Java with LWJGL and I just implemented jumping. I don't really think the code is particularly well written or very efficient. Here is the code of my ...
6
votes
1answer
588 views

OpenGL object wrapped in a Qt Widget

I have this object wrapper class, which I will use to implement my Qt OpenGL scene. It is working, but I am looking for a way to: Improve the API. Remove extra OpenGL calls. Optimize it. I know ...
4
votes
1answer
469 views

Speedups for Conway's Game of Life

I wrote Conway's Game of Life in Python with Pyglet. It works pretty well but is very slow when the number of cells gets high. Any easier speedups I can attain with this code? ...
6
votes
2answers
311 views

Type safe program uniform manipulation in OpenGL

I've made an attempt at writing class wrappers around basic OpenGL objects to make managing them easier and more intuitive. Writing a generic one for program uniforms proved to require a little bit ...
5
votes
2answers
136 views

Optimizing garbage collection for local objects

I am trying to make a 3D application with OpenGL/LWJGL at the moment, but I am now already hitting some limits on the JVM, most likely due to a configuration that needs to be done. I have the ...
3
votes
1answer
130 views

Vertex Buffer Object (VBO) multi-class implementation

I'm hoping someone could look through this code for my Chunk, Mesh and ChunkManager classes ...
5
votes
1answer
976 views

Making a voxel engine

I've decided a while ago to make my own voxel engine. To start, I coded my own basic 3D engine in Java using minimal OpenGL bindings for things such as SRGB ect. I set up my own VBA and VBOS and had ...
4
votes
1answer
239 views

WebGL (Three.js) simple application

I have done the source code for my lesson, which I shall publish later on my website: ...
4
votes
1answer
328 views

Shader class implementation

I'm trying to design a Shader class. For now, I'm just trying to get basic outline for handling uniforms. Some design goals I aimed for is to avoid passing a ...
1
vote
1answer
174 views

common lisp: nested loop beautification (checkboard texture generator)

I've written a small code snippet that generates checkboard texture using cl-opengl. ...
3
votes
2answers
190 views

WIP platformer game

Initial note: You do not need to have knowledge of LWJGL or OpenGL to review this code. The only parts of the code that require LWJGL knowledge are the Game class, ...