Another C++ question, please do notify me if this forum is C-only!
:)
I'm having a vector...
vector<Person> x;
... with a class I've defined (Person).
I have several elements in this vector and I would like to save it to a file (binary (?)). And later on open up this file to retrieve... (1 Reply)
Hi
i have the following structure
struct S
{
char Mod_num;
char val;
char chr_nm_cd;
}
I am reading a 2GB file and inserting into the structure and writing into a vector.
I feel like only vector will be a right option. I tried with multimap but it is memory intensive and hence i... (1 Reply)
Hi! I need to make dynamic multidimensional arrays using the vector class. I found in this page How to dynamically create a two dimensional array? - Microsoft: Visual C++ FAQ - Tek-Tips the way to do it in 2D, and now i'm trying to expand it to 3D but i don't understand how is the operator working,... (0 Replies)
Hi! I need to make dynamic multidimensional arrays using the vector class. I found in this page How to dynamically create a two dimensional array? - Microsoft: Visual C++ FAQ - Tek-Tips the way to do it in 2D, and now i'm trying to expand it to 3D but i don't understand how is the operator working,... (1 Reply)
I modified some code I found on Wikipedia concerning maps to see if it would work before applying it to a project I'm working on that has a similar idea.
What I would want is for a user to be able to enter sentences and then be able to distinguish how many times a the person entered a word in a... (4 Replies)
Hi all,
I have a vector,the type of the element within it is list<int>,and i wanna sort this vector.So i implemented a function as a predicate for sort(the STL algorithm).Problem came when i missed the bold part in my code,g++ generated lots of error messages.And after i added the bold... (4 Replies)
Hi all, from my understanding I understand that I can use array in this manner.
struct test
{
int a;
int b;
int c;
};
test testing; //creating an array with the structer type
testing.a=1;
testing.b=2;
testing.c=3;
If I'm not wrong we can use array in this manner,... (12 Replies)
hello guys.
i'm new to c++. i've problem using two dimensional vector.
i've a project of making conway's game of life. this is the code that i have made so far.
my problem is how can i give a two dimensional vector through main.
glider.vec1 = vec; is not correct way to give a two... (2 Replies)
In AWK
For 3 individual vectors of the form:
-2.772 -9.341 -2.857
-5.140 -6.597 -1.823
-2.730 -5.615 1.159
I would like to write a script that parses line by line to (i) normalise, (ii) divide by the norm for *each* vector.
I.e.
sqrt(-2.772^2 + -9.341^2 + -2.857^2)=10.154
... (4 Replies)
Discussion started by: chrisjorg
4 Replies
LEARN ABOUT DEBIAN
glbuffersubdata
GLBUFFERSUBDATA(3G) [FIXME: manual] GLBUFFERSUBDATA(3G)NAME
glBufferSubData - updates a subset of a buffer object's data store
C SPECIFICATION
void glBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid * data);
PARAMETERS
target
Specifies the target buffer object. The symbolic constant must be GL_ARRAY_BUFFER, GL_COPY_READ_BUFFER, GL_COPY_WRITE_BUFFER,
GL_ELEMENT_ARRAY_BUFFER, GL_PIXEL_PACK_BUFFER, GL_PIXEL_UNPACK_BUFFER, GL_TEXTURE_BUFFER, GL_TRANSFORM_FEEDBACK_BUFFER, or
GL_UNIFORM_BUFFER.
offset
Specifies the offset into the buffer object's data store where data replacement will begin, measured in bytes.
size
Specifies the size in bytes of the data store region being replaced.
data
Specifies a pointer to the new data that will be copied into the data store.
DESCRIPTION
glBufferSubData redefines some or all of the data store for the buffer object currently bound to target. Data starting at byte offset
offset and extending for size bytes is copied to the data store from the memory pointed to by data. An error is thrown if offset and size
together define a range beyond the bounds of the buffer object's data store.
NOTES
When replacing the entire data store, consider using glBufferSubData rather than completely recreating the data store with glBufferData.
This avoids the cost of reallocating the data store.
Consider using multiple buffer objects to avoid stalling the rendering pipeline during data store updates. If any rendering in the pipeline
makes reference to data in the buffer object being updated by glBufferSubData, especially from the specific region being updated, that
rendering must drain from the pipeline before the data store can be updated.
Clients must align data elements consistent with the requirements of the client platform, with an additional base-level requirement that an
offset within a buffer to a datum comprising N bytes be a multiple of N.
ERRORS
GL_INVALID_ENUM is generated if target is not one of the accepted buffer targets.
GL_INVALID_VALUE is generated if offset or size is negative, or if together they define a region of memory that extends beyond the buffer
object's allocated data store.
GL_INVALID_OPERATION is generated if the reserved buffer object name 0 is bound to target.
GL_INVALID_OPERATION is generated if the buffer object being updated is mapped.
ASSOCIATED GETS
glGetBufferSubData()
SEE ALSO
glBindBuffer(), glBufferData(), glMapBuffer(), glUnmapBuffer()
COPYRIGHT
Copyright (C) 2005 Addison-Wesley. This material may be distributed subject to the terms and conditions set forth in the Open Publication
License, v 1.0, 8 June 1999. http://opencontent.org/openpub/.
[FIXME: source] 05/30/2012 GLBUFFERSUBDATA(3G)