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

learn more… | top users | synonyms

1
vote
0answers
46 views

Error “glGenBuffers is ambiguous” in Eclipse Mars [closed]

I have called a function, which is part of OpenGL correctly. uint vboId; glGenBuffers(1, &vboId); This is definitely correct because the program successfully runs. The error shown when I hover ...
-2
votes
1answer
67 views

DirectX is difficult sometimes [closed]

I recently started DirectX 11. Sometimes I can't get my head around it. First of all what are COM objects and why we do have to release them? I have done most of initialization, but I am stuck in ...
0
votes
1answer
45 views

Collisions between mesh (bounding-box) and Vertex/Index Buffer

I have a short Question: I'm trying to add Collisions in my 3D DirectX9 game and my World is Stored in a LPDIRECT3DVERTEXBUFFER9 and LPDIRECT3DINDEXBUFFER9 and Rendered per DrawIndexedPrimitive. My ...
1
vote
1answer
80 views

Version 320 is not supported, SDL C++

I have the following four lines before I create the window. SDL_Init(SDL_INIT_VIDEO); SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE); ...
1
vote
1answer
77 views

C++ : Library for creating 3d view picture [closed]

I've got a numerical simulation, where I have as an output 3d matrix of billion elements - the visualisation of data is 2d flat image: When I was starting I was just outputting 2d data to gnuplot, ...
1
vote
1answer
52 views

How can I create background images in OpenSceneGraph?

I'm trying my hand at using OpenSceneGraph for graphics in my game. I'm having a hard time trying to figure out how to get a background image up. The relevant piece of code that I have can be found in ...
1
vote
0answers
46 views

SDL-2.0 library not working with codeblocks-13.12-mingw-tdm [closed]

I started following lazyfoo's sdl 2.0 tutorials. This is the very first tutorial that explains how to set up SDL 2.0 with code::blocks - SDL 2.0 with code::blocks setup. I am doing exactly what it ...
2
votes
1answer
75 views

OpenGL not rendering textures

i'm using OpenGL 2.1 with SDL2.0 and i'm trying to render a texture, using this steps: load the image: Image* image = new Image(); image->image = SDL_LoadBMP(path.c_str()); if ...
2
votes
0answers
82 views

Scene Graph: Does anybody have a real world example?

I'm trying to wrap my head around how scene graphs work, and how to apply that to my game, in the context of all my game objects, including assets, cameras, units, shaders, etc. All I can find are ...
4
votes
1answer
69 views

Apply delta time to physics correctly

So I'm trying to create a simple physics engine for the game I'm creating. I'm trying to add jumping to the game. To do this I used (where jumpPower is 30000): impulses.emplace_back(0.0f, mass * ...
1
vote
1answer
657 views

undefined reference to std::__throw_out_of_range_fmt

after some time with oxygine i have decided to start learning SFML, i configured codeblocks to link the header files and .so files, and whenever i try to compile i get this error: ||=== Build: Debug ...
1
vote
0answers
41 views

State machines and map transitions

I've implemented a [basic] FSM in my game and it currently does its job very well. Recently I have come across a "problem" that I need to show a "Loading map. Please wait..." screen for as long the ...
3
votes
1answer
62 views

Testing SFML sf::Touch on ordinary PC

So I’ve created a small app that is designed to be used on smartphones and tablets. Accordingly the app makes use of the sf::Touch class which determines the point on the screen of the device that the ...
4
votes
1answer
116 views

Tracking launch errors for your game with a simple c++ app

I am trying to create a simple app to track launch errors for my game. The idea is to launch a c++ program, that in turn launches the main game .EXE file with CreateProcess(). The c++ app then ...
1
vote
1answer
82 views

Cocos2d Sprite 3D position

When I set a position3D for a Sprite in cocos2dx, it render two times the same sprite, i took a screenshot: I set the position3D because i want to use the Z position the give an effect of distance, ...
1
vote
0answers
75 views

OpenGL RayCasting and Intersection with plane

I have been trying for a couple of days to raycast. I have a Renderable/Texture/Primitive/Whatever placed in the WORLD at 0.0f,0.0f,0.0f, and when I click the mouse I want to know at what X,Y ...
2
votes
1answer
40 views

Shaders wont bind to the uniform block

