eDuDe

Members
  • Content count

    37
  • Joined

  • Last visited

Community Reputation

122 Neutral

About eDuDe

  • Rank
    Member
  1. From what I understand of SOIL, I was loading the same texture but with two different methods (generating mipmaps for one, not for the other two). It is just laid out that way so I have an easier time staring at it trying to figure out what was wrong.
  2. Lesson 10: Texturing issue

    I'm loading it all from the world file given in the sample:[CODE] float x, y, z, u, v; int tris; char textline[255]; FILE *filein = fopen( "Assets/Worlds/World.txt", "rt"); ReadStr( filein, textline ); sscanf( textline, "NUMPOLLIES %d\n", &tris); sector1.numTriangles = tris; sector1.triangles = new triangle[sector1.numTriangles]; for ( int triangles = 0 ; triangles < sector1.numTriangles ; triangles++ ) { for ( int vert = 0 ; vert < 3 ; vert++ ) { ReadStr(filein, textline); sscanf(textline, "%f %f %f %f %f", &x, &y, &z, &u, &v); sector1.triangles[triangles].vertices[vert].x = x ; sector1.triangles[triangles].vertices[vert].y = y ; sector1.triangles[triangles].vertices[vert].z = z ; sector1.triangles[triangles].vertices[vert].u = u ; sector1.triangles[triangles].vertices[vert].v = v ; } } fclose(filein); [/CODE] It looked fine when stepping through the code, and I pretty much copy/pasted the tutorial project into mine with the modified texture loading and got the same result which is why I believe it has something to do with misusing SOIL.
  3. I'm runnning into a goofy texturing issue while trying to implemented [url="http://nehe.gamedev.net/tutorial/loading_and_moving_through_a_3d_world/22003/"]this OpenGL tutorial[/url] (NeHe Lesson 10), and I've narrowed it down to how I'm loading textures using SOIL. Unfortunately this appeared to be working in previous lessons so I'm kinda lost on what to do. Any ideas? [url="http://imgur.com/24gGJ"]http://imgur.com/24gGJ[/url] Should be tiled, not stretched and facing one direction. [code]texture[0] = SOIL_load_OGL_texture( "Assets/2D/Mud.bmp", SOIL_LOAD_AUTO, SOIL_CREATE_NEW_ID, SOIL_FLAG_INVERT_Y ); texture[1] = SOIL_load_OGL_texture( "Assets/2D/Mud.bmp", SOIL_LOAD_AUTO, SOIL_CREATE_NEW_ID, SOIL_FLAG_INVERT_Y ); texture[2] = SOIL_load_OGL_texture( "Assets/2D/Mud.bmp", SOIL_LOAD_AUTO, SOIL_CREATE_NEW_ID, SOIL_FLAG_INVERT_Y | SOIL_FLAG_MIPMAPS ); glBindTexture(GL_TEXTURE_2D, texture[0]); glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_NEAREST); glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_NEAREST); glBindTexture(GL_TEXTURE_2D, texture[1]); glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR); glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR); glBindTexture(GL_TEXTURE_2D, texture[2]); glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR); glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR_MIPMAP_NEAREST);[/code]
  4. I have a modified (just using classes and a different variable naming scheme) version of Lesson 10 working, but I get this weird texturing issue and the only thing I can think of is it is related to loading in textures using SOIL. I even went as far as modifying the sample code to use SOIL, and I get the same result: [url="http://imgur.com/24gGJ"]http://imgur.com/24gGJ[/url] Here is my texture loading code, which seemed to work for previous lessons (I've been doing them sequently), debug code stripped out: [code] texture[0] = SOIL_load_OGL_texture( "Assets/2D/Mud.bmp", SOIL_LOAD_AUTO, SOIL_CREATE_NEW_ID, SOIL_FLAG_INVERT_Y ); texture[1] = SOIL_load_OGL_texture( "Assets/2D/Mud.bmp", SOIL_LOAD_AUTO, SOIL_CREATE_NEW_ID, SOIL_FLAG_INVERT_Y ); texture[2] = SOIL_load_OGL_texture( "Assets/2D/Mud.bmp", SOIL_LOAD_AUTO, SOIL_CREATE_NEW_ID, SOIL_FLAG_INVERT_Y | SOIL_FLAG_MIPMAPS ); glBindTexture(GL_TEXTURE_2D, texture[0]); glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_NEAREST); glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_NEAREST); glBindTexture(GL_TEXTURE_2D, texture[1]); glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR); glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR); glBindTexture(GL_TEXTURE_2D, texture[2]); glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR); glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR_MIPMAP_NEAREST);[/code]. Any idea what is up?
  5. Thanks for pointing that out, but I'm still getting that damn unresolved external.
  6. Guess I'll post more problem since no one is looking yet: 1>Profiler.obj : error LNK2019: unresolved external symbol __imp__timeSetEvent@20 referenced in function "public: void __thiscall Profiler::Initialize(void)" (?Initialize@Profiler@@QAEXXZ) 1>D:\Documents\Project\Debug\Project.exe : fatal error LNK1120: 1 unresolved externals Soooooooooooooooo, I have no idea what the hell is wrong. I see a few examples, but they're only including windows.h, process.h, and stdio.h all of which I'm including. What gives?
  7. The internet is being unusually not helpful tonight, what headers/libs do I need for timeSetEvent? MSDN is telling me Mmsystem.h and Mmtimer.lib, but it doesn't know where Mmtimer.lib is. Help?
  8. I swear it was giving me compilation errors with the increment operator....
  9. I have a std::set, and I want to loop through all the elements and access the data inside. How the heck do I do this? I've tried just doing iterators, but I guess the ++ operator doesn't exist for std::set.... This is confusing.
  10. WOW. Yeah, I was including windows.h but I was doing it after I was including dbghelp.h. Whoops. Thanks for helping me catch that brain fart.
  11. I'm attempting to write a simple minidump project, but I'm getting a tone of errors while compiling with dbghelp.h. 1>d:\program files\microsoft visual studio 8\vc\platformsdk\include\dbghelp.h(61) : error C2146: syntax error : missing ';' before identifier 'ModuleName' 1>d:\program files\microsoft visual studio 8\vc\platformsdk\include\dbghelp.h(61) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>d:\program files\microsoft visual studio 8\vc\platformsdk\include\dbghelp.h(61) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>d:\program files\microsoft visual studio 8\vc\platformsdk\include\dbghelp.h(62) : error C2146: syntax error : missing ';' before identifier 'hFile' 1>d:\program files\microsoft visual studio 8\vc\platformsdk\include\dbghelp.h(62) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>d:\program files\microsoft visual studio 8\vc\platformsdk\include\dbghelp.h(62) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>d:\program files\microsoft visual studio 8\vc\platformsdk\include\dbghelp.h(63) : error C2146: syntax error : missing ';' before identifier 'MappedAddress' 1>d:\program files\microsoft visual studio 8\vc\platformsdk\include\dbghelp.h(63) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>d:\program files\microsoft visual studio 8\vc\platformsdk\include\dbghelp.h(63) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>d:\program files\microsoft visual studio 8\vc\platformsdk\include\dbghelp.h(67) : error C2146: syntax error : missing ';' before identifier 'FileHeader' 1>d:\program files\microsoft visual studio 8\vc\platformsdk\include\dbghelp.h(67) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>d:\program files\microsoft visual studio 8\vc\platformsdk\include\dbghelp.h(67) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>d:\program files\microsoft visual studio 8\vc\platformsdk\include\dbghelp.h(69) : error C2146: syntax error : missing ';' before identifier 'LastRvaSection' 1>d:\program files\microsoft visual studio 8\vc\platformsdk\include\dbghelp.h(69) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>d:\program files\microsoft visual studio 8\vc\platformsdk\include\dbghelp.h(69) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>d:\program files\microsoft visual studio 8\vc\platformsdk\include\dbghelp.h(70) : error C2146: syntax error : missing ';' before identifier 'NumberOfSections' 1>d:\program files\microsoft visual studio 8\vc\platformsdk\include\dbghelp.h(70) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>d:\program files\microsoft visual studio 8\vc\platformsdk\include\dbghelp.h(70) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>d:\program files\microsoft visual studio 8\vc\platformsdk\include\dbghelp.h(71) : error C2146: syntax error : missing ';' before identifier 'Sections' 1>d:\program files\microsoft visual studio 8\vc\platformsdk\include\dbghelp.h(71) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>d:\program files\microsoft visual studio 8\vc\platformsdk\include\dbghelp.h(71) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>d:\program files\microsoft visual studio 8\vc\platformsdk\include\dbghelp.h(72) : error C2146: syntax error : missing ';' before identifier 'Characteristics' 1>d:\program files\microsoft visual studio 8\vc\platformsdk\include\dbghelp.h(72) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>d:\program files\microsoft visual studio 8\vc\platformsdk\include\dbghelp.h(72) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>d:\program files\microsoft visual studio 8\vc\platformsdk\include\dbghelp.h(73) : error C2146: syntax error : missing ';' before identifier 'fSystemImage' 1>d:\program files\microsoft visual studio 8\vc\platformsdk\include\dbghelp.h(73) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>d:\program files\microsoft visual studio 8\vc\platformsdk\include\dbghelp.h(73) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>d:\program files\microsoft visual studio 8\vc\platformsdk\include\dbghelp.h(74) : error C2146: syntax error : missing ';' before identifier 'fDOSImage' 1>d:\program files\microsoft visual studio 8\vc\platformsdk\include\dbghelp.h(74) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>d:\program files\microsoft visual studio 8\vc\platformsdk\include\dbghelp.h(74) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>d:\program files\microsoft visual studio 8\vc\platformsdk\include\dbghelp.h(75) : error C2146: syntax error : missing ';' before identifier 'Links' 1>d:\program files\microsoft visual studio 8\vc\platformsdk\include\dbghelp.h(75) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>d:\program files\microsoft visual studio 8\vc\platformsdk\include\dbghelp.h(75) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>d:\program files\microsoft visual studio 8\vc\platformsdk\include\dbghelp.h(76) : error C2146: syntax error : missing ';' before identifier 'SizeOfImage' 1>d:\program files\microsoft visual studio 8\vc\platformsdk\include\dbghelp.h(76) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>d:\program files\microsoft visual studio 8\vc\platformsdk\include\dbghelp.h(76) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>d:\program files\microsoft visual studio 8\vc\platformsdk\include\dbghelp.h(83) : error C2146: syntax error : missing ';' before identifier 'DECLSPEC_IMPORT' 1>d:\program files\microsoft visual studio 8\vc\platformsdk\include\dbghelp.h(83) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>d:\program files\microsoft visual studio 8\vc\platformsdk\include\dbghelp.h(83) : error C2143: syntax error : missing ';' before '__stdcall' 1>d:\program files\microsoft visual studio 8\vc\platformsdk\include\dbghelp.h(83) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>d:\program files\microsoft visual studio 8\vc\platformsdk\include\dbghelp.h(85) : error C2065: 'PSTR' : undeclared identifier 1>d:\program files\microsoft visual studio 8\vc\platformsdk\include\dbghelp.h(85) : error C2146: syntax error : missing ')' before identifier 'FileName' 1>d:\program files\microsoft visual studio 8\vc\platformsdk\include\dbghelp.h(85) : warning C4229: anachronism used : modifiers on data are ignored 1>d:\program files\microsoft visual studio 8\vc\platformsdk\include\dbghelp.h(85) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>d:\program files\microsoft visual studio 8\vc\platformsdk\include\dbghelp.h(88) : error C2059: syntax error : ')' 1>d:\program files\microsoft visual studio 8\vc\platformsdk\include\dbghelp.h(91) : error C2065: 'CALLBACK' : undeclared identifier 1>d:\program files\microsoft visual studio 8\vc\platformsdk\include\dbghelp.h(91) : error C2065: 'PFIND_DEBUG_FILE_CALLBACK' : undeclared identifier 1>d:\program files\microsoft visual studio 8\vc\platformsdk\include\dbghelp.h(91) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>d:\program files\microsoft visual studio 8\vc\platformsdk\include\dbghelp.h(91) : fatal error C1903: unable to recover from previous error(s); stopping compilation I'm a little confused on how to fix this. I mean, its trying to compile using dbghelp.h, so it should know where it is (since its packaged with Visual Studios anyways). I'm also using #pragma comment( lib, "dbghelp.lib" ) to make sure that dbghelp.lib is being linked to. Anyone know what the problem is?
  12. Dunno if this is the best place to post this, but here goes. I'm doing somewhat extreme bump mapping so that I can have 3D lighting applied to 2D objects (texture quads). The lighting checks out, but my problem is that objects are still too flat for my tastes, and I think I've narrowed it down to the bump maps I'm generating. Right now I'm using the NVIDIA Photoshop tool to create my bump maps. The major problem with this is that the normals aren't 3D enough, they're still fairly 'flat'. I want a larger range in my normals, basically storing the normals you normally see on a 3D model. The only way I know how to do that is to render a 3D models normals to a texture and use that as my normal map. Unfortunately, the assets are purely 2D. There are no 3D models to get the normals from. Is there any witchcraft I can do to remedy this?
  13. Anybody? I've been fiddling with my program but no matter what I do I can't get the specular color to actually be anything but white. It is a little troublesome. **EDIT** So I think I figured things out (just as I bump), but it appears the specular color is directly linked to the color of the diffuse map. So since my object was blue, the only color I could have the specular be was blue or white (since it still has a blue term) and still have it show up. So since my diffuse map was probably 0xFF0000FF, it was canceling out all the other colors generated by the light when I do my final shader operation of color.rgb *= LightAccumlation.rgb; But shouldn't I still be able to have different colored lights on 'purely' colored objects?
  14. http://smg.photobucket.com/albums/v238/billerwjustin/Graphics/?action=view¤t=ScreenShot0-6.png This is what I get when using the half vector method, but like I said earlier, changing the SpecularColor to anything but white completely removes the specular highlights.
  15. Well it helped a little. I do see what appears to be specular lighting, but it looks a little off. Here are a few pictures of what I'm getting (note the mushroom thingy is the light): http://img.photobucket.com/albums/v238/billerwjustin/Graphics/ScreenShot1.png http://img.photobucket.com/albums/v238/billerwjustin/Graphics/ScreenShot2.png The dark side looks decent, but when the camera moves around, there is a distinct and abrupt color change that moves across the base plane of the object. Also, it appears that the specular lighting isn't very subtle and is pretty dominating in the scene. It also appears to be independent of the SpecularIntensity, since altering that does nothing. This getting a little worrisome since it doesn't appear to me to make any sense. Guess I'll keep fiddling with it.