« first day (415 days earlier)      last day (4531 days later) » 

How politically correct.
 
ha, found the problem
my main window was a QMainWindow, not a QWidget
in a QMainWindow, you need to first set a CentralWidget before you can put stuff in it
so fuck the QMainWindow
 
Well, if you want docks, then you want QMainWindow.
 
That's one aspect of Qt that I don't like so much. If you do something wrong you can spend a long time figuring out why. I think many of such errors could/should be reported at compile time.
 
k
now I have to prevent my buttons from resizing when the window resizes
 
1:11 PM
I don't think that can be detected at compile time.
 
I'm sure there's a simple way to do that
 
setMaximumSize
Or setSizePolicy.
 
What about preventButtonsFromResizingWhenTheWindowResizes()?
 
That'd be Swing.
 
sbi
> Apple announced it no longer uses CarrierIQ in iOS5. I'm sure this means that they have their own surveillance software running, not that they're no longer conducting surveillance on their users. — Bruce Schneier
@CatPlusPlus Me.
In fact, the only UI framework I ever worked with was VCL, and that is 15 years ago.
 
1:19 PM
wow
guess you don't generally write software with GUI's or you don't like doing GUI's?
 
Who likes doing GUIs?
4
 
Doing GUIs is always a freaking mess.
 
According to the tech sites carrierIQ didn't even do anything in ios
 
1:21 PM
It was just one big noop.
 
sbi
@LexiR According to Carrier IQ they didn't do anything anywhere. Or at least not something bad. Or their software did, but it never reported back. Well, usually, that is...
I freely admit I lost track of their current confession level.
 
btn->setSizePolicy(Policy::Fixed); Why is this wrong???
the Policy enum is public in the QSizePolicy class
 
QSizePolicy::Fixed.
 
> error C2248: 'QSizePolicy::QSizePolicy' : cannot access private member declared in class 'QSizePolicy'
ugh
 
Unless you're in C++11 mode, enums don't create a new scope.
 
1:33 PM
no
I'm using VS2008
so no C++11
 
Sigh, templates make linker errors so much harder to read.
1>Map.obj : error LNK2019: unresolved external symbol "class std::vector<unsigned short,class std::allocator<unsigned short> > __cdecl Wulf::CompressionTools::RLEWExpand(class std::vector<unsigned short,class std::allocator<unsigned short> > const &,unsigned short)" (?RLEWExpand@CompressionTools@Wulf@@YA?AV?$vector@GV?$allocator@G@std@@@std@@ABV‌​34@G@Z) referenced in function "public: __thiscall Wulf::Map::Map(unsigned short)" (??0Map@Wulf@@QAE@G@Z)
 
std::vector<unsigned short> Wulf::CompressionTools::RLEWExpand(const std::vector<unsigned short>&, unsigned short)
 
sbi
@CatPlusPlus CompressionTools
 
Right.
 
sbi
@CatPlusPlus I guess that proves @Lexi's point.
 
1:36 PM
No, I wasn't paying attention to the name.
 
sbi
@CatPlusPlus Yes, but it still proves his point. Had the function been unsigned char* Expand(unsigned char*, size_t) you wouldn't have needed to pay attention.
 
I'd still make at least one typo in the name. :P
 
Was it always possible in C to assign structs?
 
I think so, you always could pass them by value.
 
1:51 PM
Whoops, looks like I failed to anticipate how big the debug output would be
 
@RMartinhoFernandes: Aren't you the <chrono> expert? Maybe you can help this guy.
 
Do you guys know which kind of assembly code is needed to retrieve a value from a reference in memory? Is it just a regular load of an address?
if it's a call by reference argument
 
Define "reference in memory".
 
@LexiR Is this an ascii 3D renderer? Like ASCII-Quake?
 
An incoming argument, that's a call-by-reference
 
1:54 PM
How references are implemented is an implementation detail of the compiler.
 
