2
votes
0answers
28 views

SDL_AddTimer + SDL_GL_MakeCurrent not working on Windows [closed]

I'm messing around with C++, OpenGL and SDL doing a game that should be able to run in Windows and Mac OS X. I have a problem that only happens on Windows. Let me describe the scenario. First I ...
2
votes
4answers
234 views

OpenGL setup on Windows

I have been trying to use OpenGL for two days now. First on Mac, then on Windows. The problem with Mac is that it doesn't support the newer versions of OpenGL. I ran a tutorial that actually did get ...
1
vote
0answers
96 views

What's the best way to set up an OpenGL draw loop in windows?

On mac os x, there's a way to pass the system a function pointer that is triggered at an ideal time to start your drawing code. These are the CVDisplayLink tools. I'd like to understand how to do ...
2
votes
1answer
126 views

How to make OpenGL rendering resolution independent from its window context resolution?

Can the rendering resolution of OpenGL and the window size (at least for the Windows OS) be separated? For example, I may only want to render at 400x300 resolution, but I want my window size to be ...
0
votes
0answers
52 views

How can I set the attribute index location?

I am trying to set up a shader which takes three input parameters. I have the following code: GLuint vert = glCreateShader(GL_VERTEX_SHADER); GLuint frag = glCreateShader(GL_FRAGMENT_SHADER); const ...
1
vote
2answers
398 views

How can I use ARB_debug_output with SDL on Windows?

