OpenGL is a graphics standard and API which targets the desktop and workstation 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 ...

learn more… | top users | synonyms

2
votes
0answers
54 views

SImple wrapper for OpenGL

I am writing a simple wrapper for OpenGL for personal use. Currently I have a gl::Buffer (for VBO, EBO etc...) and it can have several types (...
6
votes
2answers
100 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
132 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
96 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
179 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
93 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
92 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 ...
8
votes
2answers
173 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 ...
10
votes
1answer
97 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 ...
17
votes
1answer
279 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
185 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
168 views

Perfect game loop

I've been working on development for an Android game, and this is the game loop I have so far: ...
11
votes
1answer
402 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
225 views

my arcBall rotation code

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. Below is my implementation. ...
10
votes
1answer
249 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
386 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 ...
4
votes
0answers
300 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
390 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
182 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
113 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
119 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
689 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 ...
3
votes
1answer
189 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
233 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
140 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
181 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, ...
0
votes
1answer
78 views

Issue regarding game velocity

So, this is a thing. I've got a simple little 2D game where a character can run left and right and jump. My problem here is that I've got two velocities, xVel and yVel, that I need to increment as the ...
1
vote
1answer
377 views

Small particle engine

I wrote a small particle engine in Java for my Pong clone. I read that changing a texture is very expensive in OpenGL, so I tried to change the texture as few times as possible. Therefore I change ...
3
votes
1answer
471 views

Java reflection and static classes

I try to intercept some OpenGL calls for testing my rendering classes. Reflection is used for replacing the OpenGL backend. I feel this class is badly written and I need advices for refactoring it. ...
2
votes
1answer
108 views

OpenGL abstraction layer

I've tried to create a small OpenGL abstraction layer. I've tried to favor composition over inheritance but somehow it added extra complexity to my code. I probably overused it. shader.h ...
4
votes
0answers
75 views

Accelerate OpenGL 2D on Python3

I used OpenGL to draw about 20 circles. Each circle has 2 lines, ~10 segments, and all of them have different colors and lenght. FPS ~=4. How can I do this faster? I am using Python 3 on Ubuntu. ...
11
votes
2answers
1k views

Quadtree design

I have an application which is used for displaying and modifying huge volumes of point cloud data from lidar files (up to few gigabytes each, sometimes loaded in simultaneously). In the app the user ...
3
votes
1answer
969 views

Seperate rendering thread with XLib (GLX) and OpenGL

I am writing a prototype for something at work. Not very many people here know much about Linux/Unix or Xlib so I can't really ask here at work (most developers are expert Windows programmers). With ...
3
votes
1answer
472 views

Is this OK Cocoa OpenGL design? What could I be doing better?

I'm working on a Cocoa project that uses OpenGL. I'm trying to keep things easily cross-platformable for later (which is the primary reason for my GL singleton; I hope to implement Linux versions of ...
4
votes
2answers
367 views

OpenGL VertexArrayObject class

It seems to play up sometimes and I'm not sure if this is due to the class itself or the way I'm using it. Can someone confirm that this is a 'good' implementation of a ...