Hi, I would like to have a windowless OpenGL context (on both GNU/linux with Xorg and Windows). I'm not going to render anything but only call functions like glGetString, glCompileShader and similar.
I've done some goggling but not come up with anything useful, except creating a hidden window; which seems like a hack to me.
So does an...
Does any body know of C code profiler like gprof which gives function call times in microseconds instead of milliseconds?
...
Hi Developers,
I don't know how to solve my problem.
Is it possible to redirect captured packet with ipq_set_verdict()?
I want to redirect unauthorized users to login page.
Please see my code:
The packets are accepted and my browser opens requested page(not changed destination address)
void main() {
struct ipq_handle* h;
i...
I am getting confused on why the compiler is not recognizing my classes. So I am just going to show you my code and let you guys decide. My error is this
error C2653: 'RenderEngine' : is not a class or namespace name
and it's pointing to this line
std::vector<RenderEngine::rDefaultVertex> m_verts;
Here is the code for rModel, in i...
We are developing a GPS time sychronization hardware device. And we want write a Windows WDM driver for the device. To avoid the user level latency, we'd like set windows( XP/Vista/7) system time in the kernel driver level. Does anyone know how to achive that?
Thanks
Xu Jun
...
Hi,
I am just trying to fiddle around what is the best and shortest way to describe two simple instructions with C-like pseudo code. The extract instruction is defined as follows:
extract rd, rs, imm
This instruction extracts the appropriate byte from the 32-bit source register rs and
right justifies it in the destination register. T...
Hi.
sscanf(text, "%s %s", name, company);
parses 'ian mceknis' but it also parses 'ian mceknis' and so on. How can i make this to parse only the first one? It must contain only one space not more.
Thank you.
...
Hi All,
I wrote a kernel module and a user that opens it with O_RDWR mode,
in the module_permission's func i get int op parameter ,
and would like to know if its value is the same as O_RDWR or maybe the system call open changes it to another known value , and if so where can i find it..
thanks a lot..
...
In the section covering setlocale, the ANSI C standard states in a footnote that the only ctype.h functions whose behaviour is not affected by the current locale are isdigit and isxdigit.
The Microsoft implementation of isdigit is locale dependent because, for example, in locales using code page 1250 isdigit only returns non-zero for ch...
Hello,
gcc 4.4.4 c89
Visual Studio VC++ 2008
I am writing a cross platform client server application. It will run on both linux and windows.
However, I am just wondering what I have done for closing the sockets is correct. I close the file descriptor. However, if there is a problem with closing it. What is the best way to handle this...
can somebody explain how does glutMainLoop work?
and second question, why glClearColor(0.0f, 0.0f, 1.0f, 1.0f); defined
after glutDisplayFunc(RenderScene); cause firstly we call glClear(GL_COLOR_BUFFER_BIT);
and only then define glClearColor(0.0f, 0.0f, 1.0f, 1.0f);
int main(int argc, char* argv[])
{
glutInit(&argc, argv);
...
What is the difference between memcpy() and strcpy()? I tried to find it with the help of a program but both are giving the same output.
int main()
{
char s[5]={'s','a','\0','c','h'};
char p[5];
char t[5];
strcpy(p,s);
memcpy(t,s,5);
printf("sachin p is [%s], t is [%s]",p,t);
return 0;
}
Output
sachin p i...
I'd like to use the namespacing features of the clone function. Reading the manpage, it seems like clone has lots of intricate details I need to worry about.
Is there an equivalent clone invocation to good ol' fork()?
I'm already familiar with fork, and believe that if I have a starting point in clone, I can add flags and options from ...
This large application has a memory pool library which uses a treap internally to store nodes of memory. The treap is implemented using cpp macros, and the complete file trp.h can be found here. I get the following compiler warning when I attempt to compile the application:
warning: this decimal constant is unsigned only in ISO C90
By...
I am allocating the array and freeing it every callback of an audio thread. The main user thread (a web browser) is constantly allocating and deallocating memory based on user input. I am sending the uninited float array to the audio card. (example in my page from my profile.) The idea is to hear program state changes.
When I call mall...
I am trying to create a piece of software that can be used to create VERY large (10000x10000) sized bitmaps. All I need is something that can work in monochrome, since the required output is a matrix containing details of black and white pixels in the bitmap. The closest thing I can think of is a font editor, but the size is a problem.
...
I've been thinking of how to implement a lock-free singly linked list. And to be honest, I don't see many bullet proof ways to do it. Even the more robust ways out there that use CAS end up having some degree of the ABA problem.
So I got to thinking. Wouldn't a partially lock-free system be better than always using locks? May some oper...
Possible Duplicate:
what is the difference between const int*, const int * const, int const *
what is the difference between :
char const *p;
const char *p;
char *const p;
??
and is there a good site where i can relearn c and c++?
it seems that i forgot it and job interviews doing me an hard time ...
...
Hi,
I am creating a small C program which will find first unattached dtach session and attach to it. However dtach does not provide a way to check unattached/attached status. Is it possible to get this information at all? (For example by directly reading sockets created by dtach?)
...
I'v followed a tutorial to use OGL tesselaton. In one of the callbacks there is a malloc and it creates a leak every time I render a new frame.
void CALLBACK combineCallback(GLdouble coords[3], GLdouble *vertex_data[4],
GLfloat weight[4], GLdouble **dataOut)
{
GLdouble *vertex;
vertex = (GLdouble *...