I'm trying to port a small GL program that I've been working on from Linux to Windows. I have the following: window_ = SDL_CreateWindow(...); SDL_GL_SetAttribute(SDL_GL_CONTEXT_FLAGS, ...
0
votes
1answer
115 views

Setting up cube map texture parameters in OpenGL

I see alot of tutorials and sources use the following code snippet when defining each face of a cube map: for (i = 0; i < 6; i++) glTexImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_X + i, 0, ...
0
votes
1answer
182 views

How to draw a rotatable and zoomable sphere?

My game is a sort of business simulation game of Earth, and I want the main interface to be just like a google earth view. Is there a way to do this with built in OpenGL features or do I have to ...
0
votes
1answer
241 views

What's the equivalent of wglShareLists for Mac OS?

I'm trying to share lists between two contexts on Mac OS but despite my research I couldn't come up with an answer so far. I've found that NSOpenGLContext was able to initialize a context with a ...
6
votes
1answer
426 views

How can I debug _why_ glDrawArrays is very slow?

I'm working on a game that uses CEGUI and Ogre. Recently, we've discovered that some of our customers with GeForce4 MX 4000's, performance is terrible. After a night spent debugging, I've tracked ...
4
votes
4answers
690 views

Why do most game devs prefer OGL for OS X and D3D for Windows? [closed]

Today I decided to check what Diablo 3 developers used to do graphics: OpenGL or Direct3D? My mind was completely blown: For Windows, they've used D3D and for OS X they've used OGL. I did some ...
0
votes
1answer
609 views

Does SFML render it's graphics using OpenGL internally?

By that, I mean that SFML has an abstraction for OpenGL? Sort of like SDL's blit functions, but using OpenGL internally? "Yes SFML uses OpenGL for all the graphical stuff. " Received this comment ...
4
votes
3answers
7k views

How to draw 2D images using OpenGL, in SDL?

After everything, I managed to find a simple piece of code that shows how to draw a 2D image with openGL: #include "SDL/SDL.h" #include "SDL/SDL_opengl.h" #include "SDL/SDL_image.h" ...
2
votes
3answers
317 views

Multithreaded game fails on SwapBuffers in render thread at exit

The render loop and windows message loop run on separate threads. The way the program exits is that after PostQuitMessage is called in WM_DESTROY the message loop thread signals the render loop thread ...
15
votes
1answer
13k views

Freeglut vs SDL vs GLFW

i need to port my game project from Android (written in C, OpenGL ES 2.0, thanks to NDK) to Windows and Linux platforms. Of course i will need to rewrite some platform depended code, but now i stuck ...
0
votes
2answers
2k views

How to request a specific OpenGL version?

I'm working on an OpenGL project, coming from D3D. They're organised in very different ways, so it's tricky going :) Is there any way for a Windows application to request a specific OpenGL context ...
-1
votes
1answer
194 views

Opengl tutorials [duplicate]

Possible Duplicate: What are some good learning resources for OpenGL? Starting out with OpenGL when most tutorials are out of date I know that there are many questions like this, but i ...
1
vote
1answer
259 views

Why am I getting a “multiple definition of *” error when initializing OpenGL extensions?

I'm creating a game engine using OpenGL, and I'm initializing the extensions manually, i.e. this: // .h file PFNGLACTIVETEXTUREPROC glActiveTexture; /* .cpp file, initialization function */ ...
0
votes
2answers
280 views

Is it possible to create a Facebook game that is a Windows executable?

I'm thinking of trying to make a game, and I heard Facebook is good place to make it popular, but I don't want to make a sprite-based Flash game, I want to use OpenGL for rendering to get nice ...
2
votes
2answers
1k views

Why is OpenGL using 100% CPU shortly after start up when wglSwapIntervalEXT is enabled?

I have a game which uses SFML, which in turn uses OpenGL. When I run the game, it will use 100% CPU for (usually) about 24 seconds, and then immediately falls down to normal usage. I can't figure out ...
5
votes
2answers
8k views

Does Unity for PC use Direct3D or OpenGL?

I am a mac developer using Unity and I hardly use a PC. When you build a Unity game for Windows, does it use Direct3D or OpenGL? P.S. I'm not sure if it's called Direct3D or DirectX
4
votes
2answers
2k views

How does one write to another process's OpenGL/DirectX context?

I want to write a short of chat client that display the messages in-game (OpenGL/DirectX), but I really don't know how to handle this. It is easy to write my client in my graphic context... but what ...
4
votes
2answers
3k views

How detect which OpenGL texture formats are natively supported?

For example, how detect if my videocard doesn’t support "bgr8" and convert it to another format, such as "rgba8" in software mode. UPDATE: Sorry for the confusion. This question more about situation ...
1
vote
1answer
153 views

When rendering on two different computers, the texture is glitchy

I am using Ogre3D, and have been using it for a while. Also lately, I have been using the Opengl Rendering system that is included in Ogre, only because Directx will not compile correctly(Will post ...
3
votes
2answers
543 views

How can I hook into OpenGL initialization on Windows?

I want hook all OpenGL games/applications. I want load my library only if application actually use OpenGL. Something like Direct3DCreate9 for Direct3D 9 or CreateDXGIFactory for Direct3D 10/11. I ...
3
votes
1answer
3k views

Getting started with cross-platform game development [closed]

I am looking for a starting place to develop a crossplatform OpenGL game that runs on Mac, PC and potentially Linux. The difficulty is that I don't want to use an existing graphics library. I've ...
5
votes
3answers
3k views

Trapping mouse inside window in OpenGL with GLUT?

I perfectly understand that GLUT is limited and the following problem can't probably be solved with OpenGL/GLUT, but since I don't know exactly if it can or not, I better just ask. Maybe I'm doing ...
1
vote
1answer
201 views

Can I change the order of these OpenGL / Win32 calls?

I've been adapting the NeHe OpenGL/Win32 code to be more object-oriented and I don't like the way some of the calls are structured. The example has the following pseudo-structure: Register ...
3
votes
2answers
475 views

WinAPI window taking 50% of CPU when idle

I'm currently working on a game that creates a window using WindowsAPI. However, at the moment the process is taking up 50% of my CPU. All I am doing is creating the window and looping using the ...
12
votes
1answer
5k views

How can I tell how much video card memory I'm using?

I want to programmatically determine at runtime how much video card memory is being used by my program. Specifically I'm wondering about how to do it on a Windows machine using OpenGL, but am ...
2
votes
2answers
979 views

How to tell if a glut window has focus from c#

How can I tell if a glut window has focus? Im using c#/tao, Ill use p/invokes if necessary. Basically I want to ignore input if it doesn't have focus.