C++ is a statically typed, free-form, multi-paradigm, compiled, general-purpose programming language.

learn more… | top users | synonyms

6
votes
0answers
147 views

Hotplugging Joysticks And Gamepads On OSX

I've tested the cross platform joystick support features on GLFW, SDL2 and SFML. SDL2 appears to be the most complete, but it can't detect when joysticks have been unplugged on OSX. To me, this is a ...
3
votes
0answers
201 views

Flickering problem with world matrix

I do have a pretty wierd problem today. As soon as I try to change my translation- or rotationmatrix for an object to something else than (0,0,0), the object starts to flicker (scaling works fine). It ...
2
votes
0answers
31 views

Load an Image to the BackBuffer

How can I load and display an Image?... I have tried something but it didnt.. worked.. this is what I've tried.. File : StrikeOps_main.cpp .. void : render_frame : Intro::DisplayIntro(d3ddev, ...
2
votes
0answers
422 views

Arcball 3D camera

I have checked multiple threads before posting, but i havent been able to figure this one out. Ok so i have been following this tutorial, but im not using glm, ive been implementing everything up ...
2
votes
0answers
180 views

Use quaterions to move the camera direction according to mouse movement

I am trying to use quaterions to move the camera direction vector in the following way. This code is perfectly working glm::quat temp1 = glm::normalize( glm::quat((GLfloat)( ...
2
votes
0answers
77 views

How do I calculate the points of a brush from a Source engine VMF?

I'm trying to render the brushes from a Source engine .vmf file in C++, using OpenGL. The .vmf stores solid brushes as a series of planes which I would like to use to calculate the points for each ...
2
votes
0answers
325 views

Not able to change the background of the scene in cocos2dx android

I have started Game Development using Cocos2d-x. And started with HelloWorld sample game. I am able to run this sample game. But when I try to change the Background Color, I am getting error in ...
2
votes
0answers
66 views

Creating a d3d surface from pre-allocated system memory?

I thought I read somewhere that one could create a OffscreenPlainSurface from an existing system memory buffer, but I cannot seem to find the reference anymore. My use case is copying a frame from ...
2
votes
0answers
109 views

Bullet btGeneric6DofConstraint and btGeneric6DofSpringConstraint constructor arguments

I have a very simple (and maybe too primitive to post here but I’ll try anyway :P) question about Bullet constraints. What are arguments const btTransform &frameInA, const btTransform ...
2
votes
0answers
660 views

2D water shader in SFML

I want to implement the algorithm for a 2D water surface described here and here. Before somebody finds out, beats me up and deletes this, I'm gonna say it myself. I posted this question over at ...
1
vote
0answers
18 views

How do I detect image clicks in Dark GDK?

I am trying to determine if an image has been clicked, using the Dark GDK game engine. I've found no methods in the engine that do this. I would rather not brute force this with a large nested ...
1
vote
0answers
114 views

opengl volumetric billboard implementation: general idea + geometry shader

A while ago I decided to implement the volumetric billboards technique in my university project (C++ & OpenGL 4.3). I passed the subject but failed to implement the mentioned technique. I'd like ...
1
vote
0answers
70 views

2D Collision Resolution getting stuck on walls

I've been writing this collision detection system using a tutorial from an article I read and I just cannot for the life of me get it to function 100% correctly. Here's the code for starters: ...
1
vote
0answers
106 views

Implementing Dead Reckoning in a Winsock server

I'm having a little difficulty understanding how I implement Dead Reckoning in my Server-Client Winsock game. I've been looking on the internet for a decent explanation that explains exactly: When ...
1
vote
0answers
164 views

SFML 2.0 Too Many Variables in Class Preventing Draw To Screen

This is a very strange phenomenon to me. I have a class definition for a game, but when I add another variable to the class, the draw method does not print everything to the screen. It will be ...
1
vote
0answers
295 views

Cocos2d-x CCFollow Zooming issue

Hi I am currently building a cocos2d-x game which incorporates pinch zoom using CCLayerPanZoom class which can be found here The problem is basically when using CCFollow and zooming and out, it ...
1
vote
0answers
205 views

c++ opengl unproject not working

first of all, sorry for the bad english. I need to convert my mouse coordinates to world coordinates, I'm trying to use the glm unproject method. 1280x720 is the size of the window, It's hard coded ...
1
vote
0answers
143 views

Rotate a point in 3D space with sine and cosine

I got my camera controlled by the mouse. Now I want a sphere to be always in the center of my view(just for testing). I tried that by assigning the sine of the Y rotation of the camera times 10 as the ...
1
vote
0answers
114 views

Box Zoom - Fit to rectangle

I want to box select a section of my screen and then zoom in that selection. So I have four corner points (my rectangle which I can drag with the mouse) in pixel coordinates. I have a perspective ...
1
vote
0answers
279 views

Creating a new GLFW window and re-using the old context causes crash

I am using GLFW 3.0.2 and when I want to switch the application to fullscreen, I create a new window and intend to use the OpenGL context of the old window so I don't have to reload all the meshes, ...
1
vote
0answers
147 views

GLX/X11 Changing the rendering resolution

I have made a simple application that creates a window with an OpenGL 4.2 context and takes user input. I have implemented making the window go fullscreen with XRandR and can change the display ...
1
vote
0answers
212 views

2D Camera transformation sidescroller

i am currently trying to dive into 2D programming with DirectX, especially bulding a tile based sidescroller. I have worked with some chapters from a book (Advanced 2D Game Development) but always ...
1
vote
0answers
95 views

How to correctly synchronize a shared surface?

I am trying to share a direct3d9 surface between two processes. One process (let's call it A) writes to the surface, and the other (B) displays it on screen. Currently, process A does a StretchRect of ...
1
vote
0answers
93 views

OpenSceneGraph, multiple instances of a model

Im working on my first project using OpenSceneGraph. The project is a model flight simulator for one of my university courses, I want to be able to load airplanes (consisting of multiple models) and ...
1
vote
0answers
177 views

Why is my XInput gamepad press stamp not working?

I'm trying to add basic gamepad input to my c++ DirectX game but i'm having some trouble creating a press stamp (registers the press only the first time it's pressed if button held down). The entire ...
1
vote
0answers
305 views

Optimal OpenGL 2D Sprite Batching (Best Practice)

I am working on simple 2D engine using OpenGL (3.3+) for rendering and was wondering what the optimal method of sprite batching would be. I plan to put all sprites into one (or fewer) texture atlases. ...
1
vote
0answers
111 views

Masking a CCLayer

I have a CCLayer (itemLayer) that has a bunch of CCMenuItemImage (itemButton) objects in it placed vertically in a column. These itemButton objects go way past the bounds of the screen and the ...
1
vote
0answers
101 views

IwGame (Marmalade): Does CIwGameSprite support SVG? How?

I have a small question about Marmalade IwGame engine. Does the CIwGameSprite support SVG (I've read that yes it does) If it does support SVG, how does it handle it, Does it convert that Vector ...
1
vote
0answers
159 views

Sketchy results from ray-plane intersection code

I've set up a demo with simple first-person controls using C++ and OpenGL, and it seems to work reasonably well. My goal is this: when the player looks at a plane and clicks the left mouse button, ...
1
vote
0answers
157 views

Help with Windows RawInput

I am having some trouble to receive and interpret mouse movement data from RawInput. Generally mouse input seems to work, I can query mouse buttons and receive updates of mouse movement. The problem ...
1
vote
0answers
109 views

OpenWorld SceneGraph management and optimization

I have a SceneGraph class which for now is just a simple list implementation, and the only optimization I've planned so far is a check is something like this: //GetDistance returns the distance ...
1
vote
0answers
342 views

How to pick a 3D object with known mouse coordinates if the camera is rotated 60 degrees?

I am making a simple game engine for a simple RTS game and would like to be able to pick a cube and move it around with the mouse coordinates. The problem is that my camera is rotated 60 degrees just ...
1
vote
0answers
81 views

Audio Panning using RtAudio

I use Rtaudio library. I would like to implement an audio program where I can control the panning (e.g. shifting the sound from the left channel to the right channel). In my specific case, I use a ...
1
vote
0answers
240 views

DX9 Deferred Rendering, GBuffer displays as clear color only

I'm trying to implement Catalin Zima's Deferred Renderer in a very lightweight c++ DirectX 9 app (only renders a skydome and a model), at this moment I'm trying to render the gbuffer, but I'm having a ...
1
vote
0answers
119 views

UDK and Protocol Buffers

Actually two questions: Can I use TCP sockets in UDK to implement my own networking protocol? (I guess TCPLink is an answer) Is there any way I can user Protocol Buffers inside UDK? Or anything like ...
1
vote
0answers
240 views

Full screen shader causes performance hit

I basically want to have a shader run that can do something like toon shading, or grayscale the whole screen, or radial lighting. To do this, I create a new bitmap each time the display resizes that ...
1
vote
0answers
353 views

Algorithm for potential fields

Rather than computing potential fields in a grid and performing a lookup for them, I've decided to query the potential fields at a given point in 3D space by simply querying all the objects in a ...
1
vote
0answers
212 views

Debugging Minimum Translation Vector

I implemented the minimum translation vector from codezealot's tutorial on SAT (Separating Axis Theorem) but I'm having an issue I can't quite figure out. Here's the example I have: As you can see ...
1
vote
0answers
408 views

Joint constraints in PhysX

I'm trying to use PhysX for my physics engine. I'd like to use spherical joints, but I'm having trouble with the constraints. All of the examples that I've found refer to SDK v2.8. I'd like to ...
0
votes
0answers
26 views

Focus a turntable style camera on an object

I have a turntable style camera in the maya / blender / alembic / opensubdiv example. I want to be able to match the camera translation to any objects translation pivot point in the scene and then ...
0
votes
0answers
28 views

Loading Wavefront Data into VAO and Render It

I have successfully loaded a triangulated wavefront(.obj) into 6 vectors, the first 3 vectors contain the locations for vertices, uv coords, and normals. The last three have the indices stored for ...
0
votes
0answers
24 views

Calling interactivity functions from object classes

Let's say I have a class object_door. An instance of said class is now in the game world in a locked state. Now to enable the player to open it, he needs to attempt to pick the lock. So I was ...
0
votes
0answers
16 views

alBufferData() sets AL_INVALID_OPERATION when using buffer ID obtained from alSourceUnqueueBuffers()

I am trying to stream audio data from disk using OpenAL's buffer queueing mechanism. I load and enqueue 4 buffers, start the source playing, and check in a regular intervals to refresh the queue. ...
0
votes
0answers
35 views

Cocos2d-x , setup the debug environment and remove the red marks in my eclipse

I am struggling with this issue since last week. I still can’t figure out where is the error. My code is compiling perfect if I restart the eclipse. but, when I edit the c++ file it shows red marks ...
0
votes
0answers
139 views

How to make an Game Intro

How do I display my logo (a short video) before displaying the main menu? For example when you start Call of Duty, it displays the IW / 3ARC logo, Activision, and then a cinematic. I just need to ...
0
votes
0answers
99 views

Separating Axis Theorem Issue

I am trying to create a 2d top down shooter using DirectX 11 (Windows 8 Store) and I am trying to implement OOBB collision using the Separating Axis Theorem. However I appear to have run into an ...
0
votes
0answers
24 views

Exporting .bullet file from Blender Render

I'm trying to export my blender render bullet world to a .bullet file. Unfortunately, it seems like when I bring my bullet world to the game engine it drops the bullet info. Is there a way to export ...
0
votes
0answers
140 views

cocos2d-x-3.0rc0b Build fails

I have created a cpp Cross platform project with cocos2d-x-3.0rc0 on windows8 , but i can't build the android project. I have the following result: C:\home\MyGame\proj.android\proj.android>python ...
0
votes
0answers
75 views

How can I load an SVG file and create a shape and collision data from it?

I'm looking to write a game in C++ with vector-styled graphics. For this, I will need to turn an SVG shape into a Box2D body and a polygon for rendering in SFML. I don't need the full capabilities of ...
0
votes
0answers
61 views

How can I align a 2D object properly using tilemap collision

I'm making a mario clone, and I have been working on the collision but I can never seem to get it right. I started out with "true/false" collision, aligning the player at it's last position, and as ...