Advertisement Jump to content
  • Advertisement

GreyHound

Member
  • Content Count

    107
  • Joined

  • Last visited

Community Reputation

150 Neutral

About GreyHound

  • Rank
    Member
  1. Hi, just read your email, the project where i translated the code to glsl. I don't have the time right now but i remember beeing "weight" to refer the weights related to 4 of the bones, which was the limit of influences for a vertex. Also matrix[86] contains the current state of the bones, hence limiting the amount of bones to 87/3 = 29. This was pretty easy once i knew what the opcode stands for ;) Sorry i can't supply the glsl shader anymore.
  2. GreyHound

    Distorted freetype fonts

    Thanks, great help. In my case i had to use: glPixelStorei(GL_UNPACK_ALIGNMENT, 2);
  3. GreyHound

    GLIntercept messages ?

    Are you trying to use GLIntercept as some kind of debugger? My experience with it is that you cannot always trust the logfile output. Otherwise it would just mean what the error message says, you operate with display list that are not present.
  4. Hi, So i have this 2D tile engine which should support a lot of layers of blended textures for each grid element. The layers i mentioned are defined by a category. So i will have stuff like -terrain layer -vegetation layer -building layer -weather layer -field is selected -special modfiers -etc. (but this sums up to 8+ layers at minimum, but some of them might be empty (the field has no building or so)) I am already using texture atlases to make sure i can use render an entire grid (which might contain 500x500 fields at each layer) at once using vbos and texpointers and whatnot. That's quite nice. This would still require a rendercall for each layer. ;( Let's say: 8 layers, 8 massive glDrawElements calls for 500x500 values. So i thought i could somehow devide my effort by "X" (depending on the multitex capabilities) by using multi-texturing and blend "X" layers together on the GPU. Now, this whole thing effects the way my models are represented. The first explained method will basicly just position several "models" in a way so it looks like they were stacked, where the second way actually interprets the model as one artifact. My actual problem is, i could a) try to built a suitable model (according to the render capabilities) b) use a generic model and have the renderer reinterpret it depending on the capabilities. I hope i was able to state my problem, and i'm very happy for any response. P.S: Changes in my "Model" are quite seldom (in gfx specific terms), it's a map editor for Civilization 4 tbh. Greetings Edit: Model * model; if(gfx.hasMultiTexturing()) model = new MultiTexturedGrid(scenario); else model = new BruteForceGrind(scenario); renderer->render(model); or Model * model = new GridModel(scenario); renderer->render(model); //... and Renderer::render(Model * m) { if(gfx.hasMultiTexturing()) //multitex rendering else //usual rendering } I thought i'd rather go with specific models, even if it couples the render specs to the models. But since the renderer should have compartible data structures to be effective, i don't want the renderer to have to take his hands on the data structure. [Edited by - GreyHound on February 9, 2010 2:42:30 PM]
  5. Hey, i was wondering if there is a way to extract the documentation for my script interface using the src files i used to implement the scripting interface. I use c++ together with python for scripting. Is there a way to use something like doxygen, define some kind of special tags to define "python comments" and then run doxygen in a way to generate documentation for those special signs? Doxygen is just an example in this case, but i think you get the idea.
  6. GreyHound

    GL_MAX_TEXTURE_UNITS is wrong?

    Quote:Original post by V-man New section added to Wiki http://www.opengl.org/wiki/Textures_-_more "Max Texture Units" has been added Excellent Job, just perfect, that's the exact reason why i visited that thread. I wanted to learn about how many texture coordinates are available.
  7. GreyHound

    Devil Image is upside down

    Yep, the image is missinterpreted when it's loaded. The glScale thing is just an ugly fix which doesn't solve the actual problem.
  8. GreyHound

    [CG] Dismiss errors?

    Quote:Original post by _fastcall Quote:Original post by GreyHound I somehow think #3 will still be true on hasError() even if the call was valid Have you tried it? After i ran the following code, in a case where the geometry shaders failed, my fragment shaders were also tagged as false. CgShaderSuite::CgShaderSuite(): vertex_ok(false), geometry_ok(false), fragment_ok(false) { //basic context m_context = cgCreateContext(); //cgGLSetDebugMode( CG_FALSE ); //cgSetParameterSettingMode(m_context, CG_DEFERRED_PARAMETER_SETTING); //vertex m_VertexProfile = cgGLGetLatestProfile(CG_GL_VERTEX); if(!hasError()) if (m_VertexProfile != CG_PROFILE_UNKNOWN) { if(!hasError()) cgGLSetOptimalOptions(m_VertexProfile); if(!hasError()) vertex_ok = true; } //geometrycgGLIsProfileSupported( m_GeometryProfile = cgGLGetLatestProfile(CG_GL_GEOMETRY); if(!hasError()) if(m_GeometryProfile != CG_PROFILE_UNKNOWN) { if(!hasError()) cgGLSetOptimalOptions(m_GeometryProfile); if(!hasError()) geometry_ok = true; } //fragment m_FragmentProfile = cgGLGetLatestProfile(CG_GL_FRAGMENT); if(!hasError()) if (m_FragmentProfile != CG_PROFILE_UNKNOWN) { if(!hasError()) cgGLSetOptimalOptions(m_FragmentProfile); if(!hasError()) fragment_ok = true; } }
  9. GreyHound

    [CG] Dismiss errors?

    My problem is that i'm not sure if the error handling works like this: //#1 validCgCall(); if(hasError()) //will be false //#2 invalidCgCall(); if(hasError()) //will be true //#3 validCgCall(); if(hasError()) //will be false I somehow think #3 will still be true on hasError() even if the call was valid
  10. GreyHound

    [CG] Dismiss errors?

    Quote:Original post by _fastcall Erm, shouldn't it be: *** Source Snippet Removed *** ? OMG! But that's since i edited my source to post here. My actual code looks like. bool CgShaderSuite::hasError() { CGerror error; const char *string = cgGetLastErrorString(&error); if (error != CG_NO_ERROR) std::cout << string << std::endl; if (error != CG_NO_ERROR) return true; return false; }
  11. Hi, i'm wondering if it's possible to dissmiss errors when checking for CG errors. Mayb i have a brainbug somewhere. I have the impression that i will keep getting false positives when asking if errors occured when an error occured once. I want to be able to tell CG that i handled that error and that the current state should be CG_NO_ERROR. if(CgShaderSuite::hasError()) handleError(); validCgOperation(); if(CgShaderSuite::hasError()) //seems to return true anyway Here's my error function bool CgShaderSuite::hasError() { CGerror error; const char *string = cgGetLastErrorString(&error); if (error != CG_NO_ERROR) std::cout << string << std::endl; if (error != CG_NO_ERROR) return true; return false; } How do you do that? [Edited by - GreyHound on August 20, 2009 1:53:13 PM]
  12. void GLCanvas::OnIdle(wxIdleEvent &event) { Render(); /* Force the redraw immediately, gets the gfx card to its max */ event.RequestMore(); }
  13. GreyHound

    Weird gl.h syntax errors in VS2005

    I don't think gl.h should contain the string "GLUT" at all.
  14. GreyHound

    Alpha Blending in Ortho 2D mode

    You don't accidently have the clear color of your scene set to alpha 0.5f?
  15. You might want to look into the function when copying big chunks of data that you don't want to cut into peaces. ILuint ilCopyPixels( ILuint XOff, ILuint YOff, ILuint ZOff, ILuint Width, ILuint Height, ILuint Depth, ILenum Format, ILenum Type, ILvoid *Data); or ILboolean ilOverlayImage(ILuint Src, ILint XCoord, ILint YCoord, ILint ZCoord); ILboolean ilBlit(ILuint Src, ILint DestX, ILint DestY, ILint DestZ, ILuint SrcX, ILuint SrcY, ILuint SrcZ, ILuint Width, ILuint Height, ILuint Depth); which is probably more suitable in your case. You can probably reduce your code immense using those functions instead of your custom method. Also i think (not 100% sure tho) your array indexes should more look like (x+y*width)*bpp instead of (x+y*width*bpp) You could also use ILboolean iluScale(ILuint Width, ILuint Height, ILuint Depth); http://openil.sourceforge.net/docs/DevIL%20Manual.pdf
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!