Questions tagged [c++]

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

Filter by
Sorted by
Tagged with
0
votes
1answer
759 views

Getting ray using gluUnProject or inverted MVP matrix

I've read a lot of topics here, on SO, opengl.org etc. Example how gluUnProject should work (from NeHe tutorial): ...
0
votes
2answers
478 views

Switched from immediate mode to VBOs, game runs slower

trying to improve draw performance on my c++, OpenGL, SDL game. Back in school we mostly learned immediate mode, so thats how my drawing was originally implemented. When I started reading up online ...
0
votes
1answer
143 views

Which buffering process would be more efficient?

I'm working on the base engine of my game right now, specifically converting a text file into a level on-screen. As a 2D platformer, each level has an array of rectangles that can be drawn to the ...
0
votes
2answers
2k views

Directx9, FBX sdk and indices problem

So I've set up my program, know how to get everything going except for one thing: indices. I've been stumped as to how I retrieve that set of data. Does anyone know what I function I need to get them? ...
0
votes
1answer
92 views

I can't make the cube map to use shadow mapping - or it seems so

Basically, I'm following tutorials as I'm very new to OpenGL. I managed to perform shadow mapping towards just one direction, meaning I created 2D texture depth map. Now with omnidirectional shadow ...
0
votes
1answer
670 views

Trouble applying a texture to a cube

Currently working on applying a texture to a cube and I am at a road block. I am using UV coordinates to apply the texture. Currently using 24 uv coordinates with indices. I am using glDrawElement and ...
0
votes
1answer
459 views

Rendering without VAO's & VBO's?

I am trying to port a demo I found on PositionBasedDynamics . It has a generic function which does the rendering and on their example works but they don't generate/bind any Vertex Array Object or ...
0
votes
2answers
1k views

My C++/OpenGL “Hello Triangle” Code Does Not Draw A Triangle When Using SDL As A Window Library

I have been using the website Learn OpenGL but I am using SDL as a window Library. My code seems to builds the window correctly but no triangle appears. I am compiling my code using Visual Studio ...
-1
votes
1answer
55 views

C++: passing gameobject as a parameter and then into vector

firstly iam used to java and new to c++ so maybe this will looks a noob's question i will explain this and give a pseudo code and then c++ just so you can understand me i have a player class which ...
-1
votes
1answer
551 views

filling the empty spaces in a certain region in a grid using c++

Hi guys i am struggling to find the optimal way to fill the grid of a certain region. In the above example lets say my player is at (7,5) and traveled (2,0) and i have the information of all the ...
-1
votes
2answers
1k views

Shooting many bullets toward the mouse position

I try to shoot a bullet toward the mouse position by this code. ...
-3
votes
3answers
2k views

Homemaking a 2d soft body physics engine

hey so I've decided to Code my own 2D soft-body physics engine in C++ since apparently none exist and I'm starting only with a general idea/understanding on how physics work and could be simulated: ...

1 3 4 5 6 7