Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 22612

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

7 votes

Why Game engines use C++?

I would say it's because C++ is, among major languages, the one that works at the highest level, without sacrificing access to low level control. In C++ you have complete control of what is going on …
Panda Pajama's user avatar
  • 13.5k
26 votes

Does allocating and freeing a huge chunk of memory at startup "clean up memory?"

I don't know how old that writeup is, but I'd say it's pretty old. In modern Windows (XP and newer, but specially on 64-bit versions), I would say doing something like that will have little to negativ …
Panda Pajama's user avatar
  • 13.5k
1 vote

How to package a Windows c++ game?

Visual Studio Professional has a "Setup project" type of project that creates a Windows Installer (msi) setup program. For versions up to 2010, it was bundled, and for 2013, there is an extension whic …
Panda Pajama's user avatar
  • 13.5k
1 vote

Getting data from the backbuffer D3D11 using Map

Chuck Walbourn's answer is correct, but to give you a bit more context, the texture you're creating with pDevice->CreateTexture2D is not the same as what you're getting with pSwapChain->GetBuffer. Wit …
Panda Pajama's user avatar
  • 13.5k
0 votes

How should I store levels in a C++ game?

Unfortunately no, you can't define multiple variables with the same name. Suppose the compiler lets you do so, but when you're going to use it, how do you know which one are you talking about? So in …
Panda Pajama's user avatar
  • 13.5k
7 votes
Accepted

Performace benchmark between a C++ and a C# renderer engine?

As always, it depends. Generally speaking, an algorithm implemented in C# should not perform worse than in C/C++ for arbitrarily large inputs. Using a "fast" language is not a substitute for a good a …
Panda Pajama's user avatar
  • 13.5k
4 votes
Accepted

What is the correct way to reset and load new data into GL_ARRAY_BUFFER?

glBufferData() overwrites the previous data, and is generally what you should use to load new data into a GL buffer. Conceptually it is similar to overwriting data in an array. glDeleteBuffers() and …
Panda Pajama's user avatar
  • 13.5k
1 vote
Accepted

Problem with rendering a quad from four lines

You're out of luck. There is nothing wrong in your code, and there's nothing you can do in your code to guarantee any set of arbitrary lines will always meet perfectly by using the technique you are u …
Panda Pajama's user avatar
  • 13.5k
98 votes
Accepted

How does Lua work as a scripting language in games?

Scripting is a programming abstraction in which you (conceptually) have a program (the script) running inside another program (the host). In most cases, the language in which you write the script is d …
Panda Pajama's user avatar
  • 13.5k
2 votes
Accepted

RPG Game Graphics Help/Review

I'm not sure if this question is appropriate for this site, but I'll give you my take. First, kudos on making your game! I am all for doing stuff yourself if you can't find anybody else to do it. Yo …
Panda Pajama's user avatar
  • 13.5k
10 votes

Why is it possible to encounter a texture coordinate greater than 1 or less than 0

Precisely, to repeat a texture. So, if you have a quad, and the texture coordinates go from 0 to 1, the texture will be drawn once. If the coordinates go from 0 to 2 and wrap is set to GL_REPEAT, the …
Panda Pajama's user avatar
  • 13.5k
5 votes

How to rotate camera centered around the camera's position?

I'm not so sure if I understood your problem right, but I'll try to answer anyways. gluLookAt(), as its name implies, creates a view matrix for a camera, and takes three vectors as parameters. The f …
Panda Pajama's user avatar
  • 13.5k