The following warnings occurred: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Warning [2] Undefined array key "lockoutexpiry" - Line: 94 - File: global.php PHP 8.1.31 (Linux)
|
![]() |
Source file extension changes (cc to cpp) - Printable Version +- Forums (https://www.vdrift.net/Forum) +-- Forum: Project (https://www.vdrift.net/Forum/forumdisplay.php?fid=4) +--- Forum: Development (https://www.vdrift.net/Forum/forumdisplay.php?fid=9) +--- Thread: Source file extension changes (cc to cpp) (/showthread.php?tid=718) |
Source file extension changes (cc to cpp) - thelusiv - 07-08-2007 In the interest of uniformity, I have moved controls.cc to controls.cpp and likewise for vamosworld.cc. Vamos has been left alone for now. Just wanted to let everyone know for other build setups etc. - abs1nth - 07-08-2007 good! ;-) while you are at it, how about removing unused files like sound.cpp.openal/fmod? >Just wanted to let everyone know for other build setups etc. thx. i'm trying to get trunk running on Mac OS X again now, a few notes: ⢠it seems changes like "GL_MAX_DRAW_BUFFERS" require Mac OS X 10.4 instead of 10.3 (at least i couldn't get it to compile against the 10.3. SDK in my limited trying yesterday). if you think this is a bad problem speak up now, since i don't - by the time we do our next release, 10.5 will just around the corner and Apple will end support for 10.3. ⢠are you sure there were no errors merging the branch to trunk? it seems to me like some of the precompiled header changes were lost, but i can't verify it now since svnweb is down. (likely i'm just confused, though, end everything is fine ![]() ⢠i just wanted to commit some fixes but i can't seem to authenticate anymore... ⢠i have some problems producing a universal binary and especially an proper "framework" out of ODE, but more importantly right now coplanar_tri_tri() from utility.cpp collides with the one from ODE...how should i handle that? also is it ok to use ODE 0.8? - joevenzon - 07-08-2007 GL_MAX_DRAW_BUFFERS is not used at the moment, so you could really just ignore that line and set the variable to zero. Or, if supporting 10.3 isn't necessary, then leaving as it is would ensure that if it does get used down the line you won't have to change anything later. I don't think the coplanar_tri_tri() function is used anymore by VDrift. You can comment it out and everything will probably be fine. I'll go through and gut utility.cpp pretty soon. Using ODE 0.8 is fine. Note that some have reported crashes when ODE 0.8 is compiled with gimpact instead of OPCODE, although I think it's due to a bug so I'm not sure if it'd crash on OS X too or not. - abs1nth - 07-09-2007 ok i commited my fixes now, if there are any problems just revert them and tell me to find another way ;-) i'm especially not sure about the type changes in shader.h but without them i get 50+ errors in shader.cpp... it compiles now again but when trying to run i get this...any ideas? Code: Card supports: drawbuf4 auxbuf0 multitexturing8 antialiasing anisotropy16 cubemapping shaders texture_rectangle depth_texture shadow - joevenzon - 07-09-2007 It looks like there are some compilation errors with the shaders. What sort of graphics card do you have? With my NVIDIA card on Linux, the drivers have nice helpful output such as Code: ----- Start Shader Log for full ----- Anyway, I checked in a change in R1761 that disables shaders if there's a compile error. That should get you loaded up and into the game, although it won't look as pretty. - thelusiv - 07-10-2007 Another thing to note, the latest SVN is using GLEW to locate GL extensions. - abs1nth - 07-10-2007 joevenzon Wrote:What sort of graphics card do you have?it's an ATI Radeon X1900 XT joevenzon Wrote:Anyway, I checked in a change in R1761 that disables shaders if there's a compile error. That should get you loaded up and into the game, although it won't look as pretty.thanks that worked ;-) - joevenzon - 07-10-2007 I believe your card is more than sufficient do display the shaders. I'm not sure why they're failing to compile! - abs1nth - 07-11-2007 joevenzon Wrote:I believe your card is more than sufficient do display the shaders. I'm not sure why they're failing to compile! depthgen/vertex.glsl: vec3 normal = (mat3(gl_TextureMatrix[1]) * gl_NormalMatrix) * gl_Normal; ERROR: 0:11: 'constructor' : constructing matrix from matrix (reserved) full/vertex.glsl: normal = (mat3(gl_TextureMatrix[1]) * gl_NormalMatrix) * gl_Normal; ERROR: 0:36: 'constructor' : constructing matrix from matrix (reserved) etcetc, this error occurs in many vertex shaders... shadowpass/fragment.glsl: sampler2DShadow samp[4]; samp[0] = tu0_2D; samp[1] = tu1_2D; samp[2] = tu2_2D; ERROR: 0:25: 'sampler2DShadow' : samplers must be uniform ERROR: 0:26: 'assign' : l-value required "samp" (can't modify a sampler) ERROR: 0:26: 'assign' : cannot convert from 'uniform sampler2DShadow' to 'sampler2DShadow' ERROR: 0:27: 'assign' : l-value required "samp" (can't modify a sampler) ERROR: 0:27: 'assign' : cannot convert from 'uniform sampler2DShadow' to 'sampler2DShadow' ERROR: 0:28: 'assign' : l-value required "samp" (can't modify a sampler) ERROR: 0:28: 'assign' : cannot convert from 'uniform sampler2DShadow' to 'sampler2DShadow' - thelusiv - 07-11-2007 Are you sure your card supports vertex shaders? All the references to those errors I see while googling seem to refer to cards which don't support them. That in mind, I only get like 3 results... - abs1nth - 07-11-2007 thelusiv Wrote:Are you sure your card supports vertex shaders? yes ;-) edit: i guess it complains in the vertex case because mat3() takes 3 arguments but is supplied only one: mat3(vec3, vec3, vec3); // one column per argument versus mat3(gl_TextureMatrix[1]) if i replace gl_TextureMatrix[1] with gl_TextureMatrix[1][0], gl_TextureMatrix[1][1], gl_TextureMatrix[1][2] it compiles, but i have no clue if it does what it is intendet - joevenzon - 07-11-2007 Ah, well the point in doing mat3 was to take a mat4 (4x4) and convert it to mat3 (3x3) by discarding the last column and the last row. This is the same as taking a transform matrix (rotation plus translation plus scaling) and getting only the rotation part. I *think* what you're doing is correct. I'll make sure and will try fixing the remaining problem this weekend, if you haven't fixed it on your own already. Try just moving those sampler instantiations up to the top of the shader and slap uniform in front of 'em. - abs1nth - 07-12-2007 >well the point in doing mat3 was to take a mat4 (4x4) >and convert it to mat3 (3x3) by discarding the last column and the last row reading the official GLSL specification this should be done by using mat3x3 mat3x3(mat4x4); // takes the upper-left 3x3 of the mat4x4 however when i just change mat3 to mat3x3 i get this: ERROR: 0:36: 'mat3x3' : no matching overloaded function found >Try just moving those sampler instantiations up to the top >of the shader and slap uniform in front of 'em. had no luck with this, if i set it to uniform it complains that i cant assign to it because it is uniform - joevenzon - 07-12-2007 abs1nth Wrote:>however when i just change mat3 to mat3x3 i get this: I've never heard of mat3x3; mat3 is the glsl type for a 3x3 matrix, and doing mat3(somemat4var) should take the upper left 3x3 matrix. Of course, that's what I was doing, and your drivers didn't like that. I think your solution is fine, although you might have to append a .xyz swizzle to the end of the gl_TextureMatrix[1][X] bit. The shadow samplers are defined the way they are simply because it makes the code easier to read/write. I'll change how I use them to be more explicit, and hopefully it'll fix your errors. - joevenzon - 07-12-2007 Okay, I checked in changes to the shaders in the data repos, rev 32. The shadowpass fragment shader problem should be fixed. Also, I tried to fix the vertex shader problem, but I only modified the full shader. If this compiles for you and makes things work, go ahead and copy & paste to the other shaders and check in (or I can). |