I'm making a game and the arm of the character will be constantly rotating since it will be following the mouse cursor. I've never worked with openGL before and I need some help getting started. If anyone knows any good websites to start learning and one that specifically contains rotation, please let me know.
I've already visited NeHe ...
Edit: I've edited the sample to better resemble the problem I have, now the function depends on a regular parameter (and not only on template parameters) which means that the computations can't be made at compile time.
I wrote some code with a hand written typelist and now we've started using boost and I'm trying to move it to the mp...
For educational purposes, I am using cstrings in some test programs. I would like to shorten strings with a placeholder such as "...".
That is, "Quite a long string" will become "Quite a lo..." if my maximum length is set to 13. Further, I do not want to destroy the original string - the shortened string therefore has to be a copy.
The...
I have a texture using the D3DFMT_A8 format. I want to render this as if the colour is white (ie the RGB components are all 255) and use the texture data for alpha blending.
I would like to do this without having to write a pixel shader if possible (as to work with existing shaders without changes, and also the fixed function pipeline)....
The Python manual says that you can create modules for Python in both C and C++. Can you take advantage of things like classes and templates when using C++? Wouldn't it create incompatibilities with the rest of the libraries and with the interpreter?
...
How do I put a struct in a separate file? I can do it with functions by putting the function prototype in a header file e.g. file.h and the function body in a file like file.cpp and then using the include directive #include "file.h" in the source file with main. Can anybody give a simple example of doing the same thing with a structure l...
This question is extremely basic, and I feel stupid for asking it. How do I create a GUI in C++? All of my C++ programs so far have been CLI, and the only other language I have experience with is PHP, which doesn't support it, which is why I don't know how it works.
By the way, I apologize if GUI is the wrong word here. I'm not sure if ...
Hello
I'm working on a QT project based mainly on C libraries.
I like the way QT works, and would like to make a C++ wrapper(with similar QT style) for each C library I'm working with.
What are your recommendations and advices.
What should I do, and what I shouldn't.
I would like to hear answers based on real life experience.
Thanks
...
Our core application is built in MFC C++, but we are trying to write new code in .NET, and have created a User Control in .NET, which will be used on an existing MFC Dialog.
However, when a unexpected/unhandled exception is thrown from the User Control, it causes the MFC app to crash (illegal op style), with no ability to recover.
I've...
Hi all,
I have an application that interacts with external devices using serial communication. There are two versions of the device differing in their implementations.
-->One is developed and tested by my team
-->The other version by a different team.
Since the other team has left, our team is looking after it's maintenance. The othe...
I've been reading a lot about deferred shading and want to try and get into it. Problem is I can't find a sample which demonstrates how deferred shading can support so many lights simultaneously - I found one demo which was very simple with a single light in Code Sampler and an nVidia HDR sample butnothing beyond that.
Would anyone know...
I am a seasoned .NET and C++ programmer who has been almost exclusively programming in C# for last 5 years and now I had to go "back" to start programming in C++ again.
Before becoming a C# developer I was a hardcore C++/STL/COM programmer, but never really used Boost back then (apart from playing around with a smart pointers from Boos...
Hello,
I want to draw 3D graphics on Windows Form Application in Visual C++.How can I adjust OpenGL library on Visual Studi 2008 ?Could you advise me any tutorial that mention using OpenGl Library with Windows Form Application and Visual C++?
Best Regards...
...
Hi,
I'm relatively new to DirectX and have to work on an existing C++ DX9 application. The app does tracking on a camera images and displays some DirectDraw (ie. 2d) content. The camera has an aspect ratio of 4:3 (always) and the screen is undefined.
I want to load a texture and use this texture as a mask, so tracking and displaying of...
Hi,
i have 2 bitsets each one storing 100 bits. I'm trying to simply subtract with '-', but I always get a compilation error at this point. How do you subtract 2 bitsets in c++?
Thanks in advance
...
I'm looking for a regular expression (or something else) library for C++ that would allow me to specify a number of patterns, run on a string and return the matching locations of all patterns.
For example:
Patterns {"abcd", "abcd"}
String {"abcd abce abcd"}
Result:
abcd matches: 0-3, 11-14
abce matches: 5-9
Anyone know of a such a lib...
I want to write a hardware accelerated text renderer using Free Type 2 to load the fonts, find the correct glyphs and their sizes etc.
My plan to do this is to have a large texture containing glyphs (for a given font,size,etc) in video memory, and a table for each texture defining information about the contents of the texture in system ...
Hi
I am facing a variety problem is explained below.
I have created a c# class library(Test.dll) using which i can enumerate the list of instances and databases of sqlserver. I have 2 Machines 1 dev machine and 2 one is test machine.
Now when i testing the Application in my dev machine it is properly behaving. But when i copy the app...
I have a large C++ application running in a Win32 and a x64 Version (using Windows XP x64). When debugging the x64 Version, after each code change the first debug session i start stops with
Unhandled exception at 0x77ee5f3c in myapp.exe:
0xC0000005: Access violation writing location 0x0000000000030c90.
The callstack shows endless rec...
I wrote up this code after reading item 11 of Effective C++ ( Third Edition ).
#include <iostream>
using namespace std;
#define MAX_COLORS 20
class Widget
{
public:
Widget ( int seed );
~Widget ( );
Widget& operator=( const Widget& rhs );
void ToString ( );
private:
Widget& SelfAssignmentUnsafe ( const Widget& rh...