Jump to content

  • Log In with Google      Sign In   
  • Create Account


iwoplaza

Member Since 06 May 2012
Offline Last Active Aug 27 2014 07:56 AM

#5175451 Efficient way to read .obj files in Visual Studio 2013

Posted by iwoplaza on 22 August 2014 - 05:54 AM

There probably are, but writing your own .obj file loader is a good challenge :). I wrote my own some time ago, and I even have my own model format now xD.

 

I used stdio's FILE to load the file line by line, and then check if the line starts with "v" (for the verticies), and if yes, it used fscanf to get the rest of the data in the line :).




#5175290 Quick Multitexturing Question - Why is it necessary here to divide by the num...

Posted by iwoplaza on 21 August 2014 - 09:22 AM

You have to devide it by two, because you are actually trying to get the average of these two textures.

Imagine that you have a red texture and a black texture. By mixing these two you would expect it to turn out as a darker red. It wouldn't, because you are not getting the average of them, you are just adding them together, so:

(red: 1.0, green: 0.0, blue: 0.0) + (red: 0.0, green: 0.0, blue: 0.0) ==(red: 1.0, green: 0.0, blue: 0.0)

BUT

(red: 1.0, green: 0.0, blue: 0.0)/2 + (red: 0.0, green: 0.0, blue: 0.0)/2 ==(red: 0.5, green: 0.0, blue: 0.0)

 

I hope it helped :).




#4996237 Need an advice on GUI-HUD for my 2D game

Posted by iwoplaza on 01 November 2012 - 10:58 AM

Than let's begin. First I will show you how my GUI works and looks.Then you can choose what you want to learn. Here is my GUI:
Posted Image
And about library that is made for GUI. Like you, I've been searching the simple way to do it, but I couldn't find it. So I begun to make my own code to render these GUI things.
Tell me what things you'd like to learn.


#4996162 Need an advice on GUI-HUD for my 2D game

Posted by iwoplaza on 01 November 2012 - 06:50 AM

I maked rendered text and own GUI for myself Posted Image. I can tell you how to do that.If you are interested , tell me and I will help you.


#4962263 Problem with functions!

Posted by iwoplaza on 23 July 2012 - 09:09 AM

Thanks to everyone, but i figured it out for myself Posted Image.


#4962236 Problem with functions!

Posted by iwoplaza on 23 July 2012 - 07:26 AM

Please proceed, and write modified piece of code.


#4944398 Multiple definition Error :(

Posted by iwoplaza on 29 May 2012 - 12:38 PM

I'm in the process of creating a program to load and display the TGA files and I have these errors when compiling:
- Multiple definition of `tgaheader '
- First defined here
- Multiple definition of `tga '
- First defined here
- Multiple definition of `uTGAcompare '
- First defined here
- Multiple definition of `cTGAcompare '
- First defined here
- Multiple definition of `tgaheader '
- First defined here
- Multiple definition of `tga '
- First defined here
- Multiple definition of `uTGAcompare '
- First defined here
- Multiple definition of `cTGAcompare '
- First defined here
- D: \Ivo\Programming\C ++\Projects\3D Anim Test\Makefile.win [BuildError] ["3D] Error 1

It isn't written, where there is an error, but apparently something has been defined several times. But I checked many times and it turns out that these variables are defined only once Posted Image . Can you help?
P. S. I am using the compiler Dev C + +


PARTNERS