glEnableClientState and glDisableClientState, client and server
#1 Members - Reputation: 127
Posted 13 June 2011 - 03:16 PM
Well, what exactly is the client or server here? I am running my OpenGL program in my pc. who is this refering to?
Why we even need to disable certain capabilities. And more intriguing its about some sort of an array related thing!
The whole picture is very gray to me.
Can anyone enlighten me about this terminologies?
#2 Members - Reputation: 275
Posted 13 June 2011 - 04:04 PM
These two commands are used for specifying vertex attributs. Take a look at the Vertex Arrays to see what this have to do with arrays.
The thing why u have to enable and disable stuff in OpenGL is, because the design of OpenGL based on states.
The two commands activate or deactivate the state of a specific vertex attribute, for example u want to render a model with and without a color attribute.
#3 Members - Reputation: 3795
Posted 13 June 2011 - 04:31 PM
It appears that the gentleman thought C++ was extremely difficult and he was overjoyed that the machine was absorbing it; he understood that good C++ is difficult but the best C++ is well-nigh unintelligible.
#4 Members - Reputation: 127
Posted 13 June 2011 - 06:18 PM
When u talk about Client and Server in OpenGL, the Server is the GPU and the Client the CPU/driver.
These two commands are used for specifying vertex attributs. Take a look at the Vertex Arrays to see what this have to do with arrays.
The thing why u have to enable and disable stuff in OpenGL is, because the design of OpenGL based on states.
The two commands activate or deactivate the state of a specific vertex attribute, for example u want to render a model with and without a color attribute.
Wasn't it more efficient to pass that specific vertex attribute as a function argument, rather then an enable-disable scope?
Why we need to enable cpu/drive to do that? isn't is possible or its is an error to do so on gpu/server side?
(Im asking this, cause, i haven't yet succeeded in writing a running program.)
#5 Members - Reputation: 3795
Posted 14 June 2011 - 03:05 AM
It appears that the gentleman thought C++ was extremely difficult and he was overjoyed that the machine was absorbing it; he understood that good C++ is difficult but the best C++ is well-nigh unintelligible.
#6 Moderators - Reputation: 4633
Posted 14 June 2011 - 09:45 AM
Now it makes less sense to talk about client and server side on normal computers as most people know them. But when the client and server are on separate computers, then this distinction has a meaning. For example, the server (driver/gpu) could be the thin client you're working on which has the keyboard, mouse and screen attached to it, while the client (the computer where the program is running) could be the large corporate mainframe. The distinction between server and client in this context is kind of opposite to what functionality the computers have outside OpenGL.
#7 Members - Reputation: 127
Posted 18 June 2011 - 09:59 AM
It has to do with states associated with data on the client or the server side. Any state you enable such as lighting, texturing and blending are all on the server side (and besides, the driver is on the sever side, not the client side). The old manually managed vertex arrays application memory, for example, is an example of client side data, and the vertex arrays are enabled on the client side. With the introduction of server side managed vertex arrays, this distinction is somewhat messed up (client side commands to enable server side states).
Now it makes less sense to talk about client and server side on normal computers as most people know them. But when the client and server are on separate computers, then this distinction has a meaning. For example, the server (driver/gpu) could be the thin client you're working on which has the keyboard, mouse and screen attached to it, while the client (the computer where the program is running) could be the large corporate mainframe. The distinction between server and client in this context is kind of opposite to what functionality the computers have outside OpenGL.
thanks.
#8 Members - Reputation: 785
Posted 21 June 2011 - 12:07 AM
Nah, there is no client and server. There is just your application and the GL driver which talks to another driver which talks to the GPU.
an open source GLU replacement library. Much more modern than GLU.
float matrix[16], inverse_matrix[16];
glhLoadIdentityf2(matrix);
glhTranslatef2(matrix, 0.0, 0.0, 5.0);
glhRotateAboutXf2(matrix, angleInRadians);
glhScalef2(matrix, 1.0, 1.0, -1.0);
glhQuickInvertMatrixf2(matrix, inverse_matrix);
glUniformMatrix4fv(uniformLocation1, 1, FALSE, matrix);
glUniformMatrix4fv(uniformLocation2, 1, FALSE, inverse_matrix);