I'm having an issue with interface block binding. Example shader: const char* vertexShader = "#version 330 core\n" "uniform globalMatrices" "{" " mat4 ...
3
votes
1answer
106 views

How can I separate processing input and update?

I know that game loop is broken up into three distinct phases: processing inputs, update, and render, but I just can't see how I can make processing input and update independent of each other. Let's ...
1
vote
1answer
41 views

sf::Shader not working properly on texture

I'm having trouble getting my sf::Shader to work on an sf::Texture that I've drawn myself. The vertex shader is pretty standard (I think it's just a copy of the example from SFML's page). The fragment ...
2
votes
2answers
104 views

Do I need more than one UDP socket on the server?

I'm trying to make a UDP game server using the SDL_net library. This library offers SocketSets which are, according to the documentation, an analogy to the select function. Right now I have ...
1
vote
1answer
100 views

OpenGL shaders messed up

So after a long attempt at DirectX I switched back to good old OpenGL. Now I'm running into this weird problem. My code involves shaders, of course, and drawing a basic cube. But I'm getting this ...
2
votes
0answers
120 views

OpenGL textures make very low fps

I loaded some textures just one time before I go to my mainloop(glutMainLoop). I am using SDL for the texture loading. However, when I compile, my game is running at 6-10 fps. When I don't load the ...
2
votes
2answers
47 views

How to handle sounds muting in settings?

I have a easy and specific question. Let's say that in my game I use singleton for playing/pausing/changing volume of specific sounds (SimpleAudioEngine in cocos2d-x). What is the best way to ...
2
votes
1answer
62 views

Do I need to delete a texture after calling SDL_DestroyTexture()?

Let's suppose I have this texture: SDL_Texture* txt = IMG_LoadTexture(renderer, "path"); /* various code */ SDL_DestroyTexture(txt); delete txt; // <- Is this part really necessary? Doesn't ...
2
votes
1answer
114 views

How to calculate delta time with SDL?

I have heard that you can calculate delta time with two functions called SDL_GetPerformanceCounter and SDL_GetPerformanceFrequency. I'm not sure how they work completely, but I heard it is a bit ...
1
vote
0answers
48 views

Which game engine to use for Android TV? [closed]

I am trying to tinker a bit on Android TV game development and I am trying to figure out which would be the best suited 2D/3D game engine for this purpose or, alternatively, which are the main aspects ...
1
vote
2answers
117 views

OpenGL SDL Texture doing really weird things

I am trying to render a .png image to the screen using C++, SDL and glut. This the texture I made using paint This is what I get on the screen: Does anyone have an idea what could cause this? ...
3
votes
2answers
110 views

Increase the speed of my grid/render system?

I currently have a simple Minecraft-like grid system setup. The game has a world -> a world has multiple chunks -> a chunk has blocks. The world asks the chunks to render (if needed), but the render ...
2
votes
0answers
94 views

What are the newest alternative to all-in-one game engines? [closed]

I have been seaching a while for recent alternative to engines like unity or unreal, however, I haven't found one actively maintained that meet my needs. For instance, I tried irrlicht with maps ...
1
vote
0answers
39 views

Planning to start a right game design pattern [closed]

I'm planning start a game development (I did develop many promo games but now I will start my games with the best code design patterns). I will use QT Creator with C++14, OpenGL and some physical ...
2
votes
1answer
79 views

Texture Not Rendering in C++ SDL OpenGL(glut)

I don't understand why my texture("texture.bmp"), is not showing on the screen. Please help me. The whole drawing function: ///HERE EVERYTHING IS BEING RENDERED void Main::display(){ int ...
2
votes
1answer
77 views

Which game consoles can I target as an indie with C++ and OpenGL [closed]

I am an indie game developer and I wish to build games using C++ and OpenGL for game consoles. I've read that there are strict requirements for developing games for some consoles. So does anybody know ...
7
votes
1answer
224 views

What is the easiest way to Implement a 3rd Person Camera in C++/DirectX9

I'm pretty new to C++ and DirectX9 and I want to Implement a Third Person Camera. After some reading about Quaternion-based Cameras I decided to try Implementing it. But it really blow my mind, so I ...
1
vote
1answer
150 views

How do I render a 2D overlay with DirectX 9?

