Search Results
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 |
C++ is a statically typed, free-form, multi-paradigm, compiled, general-purpose programming language.
4
votes
1
answer
1k
views
C++ SDL OpenGL minimise / restore window issue
I'm partway through developing a 2D game in C++ using SDL and OpenGL; my IDE of choice is CodeBlocks. I've hit an issue that I can't seem to get around.
Basically, if I minimise and then restore the …
0
votes
3
answers
2k
views
Long loading times on large PNG file using C++, OpenGL & SOIL
I'm currently optimising a C++ OpenGL game, and I've noticed something slightly odd about texture loading.
I've got a number of PNG files I load as textures and use as spritesheets; these are general …
0
votes
Accepted
Long loading times on large PNG file using C++, OpenGL & SOIL
Bit of an old question but I've actually discovered what the problem here was. My instinct that basic loading of 2D textures was taking a long time was correct for the following reason:
When using th …
0
votes
What is the most efficient way to render a textbox in C++ SDL2?
I think what you're referring to is line wrapping i.e. when a line of text gets too wide for the current display, it is automatically distributed across a number of lines (much like this text dependin …
3
votes
1
answer
607
views
How to create an OpenGL texture using primitives?
I'm currently rendering a large proportion of the graphics of my game using custom OpenGL primitive functions (e.g. DrawCircleFilled(), DrawPolygonFilled(), etc) drawing procedurally generated objects …
2
votes
2
answers
6k
views
C++ alternative to vector for arbitrary number of objects using pointers
I'm working on a prototype 'life simulation' game which incorporates any number of objects / entities that may exist in the game.
Up until this point I had been working with vectors of the objects, w …
3
votes
2
answers
6k
views
C++ Instantiating objects as function arguments / parameters (base and derived classes)
I've noticed with some functions in C++ that accept objects (e.g. constructors), you can actually create the object within the function argument e.g. (this example uses an SDL_Point as the main parame …
0
votes
Accepted
C++ Instantiating objects as function arguments / parameters (base and derived classes)
Bugger, solved this about two minutes after I posted the question
The answer is not to use names for the temporary objects used as arguments in functions, i.e.
create_new_object(object());
Rather …
0
votes
Accepted
C++ SDL OpenGL minimise / restore window issue
OK so I have a partial answer (more of a kludge) that might eventually lead to the real, proper solution for this.
I've added some code to check for a SDL_WINDOWEVENT_RESTORED event; when this occurs …