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.

Filter by
Sorted by
Tagged with
0
votes
1answer
2k 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
281 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
474 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 ...
8
votes
2answers
260 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 ...
10
votes
2answers
548 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 ...
12
votes
1answer
255 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 ...
22
votes
1answer
1k 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
561 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
327 views

Perfect game loop

I've been working on development for an Android game, and this is the game loop I have so far: ...
14
votes
1answer
1k 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, ...
7
votes
2answers
2k 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
1k 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
1k 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 ...
7
votes
1answer
2k 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 that ...
4
votes
1answer
652 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
1k 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
191 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
155 views

Vertex Buffer Object (VBO) multi-class implementation

I'm hoping someone could look through this code for my Chunk, Mesh and ChunkManager classes ...
6
votes
1answer
2k 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
292 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
596 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
257 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
245 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
97 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
571 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 ...
2
votes
1answer
2k 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
386 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 ...
5
votes
1answer
281 views

Accelerate OpenGL 2D on Python3

I'm using OpenGL to draw about 20 circles. Each circle has 2 lines, ~10 segments, and all of them have different colors and lengths. Frames per Second are around 4. How can I optimize this to run ...
15
votes
3answers
3k 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
2answers
2k views

Separate 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 ...
5
votes
1answer
668 views

OpenGL game edit view

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 ...
5
votes
2answers
817 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 ...
3
votes
1answer
726 views

Shader parameters in managed OpenGL

I'm working on a managed OpenGL game engine for C#, and here's how I'm managing shader parameters (uniforms). Is it "alright"? Could it be better? I'm a bit unsure about using generics in this case. <...

1 2
3