For questions about using OpenGL graphics with the SDL multimedia library via the various `SDL_GL*` functions.
Questions tagged [sdl-opengl]
10 questions
14
votes
2 answers
Is double buffering needed any more
As today's cards seem to keep a list of render commands and flush only on a call to glFlush or glFinish, is double buffering really needed any more? An OpenGL game I am developing on Linux (ATI Mobility radeon card) with SDL/OpenGL actually flickers…

Sudarshan S
- 1,235
- 2
- 16
- 25
7
votes
1 answer
Do I have to include SDL_opengl.h after GL/glew.h?
I would like to create an OpenGL project with SDL2. I usually start my OpenGL projects by including GL/glew.h first. Do I have to include SDL_opengl.h afterwards? It also contains the OpenGL API headers, so It seems to me that it is not necessary…

Iter Ator
- 8,226
- 20
- 73
- 164
4
votes
1 answer
c++ sdl: can i have an sdl-opengl window inside a menu and buttons i created with glade?
I used glade to create some gtk buttons.
is it possible to add an sdl-opengl window to a glade application ? if so, how ?
how can I interact between the gtk events and the sdl events inside the gtk window ?
thanks

ufk
- 30,912
- 70
- 235
- 386
4
votes
3 answers
Textures appears white in opengl
I can't load a BMP texture and show it on faces of a cube.I am working on Windows 7.My compiler is Visual Studio 2010 Express.I use FreeImage to load the bmp.My image bit depth is 24.My image size is 256 * 256.I am using SDL to create window and…

arman_aegit
- 435
- 1
- 9
- 20
3
votes
2 answers
c++: how can i use sdl to load a bitmap into a cube in opengl?
I'm learning OpenGL and SDL and so far I've been able to properly draw and rotate 3d polygons ( yay for me! :) )
how can I load an image file using SDL and load that texture on the 3d shapes that i draw on screen using OpenGL.
thanks!!!
update
I…

ufk
- 30,912
- 70
- 235
- 386
3
votes
2 answers
OpenGL cube rotation using quaternions
I have been trying to rotate a cube using OpenGL running in an SDL full-screen window. I managed to do this quite successfully with glRotatef(), however I experienced "gimbal lock" and other problems associated with Euler angles. Wanting to improve…

steve9164
- 426
- 2
- 11
- 22
3
votes
3 answers
OpenGL texture loading with SDL
I have started learning OpenGL using NeHe tutorials for a little while.This is the code for lesson 6.It should load a bmp image and use it as texture for the cube I'm drawing.But It doesn't work properly and the cube remains white at all.The…

arman_aegit
- 435
- 1
- 9
- 20
2
votes
2 answers
mac, netbeans 6.8, c++, sdl, opengl: compilation problems
I'm trying to properly compile a c++ opengl+sdl application using netbeans 6.8 under Snow Leopard 64-bit.
I have libSDL 1.2.14 installed using macports.
The script that I try to compile is the following:
#ifdef WIN32
#define…

ufk
- 30,912
- 70
- 235
- 386
1
vote
1 answer
Drawing widgets on existing sdl_opengl context
Is there any actively developed open-source (GPL is fine) library that can draw widgets such as buttons, menus, etc on an existing SDL/OpenGL context? I have heard of FLTK, but it appears that it creates its own window and its own OpenGL context to…

Sudarshan S
- 1,235
- 2
- 16
- 25
1
vote
2 answers
High CPU usage with SDL + OpenGL
I have a modern CPU (AMD FX 4170) and a modern GPU (NVidia GTX 660). Yet this simple program manages to fully use one of my CPU's cores. This means it uses one 4.2 GHz core to draw nothing at 60 FPS. What is wrong with this program?
#include…

Scintillo
- 1,634
- 1
- 15
- 29