Skip to main content

All Questions

Tagged with
0 votes
1 answer
368 views

Entity Component System (ECS): Entity-Exclusive Component Data Being Shared Among All Entities With That Component

I will try to keep this brief THE CONTEXT My basic C++ (SDL & OpenGL) 2D game engine has an ECS. I have a system called TextSystem, which requires 3 components. TransformComponent, RenderComponent,...
Ramin Amiri's user avatar
0 votes
1 answer
2k views

Draw 2D and 3D in the same OpenGL window

I'm creating a 3D game with OpenGL and I would like to make a toolbar in the top of the window. For that, I tried to use SDL to draw the buttons and OpenGL to draw the actual game. Here is the ...
Donald Duck's user avatar
  • 8,783
0 votes
0 answers
1k views

2D Hud over 3D scene (OpenGL, SDL, C++)

My 3D world draws perfectly every time but the 2D text never draws. The code below features my latest effort using a tutorial from lighthouse3D. I get the feeling its something stupidly simple and im ...
user3041704's user avatar
-1 votes
1 answer
1k views

OpenGL 2d HUD over 3d won't render anything

I'm playing around a bit with OpenGL and SDL. At the moment, I'm trying to get a HUD to display over some 3d spinning cubes. However, when I added the code to draw a 2d quad after the 3d shapes, I got ...
Mercury1964's user avatar
-1 votes
1 answer
368 views

Algorithm for maintaining a transformation matrix stack in graphics [duplicate]

I am trying to write a small 2D graphics library using SDL. I want to implement the equivalent of the Matrix stack in openGL and implement functions like pushMatrix() and popMatrix() in openGL. I can ...
geekyWerewolf's user avatar
0 votes
1 answer
484 views

Memory leak when using glDisable(GL_TEXTURE_2D) in draw-call

I've been noticing a small memory leak in my program and I've finally been able to track down the problem. What i'm doing is drawing out 5 rectangles to the screen by calling this function: bool ...
JohanLejdung's user avatar
2 votes
1 answer
2k views

Convert SDL window position to OpenGL world position

I'm using SDL and OpenGL for this project. My screen at program start up is 640 x 480 and so is my glOrtho setup. So the program starts out synchronized. But my program allows the user to create a ...
arnm's user avatar
  • 1,765
2 votes
2 answers
2k views

Simple 2D graphics in Objective C (GNUStep)

I'm creating a simple agent-based modeling-framework and I'd like to provide some very simple visualizations. Nothing too fancy, and mainly just 2D graphics. Can I use OpenGL or SDL with Objective C ...
Vivin Paliath's user avatar
1 vote
0 answers
842 views

2D TTF Text Rendering with SDL & OpenGL Issues

So I have looked around and I haven't found the best way to actually implement this in SDL & OpenGL. At this moment I can display text to the screen with a TTF but its not really displaying the ...
Alexei Nunez's user avatar
5 votes
1 answer
7k views

2D Platformer Collision Handling

I am trying to create a 2D platformer (Mario-type) game and I am some having some issues with handling collisions properly. I am writing this game in C++, using SDL for input, image loading, font ...
defender-zone's user avatar
0 votes
3 answers
2k views

Is there a 2D graphics API with both pixel perfect drawing and 2D hardware acceleration? [closed]

We are in the first stages of making a 2D game at the moment, which will focus on destructible environments and objects. However, we have already encountered serious problems with the choice of the ...
IntellectualCat's user avatar
1 vote
2 answers
327 views

What package should I be using for 2d animation?

I am working with a client on a 2d map. The map is centered on the user's position and marks various headings and points of interest. As the user moves, the headings change and the points of interest ...
foobarfuzzbizz's user avatar