let's say foo(int &a)
{
int b = a++;
}
 
It could be a pointer, but it doesn't have to be.
 
If I want to retrieve a inside the function
 
Why are you writing assembly, anyway?
 
@KerrekSB No, but that output's supposed to be a kind of ascii overview map thing.
 
1:55 PM
@CatPlusPlus Compiler course =)
 
It could be like foo(int *a) { static_assert(a != nullptr); int b = *a++; }
(Pseudocode, obviously, if you're about to nitpick on static_assert).
But really, writing a C++ compiler is crazy.
 
@LexiR Ah, like Nethack. Very good.
 
@ManofOneWay depends on how the compiler implements it, of course. But assuming (and this is likely if the function doesn't get inlined), that a is passed as a pointer, then yes, it's just a load (or move) instruction, where a is the address you want to read from
but check the asm generated by the compiler.
 
Yeah it should be like that right?
Since it's passed as an address
of course the address has to point to something allocated in memory
 
Addresses tend to point to memory.
 
1:59 PM
but that's not my problem if I just want to know the ASM instruction for loading the value
 
@ManofOneWay well, look at the compiler's generated assembly, since it does what you need in the above case :)
 
But if it's a reference it must point to allocated memory , as you pointed out with static_assert
I don't have a compiler =)
 
why not? They're free, you know ;)
 
these are theoretical questions
 
2:00 PM
so? You can still try it out with a non-theoretical compiler
 
yeah true
 
in theory, references don't have to be passed as pointers. So in theory, the way to get the referenced value might be practically anything
you're asking a real-world question, assuming that compilers actually implement it in a certain way. So test it on a compiler which implements it that way :)
 
@RMartinhoFernandes "ASCIIcking!"
 
2:20 PM
1
Q: pimpl-idiom in template; which smart pointer?

OHolmesI usually use a boost::scoped_ptr for pimpl's (for one reason because then I don't get surprises if I forget to deal with the copy constructor) With templates however I can't just put the destructor in the cpp file where the impl is fully defined in order to fulfill the requirements of scoped_p...

Pimpl and templates don't mix, right?
 
@RMartinhoFernandes Sometimes they do
 
@KerrekSB Right, but that's not what is on that question.
 
@RMartinhoFernandes True, the question doesn't really make sense. Cargo cult programming?
 
Possibly. Maybe the OP found out about pimpl and fell in love with it, like some people do with singleton.
 
The "use shared_ptr" answer is lol.
 
2:30 PM
@RMartinhoFernandes How awesome would an abstract singleton factory be that creates singletons with pimples?
 
SingletonPimp.
 
0
A: my own implement C++ operator of string

Kate GregoryYour operators should return Mystring& not just Mystring. That enables chaining like this. Try testing simpler things first: s2 = s3 + ","; s2 = "," + s3; s3 = s1 + s2; before moving on to chaining: s2 = s3 + "," + s1; that way you can tell what the issue is more clearly.

 
The "implement your own string" assignments are so fucking dumb, I don't even.
 
@CatPlusPlus I'd say they're definitely not good introductory C++ problems. Perhaps once you get to the details of resource management it might be a useful exercise, but I'd classify that as "advanced".
 
Xeo
Interesting
 
2:40 PM
BUT C++ MEMORY MANAGEMENT POINTERS SPEED PERFORMANCE.
 
Xeo
my VS11 dev preview's devenv.exe is not a valid Win32 application any more
 
Linked lists I can understand, but string doesn't teach you anything.
 
@Xeo Bacteria.
 
Other than C string management wrapped in a class, which is so useful in C++.
 
Xeo
Implementing a deque would teach much. Although it would make the head of many people hurt, with the O(1) requirement for operator[] :D
 
2:43 PM
how would you move a file to another dir with boost::filesystem? Use rename?
 
Xeo
Hm, I wonder why std::basic_string doesn't have a template<size_type N> basic_string(charT (&str)[N]) constructor. Would save a call to strlen.
 
Do it like Apple: copy, and use RAII to ensure deletion of the original, even in the event of failure.
 
Xeo
@RMartinhoFernandes Wtf?!
 
Is this how Apple does it?
 
2:46 PM
Was until OSX 10.6.
 
Xeo
Ouch
That hurts
 
What do you mean with ensure deletion of the original?
 
The original was always deleted.
Even if the copy failed.
 
(Of course, this only applies across volumes. Inside the same volume it's a rename.)
 
2:49 PM
std::string(const char * str); // deletes 'str'???
 
Xeo
No, he's talking about renaming/moving things on OSX
 
sbi
@KerrekSB Actually creating a string class is a pretty good exercise in operator overloading. A string class can have =, +=, +, and [], which covers a lot of ground. IME, however, it is best to reduce the problem to operator overloading and let the students store their data in a vector. Implementing manual memory management would be another exercise, later.
 
class MyString : public std::string {}; // Done.
 
2:52 PM
I never liked + for strings.
 
I like my +s commutative.
 
sbi
@RMartinhoFernandes Use & instead, then. :)
 
+ is delicious.
 
Yay, repcap.
 
2:53 PM
The lost rep should be distributed among the poor.
 
sbi
I have found that it is pretty hard to find good exercises for operator overloading. It's a much over-hyped feature of C++, which (maybe except for =) you should rarely ever use.
 
The lost rep goes to Jon Skeet.
 
sbi
@StackedCrooked Distribute all teh rep!
@CatPlusPlus Any rep going to Jon Skeet is lost rep.
 
Isn't complex numbers the primary example of overloading operators?
 
Xeo
2:54 PM
Effective C++oncurrency
 
@CatPlusPlus BUT COMPLEX NUMBERS COMPLICATED SQUARE ROOTS.
 
There is no square root operator!
 
Should be.
 
sbi
@CatPlusPlus Yeah, but it's not very educational. Which operators do you want to overload for this?
 
What is the smallest library to bring up some non-animated graphics on Windows?
 
2:56 PM
+, -, /, *, <, <=, =>, >, ==, !=.
 
complex<double> x = 10 + 5 * √(-1);
@CatPlusPlus Too tiring.
That's a lot of operators, but little is gained beyond a couple of them.
 
@FredOverflow > 7 Dec 2012
Dammit.
 
And >>, << for ostream.
Oh, wait, you can't compare complex numbers.
 
sbi
@CatPlusPlus Yeah, but +, ` -, /, and *` are all the same, and so are <, <=, =>, >, ==, and !=. Actually, that's just two kinds of operators, and syntactically they are the very similar, too. And all of them a string class has, too, plus it has [], which is quite different.
 
@CatPlusPlus That pretty much sums up iostreams :)
I mean as an emoticon.
 
