Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

680 Good

About Lord_Evil

  • Rank
  1. Looks like you have a matrix ordering problem here. It doesn't necessarily have to be a problem with projection. Could you post your drawing code (using the appropriate tags)? I suspect you have some scaling as well which might be influenced by the translate due to wrong ordering.
  2. An update on the controls: It's better now, but I have a new "problem": I use a German keyboard, so z and y are interchanged. Thus I'd have to use the keys x, c and y on your keyboard, which I can't handle [smile]
  3. Lord_Evil

    2D Texture Arrays

    I've not used texture arrays myself yet, but you seem to just pass one texture atlas to the shader. So you always get the same layer, no matter what you set coord.z to. (From the extension description: layer = max (0, min(d - 1, floor (coord.p + 0.5)) where d = num_layers and coord.z = coord.z in your case, so max(0, min(1-1, floor(0.1 + 0.5)) would always return 0 ). You said you use a texture atlas, so there's no need to use texture2DArray at all. Keep in mind that each tile needs its own texture coordinates, so vertices can't be shared between tiles.
  4. Why do you want to have a collision sphere for single faces? If you want to get a collision sphere for an arbitrary object, there are several simple ways, one being to caluclate the bounding box and wrap that with a sphere. Thus the sphere should fit even if the object is rotated (provided the object is locally rotated around the sphere's center) There are more complex approaches to get a tighter fitting bounding sphere, but those might be too complex right now.
  5. Another point i noticed (not sure if already stated though): It's not always obvious where you can jump on and where not. For example, the first time a balloon hangs almost at the top edge of the screen, I didn't realize that there were branches of the trees in the background that I could jump on. Or it just didn't work because of physics bugs and thus I started thinking "it's just background", I don't know. Yeah, and another vote for better controls. I'm not an expert in flash games, but if a player could customize the controls in case the standard doesn't fit her needs, that would be great.
  6. Lord_Evil

    Simple? miror reflection

    Can you post some code using the [source] tags?
  7. Lord_Evil

    OpenGL OpenGL 2.0

    You need to be more specific on where you get that message and what you want to do. Did you check that OpenGL 2.0 is supported by your driver at all? What's the result of if (GLEW_VERSION_2_0) ... ? Additionally, since you already have GLEW, try running glewinfo.exe and check glewinfo.txt afterwards.
  8. Lord_Evil

    OpenGL OpenGL 2.0

    OpenGL can't be downloaded, just the header libraries for it. The implementation is provided by your driver. Try using libraries like GLEW to get OpenGL extensions/functions. GLEW also provides a command line tool that queries your driver for what it supports.
  9. Lord_Evil

    Summing pixels within triagle?

    Well, fragment shader operations are independent of each other, so you can't just sum the colors in a fragment shader directly. Maybe you can write the sum to an intermediate buffer, e.g. a texture, but I'm not sure that's possible. Could you use OpenCL? I've not used it myself but I guess it should be possible to do what you want with OpenCL.
  10. Lord_Evil

    Summing pixels within triagle?

    You'd need to access the exact pixel positions and account for corner cases (like a pixel being on the edge of a triangle, maybe just touching it). Additionally, since the triangle's size in pixels depends on the resolution, the only way that I can think of would be to render the triangle to a texture or the screen (and read the screen pixels) and then calculate the sum. If you just render the triangle to a black texture you might even let the OpenGL implemenation handle the corner cases, since adding black (0,0,0) should not change the final result. Or do you mean how to get the color values of just the vertices?
  11. Matrix operations are not allowed within a glBegin/glEnd block, so you need to use two blocks instead. On the other hand, since you're using immediate mode (which btw is discouraged and deprecated since OpenGL 3.x) you could calculate the transforms yourself and use one block.
  12. Are you sure your texture supplies an alpha channel? If not, alpha might be just 1 for all texels. Addionally, keep in mind that there are several stages involved: 1. Getting the incoming fragment's color through "multitexturing", i.e. calculate the color from the vertex color and/or texture (glTexEnv and the like) 2. Calculating the destination fragment's color by applying a blend function (glEnable(GL_BLEND); and glBlendFunc(...)) (assuming the fragment passed depth, stencil and scissor tests etc.) So you might want to check those stages indivually. Finally, I guess you want to just display the green parts, so why don't you render a single green quad with a luminance texture applied? (I do this for colored texture mapped text, i.e. the applied texture just contains 8-bit luminance information).
  13. Lord_Evil

    OpenGL A crash happed calling glGenBuffers!

    So what OpenGL version is supported? Might you have the ARB version of that method?
  14. Lord_Evil

    Simple? miror reflection

    That's what I suspected [smile].
  15. Lord_Evil

    OpenGL A crash happed calling glGenBuffers!

    First, please use the [source] tags when posting larger portions of code. Second, your pixel format descriptor seems to be wrong: 8 , // Select Our Color Depth -> this means you'd select 8-bit coloring (MSDN: "For RGBA pixel types, it is the size of the color buffer, excluding the alpha bitplanes...") which normally doesn't work with the RGBA color type. Change that to 24. 32, // 32Bit Z-Buffer (Depth Buffer) -> older hardware sometimes doesn't support 32 bit depth buffers Please check whether a pixel format that supports OpenGL could be found. If OpenGL is not initialized properly, GLEW won't be either.
  • 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!