All Questions
31
questions
0
votes
1
answer
165
views
glClearColor prevents text from rendering with freetype using SDL2
I'm trying to add text rendering to my rendering project and am following the OpenGL tutorial at https://learnopengl.com/In-Practice/Text-Rendering I'm using SDL2 as my backend so had to make some ...
1
vote
0
answers
68
views
Garbled text and music - due to Steam Linux runtime change?
My team and I released our game on Steam last year for Windows, Mac, and Linux. The game is written in C++ and uses SDL2, including SDL2_image, SDL2_ttf, and OpenGL for graphics. Around the middle of ...
0
votes
0
answers
829
views
OpenGL Multisampling doesn't work
I am trying to get the Antialiasing (multisampling) in OpenGL with SDL to work(as shown here), but the result doesn't change and I still get jaggy edges.
Before rendering I call the following ...
0
votes
2
answers
2k
views
How to process events as well as do OpenGL rendering using multithreading?
I am working on a very complicated graphics rendering, using OpenGL, and it is very time consuming, in the sense that it creates a delay in the event handling, of my application to an extend that, the ...
0
votes
2
answers
5k
views
Does SDL2 completely encapsulates Direct3D and OpenGL?
I'm starting to study game development but the concepts of how the SDL2 lib works are still a bit blurry to me.
I get that both Direct3D and OpenGL are two sides of the same coin. They both are used ...
2
votes
0
answers
208
views
Are there any good techniques for reducing or smoothing stutter after a longer frame?
I've been using SDL2 with OpenGL to play around with some very basic game engine development. I'm running everything on a newer laptop with Linux and Intel integrated graphics.
Regardless of whether ...
0
votes
1
answer
357
views
Unable to create OpenGL window in SDL2
I am currently working on a C++ + SDL2 game engine and I am stuck on a problem. The problem is that whenever I pass SDL_WINDOW_OPENGL to ...
0
votes
0
answers
352
views
SDL2-CS and Gtk Sharp like SDL2-CS and WinForms in C#
who knows SDL2-CS embeds in Gtk Sharp 2/3?
Similar example by Ethan Lee with Winforms
But I really want know how do I fix with SDL2-CS in Gtk Sharp because I am working under Ubuntu 18.04
SDLWidget....
1
vote
1
answer
187
views
Game not responding on different computer with Intel graphics
I have a game that uses SDL2 and OpenGL 3.3 with Visual Studio. It runs fine on the computer that built it, but it did not work on other Windows computers.
Initially, it would complain about missing ...
1
vote
1
answer
972
views
SDL 2.0 OpenGL not drawing anything except background
My 'hello triangle' compiles well, no errors, but doesn't drawing anything. Here's my code:
main.cpp
...
2
votes
1
answer
131
views
C++11 & Efficient Networking Client<->Server<->"Zone(s)"
I am building both an engine and a networked game at once because I'm completely insane. The original design/plan was to use internal Unix sockets for each "zone" for server<->zone communication, ...
0
votes
1
answer
789
views
SDL2 Draw scene to texture. SDL2 RenderTexture like SFML
I've been developing a 2D Engine using SFML + ImGui.
The editor is rendered using ImGui and the scene window is a sf::RenderTexture where I draw the GameObjects ...
0
votes
1
answer
887
views
OpenGL: Better Approach to Repeating Sprites (e.g. terrain)?
Preface: Linux (Ubuntu 16.04 Gnome), C++11, SDL2, GLEW 2.0, OpenGL 4.5
Hello ladies/gents,
My conundrum is this: How do I handle draw a repeated texture (sprite) as a single object, at various ...
2
votes
1
answer
306
views
Rotating a Row of Textures
Preface: In Linux, using C++11, SDL2, GLEW, and OpenGL.
Hello Ladies/Gents,
I am reaching out as I'm stuck on a fairly simple problem that a decade out of school has further hindered. Specifically, ...
1
vote
2
answers
2k
views
Reliably synchronising SDL animation with VSYNC in windowed mode
I have an SDL/OpenGL program which creates a rendering context with PRESENTVSYNC enabled, then enters an animation loop which calls ...
0
votes
1
answer
3k
views
SDL2 and OpenGL: flickering with double buffering, what am I doing wrong?
I'm currently fiddling with SDL2 and OpenGL to get an understanding on how they work and, moreover, how shaders are done and work.
Right now, I'm following this tutorial, using SDL instead of glfw; ...
5
votes
1
answer
5k
views
SDL2 not setting OpenGL version?
I want to use SDL2 (2.0.4) with C to create an OpenGL 3.3 (core) context. But it seems to default to whatever compatibility profile my computer supports. Works fine with LWJGL2 and Java.
Here is my C ...
0
votes
2
answers
589
views
Prevent rendering queue from overflowing when using Vsync
My game loop currently looks something like this:
...
2
votes
1
answer
1k
views
glGenBuffers is NULL
I'm using GLEW 1.13.0, (GLUT), SDL2 and OpenGL 3.3 core.
...
2
votes
2
answers
982
views
Input before or after update/draw?
This is how I understood the game loop, and I wanted to know if I'm correct or not:
...
1
vote
0
answers
2k
views
How to draw 2D pixel data with OpenGL
I am fairly new to OpenGL. I have a 2D game in SDL2 that uses currently works by creating a SDL_Surface from the pixel data, copying it into a ...
4
votes
1
answer
3k
views
SDL2, OpenGL, Nvidia laptop screen tearing
EDIT 2017-05-14 dvb. Issue still active to this very day, see geforce forum link in main question.
Note 3: "Stoltverd" has posted a "fix guide" on geforce forum. It has workarounds for non-OpenGL ...
0
votes
1
answer
133
views
Should I add error handling to SDL_GL_SetAttribute?
As the title says, I wonder if I should handle errors for :
SDL_GL_SetAttribute
Can it actually fail to set?
And if it can, what could be a reason for it to ...
1
vote
1
answer
3k
views
OpenGL/SDL2 How to resize the render area with the window?
After calling SDL_SetWindowSize, the area being rendered to doesn't change with the window, so if the window gets bigger, it leaves a black area on the top and ...
1
vote
2
answers
977
views
SDL_LoadBMP into glTexImage2D results in scewed colors
I read up on this but i can not find the error.
Some suggest switching the format from RBA to RGBA but the surface data says it is 3 byte data.
Here are snippets and results of my source.
Loading ...
1
vote
1
answer
410
views
Smooth matrix rotation
I have a coded a simple example for a matrix rotation. The example rotates a sphere around its center. The problem is that the rotation is not running perfectly smooth and I'm wondering why.
Here is ...
1
vote
1
answer
7k
views
How to use traditional pixel coordinates system in OpenGL? (with C++/SDL2)
I find the normalized, centralized coordinate system used in OpenGL weird and annoying, is there anything I can do at all to make it work like normal pixel coordinates on everything ever except OpenGL?...
1
vote
2
answers
7k
views
How to render tile maps in modern opengl?
I'm trying to use SDL2 and Modern OpenGL to make a 2D rpg. The problem is, I have no idea how to render a tile map. I'm using the Tiled map editor to create maps. I have a vague idea of how to parse ...
4
votes
1
answer
4k
views
Rendering text with SDL2 and OpenGL
I've been trying to have text rendering in my OpenGL scene using SDL2. The tutorial I came across is this one Rendering text
I followed the same code, and I get text rendering fine. However the issue ...
0
votes
1
answer
1k
views
Why does my modern OpenGL heightmap render as line segments instead of faces?
I'm brand new to OpenGL and have been trying my hand modern openGL.
A few days ago, I tried to create some terrain by using a heightmap stored in a grayscale 32-bit BMP. I am using SDL 2.0, GLEW and ...
5
votes
2
answers
6k
views
How to detect graphics API at runtime with SDL2?
Using SDL2, is there a way to determine at runtime whether the application is using OpenGL, OpenGLES, or DirectX?
EDIT: If there is a way to figure it out without using the SDL2 API, I'm willing to ...