Xeo
2:59 PM
>, <
 
sbi
@CatPlusPlus Oh yeah, strings have those, too. I forgot a lot when I listed them off the top of my head.
 
Besides, I'm just stating that I've always seen complex numbers used for that.
 
(√) = sqrt -- It works!
 
Xeo
haskell?
 
I don't think that symbol really fits for an infix operator. :P
 
3:03 PM
*Test> :browse Test
(*** Exception: <stdout>: hPutChar: invalid argument (character is not in the code page)
Damn.
 
sbi
Really, that makes arithmetic operators (you forgot += etc., BTW) and the pretty similar comparison operators, plus assignment and streaming (both of which you can practice with just about any class). A string class throws in [], which are very different, and quite tricky, because you need to overload them.
 
Xeo
@CatPlusPlus Infix is with ` IIRC, not?
 
@Xeo `` makes ordinary function infix.
 
Infix operator requires two arguments.
 
Xeo
ah, right
 
3:04 PM
@CatPlusPlus Everything works for an infix operator.
You can fake prefix and postfix operators with sections.
 
0
Q: Use of const with typedef-ed type

John GathogoThe following code compiles fine on majority of compilers (include Microsoft Visual Studio's - cl, Minimalist GNU for Windows - MinGW) but fails on Digital Mars Compiler - dmc with the error: Error: type qualifiers and static can only appear in outermost array of function parameter const int MAX...

 
I wish there was an operator sex
 
People actually use DMC?
 
Xeo
struct sex{};
struct foo{
  operator sex() const { return sex(); }
};
 
mytype sex othertype produces a blended type
 
3:05 PM
(<sex>)
 
Can't do that.
 
operator 6() { return 6; }
 
Why not just stick with `sex`?
 
sbi
Oct 6 at 13:21, by sbi
@AlfPSteinbach And why on earth are they spamming the C++ room with Haskell?
Nov 30 at 16:04, by sbi
There's a Haskell room, you know.
2 days ago, by sbi
If there's so many users who love Haskell, why aren't you eager to populate that room?
 
Xeo
template<class A, class B>
struct child : public A, public B{};

template<class A, class B>
using sex = child<A,B>;
 
sbi
3:07 PM
2 days ago, by sbi
What's the problem with pasting here a link to a question there?
I am starting to dislike Haskell.
 
@Xeo child<child<child<child<child<child<...
 
Grumpy old bonobo is showing his grump
 
Yay template aliases.
 
Xeo
@CatPlusPlus yay for new typedef syntax in general
 
sbi
3:08 PM
@Xeo Sex with children is forbidden for good reasons.
 
Xeo
@sbi No! It produces a child. :(
 
Instantiates a child.
 
sbi
@Xeo Ah. Well, producing children is allowed. :)
 
lol
 
Xeo
3:10 PM
@CatPlusPlus They're like, awesome.
no more stupid typename XXX::type
 
@sbi Why are you starting to dislike Haskell?
 
sbi
@robjb Aren't the quotes I posted before that statement explaining the issue?
 
Oh, sorry. Just got here. Lack of a community, then?
 
Embarrassing remarks are not allowed!
Just wanted to say that once.
 
sbi
@robjb Head => Desk (And why on earth are they spamming the C++ room with Haskell?)
 
3:14 PM
Didn't we agree it's not C++-only room?
 
@sbi Ah alrighty, thought you meant this one (If there's so many users who love Haskell, why aren't you eager to populate that room?)
Aaaanyhow.
 
sbi
@CatPlusPlus Yeah, and I am perfectly fine this this, but the topic's been beaten to death.
Oct 6 at 13:27, by sbi
@LucDanton I'm very fine with topics other than C++, and I have no problems at all with the Haskell fetish so many here have, but you've been at this for almost half an hour at a high volume, essentially spamming the room.
 
Xeo
"Head => Desk" - that looks like a C# lambda..
 
Or PHP array.
Or Haskell type constraint.
 
sbi
@robjb Those quotes come with links which you can use to examine them in situ.
 
3:17 PM
Ruby's hash element.
 
sbi
@CatPlusPlus I have been waiting for this, you know. :)
 
@sbi: Ohh. Hah, thanks. Somehow the bright orange date didn't tip me off.
 
(Head a) => a -> Desk a
 
Lol
Slamming your head on the desk gets you a desk.
 
That doesn't make sense.
 
3:19 PM
A desk with a head!
Shush, there.
It's not supposed to make sense.
I have 113 boats in , but only 17 answers. :.
 
Language pictionary - which language am I:
0
Q: C++: Preclaration required to avoid "class" keyword in variable declaration?

Jim WitteIs the class predeclaration required by C++? This question is essentially the same as 'class keyword in declaration', so I guess I'm asking about why I get the particular errors I do in this example. Two files, one foo.h: class foo { int anInt }; and a second file (bar.h): #include foo.h // ...

 
Xeo
Holy...
 
And #include foo.h
 
preclaration?
 
@CatPlusPlus I hadn't even seen that! What next, void main()?
@StackedCrooked I hadn't seen that either -- it just keeps getting better
 
3:22 PM
Is that what they call portmanteau?
 
We need to archive this original version
 
@KerrekSB What the....
 
@StackedCrooked No, that's what they call "typo".
 
The preclaration of independery: "One day, King George, one day..."
 
3:24 PM
@StackedCrooked That's an operator.
 
Wasn't sure whether to flag for low quality or not a real question
Went with not a real question.
 
It's prefix. It increments the operand and divides C by it.
 
Xeo
lol, now @Kerrek got messages through a comment on that question xD
 
@KerrekSB seems like you have a stalker/fan.
 
@Xeo weird!!
 
3:28 PM
Lol.
At least they're not mailing you.
 
sbi
@KerrekSB Let's close this shit. Really. That question cannot be saved.
 
I had that like three times already.
 
@CatPlusPlus What? Random internet people asking you for help?
You too?
 
Hmm, the question @KerrekSB's stalker posted wasn't nearly as bad as I expected
 
Yup.
Another pioneer of new terminology:
0
Q: WRL restrictions

Hamed MahmoodiI want to write a library using c++0x cyntax and use it in another projects. As you know, public value struct could not have any methods or operators, so we must do it in such a ways like writing static methods in another class to do this for us. Also we can't write code like this : private: ...

 
3:29 PM
@sbi I want it protected :-)
 
@sbi I'm pretty sure that once made sane, it's a dupe.
 
@robjb No, it's an OK question - not sure what the discussion pertains to, there's no "duplicate" link...
 
@KerrekSB I didn't see one in the user's question list either
 
@CatPlusPlus What?
 
Hell if I know.
 
3:31 PM
@CatPlusPlus "we loose performance and it is suck."
LOL
 
@CatPlusPlus I tagged WinRT.
 
Yeah, that's a gem.
 
Just a hunch.
 
room topic changed to Lounge<C++>: We loose performance and it is suck. [c++] [c++11] [c++-faq]
2
 
OMG all that performance is now loose!
We need tighter performance.
 
3:32 PM
@RMartinhoFernandes That is suck
 
What did Microsoft call their bastardized C++ for WinRT?
 
sbi
@Beginner: Welcome to this room! There's a link to the newbie hints on the right-hand panel. You might want to skim them first.
 
@KerrekSB You, because you seem to be very proficient, and willing to help. The problem is I'm teaching C at the university. I haven't had a lot of experience with procedural programming. As soon as I start to program in C I'm thinking in the OOP way. My students also, since they've learned Java before. That's why I cannot motivate neither myself nor they to use C.. since I would be inventing C++ from scratch.
 
@Beginner But I know very little about idiomatic C. There's plenty of use for OO design, and you can do that in C, but I couldn't possibly give a meaningful answer. I think Linus said that it's a good pattern for writing filesystems. But I really have no idea.
I'm sure someone else here can give you much better insights. Just post a link to your question.
 
sbi
@Beginner Learning to do procedural programming in a portable assembler (and thereby expanding your horizon) seems to be the only reasons I can think of for teaching C today.
 
Xeo
3:36 PM
Really, they should get private messages on SO
 
@sbi How about systems programming?
 
Thank you. Linus also said that C++ is horrible language... and he is not used to give some solid arguments normally.
 
Linus can be really opinionated, I would take his statements with a grain of salt.
 
sbi
@Xeo Why? If someone wants to receive private messages, they can publish an email address for that. As we have just heard, this is a facility that will get used.
68
A: When to use C over C++, and C++ over C?

sbiYou pick C when you need portable assembler (which is what C is, really) for whatever reason, your platform doesn't provide C++ (a C compiler is much easier to implement), you need to interact with other languages that can only interact with C (usually the lowest common denominator on any pl...

 
@sbi some people like to keep SO things to SO
 
sbi
3:38 PM
@thecoshman Shrug. Se use an email address solely for SO.
 
@RMartinhoFernandes C++/CX, I think.
 
I did what I could.
0
Q: WRL restrictions

Hamed MahmoodiI want to write a library using C++/CX syntax and use it in other projects. As you know, PODs could not have any methods or operators, so we had to do things like writing static methods in another class to provide behaviour. Also we can't write code like this : private: int _D; public: ...

 
@sbi shrug fancy pants :P
 
@sbi Why this question is not at SO??? This exactly what I want to ask!
 
Lots of guesswork involved.
 
3:39 PM
Should it be tagged C++ if it's CX, though?
 
to tell the truth I do not understand the difference between SO and Programmers. I thought Programmers is more about social stuff.
but it seems it's not.
 
sbi
@robjb I would take his opinionated rants with an emetic, rather than a grain of salt.
 
It's easy. SO is the one I like. Programmers is that other one.
 
3:40 PM
@Beginner SO is about specific programming problems/difficulties/obstacles. Programmers is about non-obstacle programming questions.
 
@Beginner Linus's opinion on C++ is mostly prejudiced crap with strong roots in mythology and no real world value.
 
@sbi I was just citing Linus for an example when an object-oriented style can be useful (filesystems) even when you're writing in C (Linux).
 
sbi
@RMartinhoFernandes Programmers is the one where you can easily get 50 upvotes in a day for a C++ answer. What's not likable about that? :)
 
any hoops, any one fancy a we bash at some openGL?
as in helping with...
 
@CatPlusPlus I think it comes from the fact that C++ is much more complex. That's why you can easily produce crap. With C not so much happens implicitly... But I'm just a beginner :)
 
3:42 PM
@sbi But that's no fun.
 
It's much easier to produce crap with C than C++.
 
sbi
@thecoshman Can you try to post that again, in English?
@RMartinhoFernandes It's fun when it happens to you.
 
I'm stuck with openGL... any helpers?
better @sbi?
 
@KerrekSB Thank you, anyway.
 
0
Q: Error when trying to use VBO "array vertex_buffer_object must be disabled to call this method"

thecoshmanI am currently stuck trying to get some vertex data drawing from VBOs I keep getting caught with the following exception: Exception in thread "AWT-EventQueue-0" javax.media.opengl.GLException: array vertex_buffer_object must be disabled to call this method I will refrain from posting all ...

if anyone would be so kind... I know it's java, but its the openGL stuff I am stuck with
 
sbi
3:45 PM
@thecoshman There's no better sbi than me, I'm sure of that.
 
Haha.
 
@sbi other @sbi
 
sbi
@RMartinhoFernandes Yawn.
 
@RMartinhoFernandes well played :D
 
3:46 PM
I'd blame Java.
 
Xeo
@Beginner In C, casting happens implicitly from void*, and void* is very widely used
 
@sbi you'r German are you not? So I would be assuming that it's pronounced with a v sound, yes?
@CatPlusPlus yeah... Java... but still openGL is openGL
 
@Xeo C++ has much more implicit conversions or?
 
Anyway, do you bind a VAO before setting attrib pointers?
 
sbi
@thecoshman Our "w" is pronounced like your "v", while our "v" is pronounced either like "w" ("Vase") or like "f" ("Vogel"), depending on the word.
 
3:48 PM
how can I invite somebody to a chat, if he's not in chat yet?
 
@CatPlusPlus I believe so
 
@Beginner I think the only way is like you did with Kerrek :)
 
sbi
@Beginner I'd try "politely". Politeness always helps.
 
I was being harsh, but I hope that's not undue.
 
@thecoshman I mean glGenVertexArrays/glBindVertexArray.
 
3:49 PM
@sbi I'll stick to trying to master English
 
@Beginner I think if you @ their username they'll get a message.
 
sbi
@RMartinhoFernandes Actually it was @Kerrek doing with @Beginner.
 
That came out wrong, didn't it?
 
For drawing from a given VBO, you only need to rebind VAO, you don't need to touch ARRAY_BUFFER.
 
What would be the reason for boost::filesystem::create_directory to succeed but no dir to appear where you created it?
 
Xeo
3:50 PM
@KerrekSB Only if they were in here before I think
 
@KerrekSB Only works if he has been in chat recently.
 
@CatPlusPlus I am not using vertex arrays, using buffer objects instead... which are the more modern way of doing things
 
@RMartinhoFernandes Oh OK
 
sbi
@KerrekSB Only if they have been in the chat recently. You can't arbitrarily ping someone and have them noted.
 
@RMartinhoFernandes That's why I HATE this site.
 
3:50 PM
VAO doesn't store vertices.
 
Only if they were in chat recently.
 
It stores state relating to VBO.
 
@sbi Is that behaviour documented somewhere?
 
@CatPlusPlus what do you mean?
 
@RMartinhoFernandes There are a lot of other reasons I like it though.......
 
3:51 PM
@Beginner Well, not everyone who answers an occasional question is willing to enter into protracted discussions.
 
@KerrekSB then he could say it... or block.
@KerrekSB the idea of the site is to lock you in to answer questions...
 
Usually the benefit to the answerer is inversely proportional to the level of understanding of the asker. Quick, poignant questions are useful for everyone. Tedious explanations of little things don't help anyone but the asker...
 
@CatPlusPlus oh, is this business where you basically wrap your vertex VBO and Index buffer into a VAO so that you can draw the VAO with less calls?
 
3:52 PM
- reading -
 
Dunno about less calls, but vertex attribs don't work without VAO, AFAIK.
 
@KerrekSB I'm not talking about the discussion of the question.. about such situation as I wanted to ask you something...
 
@CatPlusPlus oh ok... not seen that mentioned any where -_-
 
@Beginner I'm not sure trying to maintain the illusion of OOP under C is a good way of teaching the language. I would instead teach them how to write procedural code in a modular and reusable manner. If they need a reference point, illustrate the similarities to OOP concepts along the way.
 
3:54 PM
@CatPlusPlus is it only the vertex data that gets wrapped into the VAO, the index data is kept in it's own buffer still?
 
VAO doesn't store any data.
 
0
Q: create directory from boost::filesystem succeeds, however no dir is created

Tony The LionI have the following code, and although the call to boost::filesystem::create_directory returns true, I see no directory created in my project folder. What could be the reason for this? boost::filesystem::path dir("newdir"); if (boost::filesystem::create_directory(dir)) std::cout <<...

this is strange
 
@TonyTheLion It will be created in current working directory.
Where are you running this from?
 
my project
just from the folder where the project is
 
@CatPlusPlus so currect me if i'm wrong, but the VAO stores what VBO it is to use and the mappings to the vertexdata, such as how the colour is stored etc
 
3:57 PM
how do I find out current working dir?
 
.
:)
 
Yeah, as far as I can understand GL.
 
@CatPlusPlus oh ok. looks like I will need potter away with this for a bit then ¬_¬
 
From my experiments, glVertexAttribPointer does not work without VAO bound, and you only need to rebind VAO to draw from a particular VBO.
 
@TonyTheLion Working directory should be where the executable was invoked from, unless the process changes it.
 
3:58 PM
I haven't used index buffers yet, but I think they're independent of VAO.
 
@robjb well, the dir isn't there
maybe I don't have permission to write to that dir
 
@CatPlusPlus can multiple VAO's share a VBO, so like one VBO can store a load of vertex data for small models, but the VAO's can be used to start reading data from different sections of the VBO
 
but that would be odd
 
@TonyTheLion I'd expect failure in that case.
 

« first day (415 days earlier)      last day (4531 days later) »