I'm glad you brought up the point of the vtable, but I am till a little unsure why the constructor for B did not throw an error since I tried to construct an object of a different type.
Type: Posts; User: jakebird451
I'm glad you brought up the point of the vtable, but I am till a little unsure why the constructor for B did not throw an error since I tried to construct an object of a different type.
I have been using C++ for a long time now, but this just blows my mind. For my example I made two classes: A and B. Class A was meant to be the interface, where B is a child of A that contains the...
Great, well I got g++ to work, but I cannot get Xcode to compile the project now. It should be just a simple fix, but it has been frustrating me. My errors are as follows:
with "#include...
For the moment, I am using the code below as my makefile. I am not sure this makes the regex gods happy, but for the moment this will have to do as I am working on juggling my other issues.
My...
My project is built using a make file. I have been using make files for a while but have yet to get into the fun parts of a make file, such as regular expressions for all the files/objects. I...
Thank you very much for all your posts, 19 posts in such a short time. I am not too sure what happened with my code when I was testing it for the supposed "incorrect case" as laserlight pointed out....
I am making various objects in my code that contain a toString() method. This method was originally intended to take in nothing and return a string object. Unfortunately, the obvious downfall occurs...
There we go, questions number one and two are solved. I also found that setting the blend color to white could also fix the problem with blending to a color.
If anyone could answer question number 3...
Thanks for the response, sorry for responding so late.
For question number one, I placed the projection order in both locations. Where is is right now, the ortho draws are drawn as 3D. However, when...
Since I have several questions at once, I thought I would post them under one thread instead of 3 separate threads.
Question #1
I'm not sure how I would use prospective and orthographic at the...
Well, I havn't made too much progress on this. In fact, I think by trouble shooting I made the problem worse. I started out with no lighting, then added in "GL_COLOR_MATERIAL" which got it work to a...
Ah, I commented that line of code out originally because it looked like I disabled lighting (this is when I wasn't calculating the normals on each plane). But I forgot about it possibly doing...
I do set the color for my object, but I did not post that piece. I disable lighting in my project and the colored blue tessellated plane displays properly as blue. Only when I try adding in my lights...
OpenGL is not just it. In fact, there is quite a bit of them:
These are all the sources are provided by "Khronos Group", the owner of the OpenGL API since July 2006.
There is also OpenAL (for...
I am finally starting to work with lighting in OpenGL, but I can't seem to get the lights to work properly. I am originally going off XoaX's tutorial #4, but I am trying to implement mine into...
I intended for the first variable to be a pointer and the rest to be normal instances. I should probably have left those variables on separate lines to avoid confusion.
The reason why I am going...
Could I use the following code?
pts = new Point3D[(tessCountX+1)*(tessCountY+1)];
Or would such blasphemy make the C++ Gods angry?
Thank you very much! I never realized that. That is a very good point, I believe I will be using vectors or new for allocations from now on. Especially when allocating for objects.
The line was originally:
Point3D *pts,left,right;
This line was to allocate a pointer for 1 dimensional array of points named "pts" while allocating local non-pointers of left and right...
Ah, I fixed it. It seems that arrays generated by malloc do not complain when instances are placed out of its designated range, but only when free() is called to clean it? But anyways, the final code...
Yes, good catch. I changed the for statement ranges to be: for (int x=0;x<tessCountX-1;x++) now. I'm not sure why that didn't just cause an abort right there. However, the same error still occurs....
I am making an object that converts any four points into tessellated plane with a certain precision. To do that, I have an array of "Point3D"s that I use to store information for where each part is...