I'm working in C++ with DirectX 9 on a 3D game, but I want a 2D overlay for rendering a HUD. I've heard that I could use D3DXMatrixOrthoLH, but I'm very confused on how to use it. I'm more familiar ...
2
votes
0answers
66 views

SDL2 SDL_CreateTexture returns pointer to existing texture

I have an initialized renderer in SDL2 that works fine. I create some textures from images using SDL_CreateTextureFromSurface and store them in a vector. Afterwards, I create an empty texture so as ...
2
votes
2answers
94 views

Low performance from unordered_map when accessing elements in member template function in derived class

I'm trying to implement a component based architecture on a game engine project. Each GameObject has an unordered_map that holds a pointer to Component base class. At this point, I only have one ...
1
vote
1answer
116 views

SFML Trying to shoot bullets but it moves with the gun

I'm pretty new to SFML and C++ and I'm trying to figure out how to shoot bullets. I've done the shooting part and it's origin is from a moving shape controlled by the user called Player. The problem ...
1
vote
1answer
68 views

Could not load dynamic library .\RenderSystem_GL_d. System Error: %1 is not a valid Win32 application

I am using OGRE 1.8.1 SDK for Visual C++ 2010 (32-bit) from ogre3d.org/download/sdk and Ogre_VC10_Express_AppWizard_1.8.0.exe downloaded from https://bitbucket.org/ogreaddons/ogreappwizards/downloads. ...
1
vote
0answers
121 views

Restart a 2D game - OpenGL, GLUT

I started learning OpenGL and GLUT by making a snake game. The problem I encountered is that when I press the "new game" in the menu, the window has to be resized so that the content of the window to ...
1
vote
0answers
11 views

How can i apply texture to cylinders created using Ogre Procedural Geometry Library?

I am using Procedural::CatmullRomSpline3 to create cylinders between 3 control points, now instead of solid cylinders i need to create dashed/ dotted cylinders so is there a direct way to do so or ...
1
vote
0answers
24 views

Application is crashing with Ogre::ItemIdentityException

I am new to OGRE and i am trying to create a 3D line using following tutorial: http://www.ogre3d.org/tikiwiki/Line+3D and application is crashing with following exception Ogre::ItemIdentityException.
2
votes
2answers
60 views

IOS/Android Game programming [closed]

I am somewhat new to the whole game programming thing. I was wondering if I could develop a game for IOS and Android with using openGLES. if so how can I run the code on the devices and what are some ...
2
votes
0answers
74 views

How to create a MessageBox in OpenGL using C++ [closed]

I have a game that needs results displayed upon exit with a messagebox. I have the following code that works but I need to add an integer variable to the text. This works: MessageBox(NULL, ...
0
votes
1answer
79 views

Render time only equal half of fps

I'm working on a project that remakes mario 3 (NES). In my game loop, i face a strange thing. Here is my code: while (true) { if (PeekMessage(&msg, 0, 0, 0, PM_REMOVE)) { if ...
1
vote
2answers
86 views

Is FreeGLUT still a good choice? [closed]

I recently decided to utilize the C++ library called FreeGLUT to have a window be managed from my program, where I can draw things via OpenGL. But at the same time I saw some people telling that it is ...
1
vote
2answers
159 views

How can I minimise memory thrashing when doing vector math in C# or C++?

I'm doing a lot of 3D math in my game engine loop using typical classes like Vector3D, Matrix4x4, Plane3D, etc. Currently every operation causes a new object to be created for the result value. The ...
2
votes
1answer
57 views

Calculate angles between two other angles

I am trying to implement a FOV for my light casting algorithm. In the diagram below each white line represents a ray cast from a std::vector<float> of normalized radians. How can I only include ...
2
votes
0answers
63 views

Skeletal animation 3d models [closed]

I'm building a skeletal animation system. My goal is to make it as efficient as I can. Is there a place where I can download some 3d models (preferably from real games) So I could see if my system ...
2
votes
0answers
79 views

How to develop a good game project? [closed]

I have enough experience in both C++ and Java, since I've been working on them a lot. My graduation project is, in my case, a game (I still have almost 8 months remaining). I already took down the ...
2
votes
0answers
44 views

Moving and rotating to a position with forces and impulses [closed]

Carrying on from this question, I'm still stuck trying to implement the behaviour mentioned in this tutorial. My movement has improved slightly thanks to the help I received: But the character ...