bensmith87

Member
  • Content count

    58
  • Joined

  • Last visited

Community Reputation

202 Neutral

About bensmith87

  • Rank
    Member

Personal Information

  1. Clickable custom-shaped area

    Maybe this is the same as region from bitmap, but could you just see what color is under the mouse, and have a different color for each region?
  2. Problem getting SDL application to run properly

    [quote]However, when I try to do the first lesson I type this into the main file (SDLmain.h):[/quote] Should it not be in a "c file", as in SDLmain.c?
  3. 1 decimal point floats

    I think your idea of storing the number * 10 should work, but you may need to use round() instead of the cast?
  4. I use to love the tutorials at 3D coding [url="http://www.ecere.com/3dbhole/"]Blackhole[/url]
  5. OpenGL Mouse picking with GLSL

    I thought that this way would be easier, as it only needs to do the picking when the user clicks (so speed is not an isssue), and I already have all the rendering code, whereas I do not have any ray collision code. Anyway, I got it to work with a hack that I hope will not result in any nasty artifacts... I pass the IDs of the object to the shader as uniform integers, and scale them between 0.0f and 1.0f by dividing by 255.0f [code]fragColor = vec4(playerId / 255.0f, entityType / 255.0f, entityId / 255.0f);[/code] Will this result in any nasties?
  6. Debugging with Linux

    Straight GDB if you're into terminal stuff, otherwise most of the open source IDEs will have an interface for it, for example Code::Blocks works great.
  7. OpenGL Transparency Blocks

    I think that you can get away without sorting... The glass and tree blocks do with an alpha test as normal. Draw the water blocks last, with blending and depth writing disabled, but you will have to make sure only to draw the top blocks. This will only work if your water is level, i.e no waterfalls, as no translucent objects will be behind other transparent objects. I hope that makes sense
  8. OpenGL Mouse picking with GLSL

    I other words, I want to know if I can write exact integer values to the output of my fragment shader instead of writing float values between 0.0f and 1.0f that will get converted into the range 0 - 255?
  9. Hi, Using an OpenGL 3.1 core profile I've been trying to get mouse picking to work. I want to be able to render each object with a simple GLSL shader that outputs a color corresponding to the ID of the object, more precisely I wanted the red component to be an unsigned char that has the ID of the player that the object belongs to, the green to contain the type of object (character, building, map resource, etc...) and the blue component to contain the ID of the object. I have created a FBO with a texture for the color attachment the size of the screen and GL_RGB8 for the internal format and GL_UNSIGNED_BYTE for the type... [code]glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB8, width, height, 0, GL_RGB, GL_UNSIGNED_BYTE, NULL);[/code] I bind this FBO, render the scene with the picking shader, and then get the pixel from the texture at the mouse location. So, my questions are... [list=1] [*]Will this work? [*]How do I make the outFragColor in the shader the exact char values I want? [/list] Thanks for any help.
  10. Can you think of a better design for my website?

    [quote name='SteveDeFacto' timestamp='1295475911' post='4761500'] I need a screen capture in full resolution so I can figure out if the text is a few pixels larger than on my computer and by how much. [/quote]
  11. Can you think of a better design for my website?

    [quote name='SteveDeFacto' timestamp='1295474585' post='4761485'] Alright the font should be right now. Can I get a screen cap now? Also make sure you refresh the page or it will use the old cash of the page. [/quote] Hmm, even after clearing my cache and refreshing it looks the same.
  12. Can you think of a better design for my website?

    [quote name='SteveDeFacto' timestamp='1295473583' post='4761478'] Definitely not how it is suppose to look. Is that linux? [/quote] Yeah, Arch. Maybe I don't have a font installed that you use? I thought I had all the main ones.
  13. Can you think of a better design for my website?

    It looks a little funny on my browser [IMG]http://i52.tinypic.com/2vmiv5w.png[/IMG] But apart from that I think it looks good. Maybe the about page could be reached by clicking on the OVGL header. Also, what resolution are you targeting?
  14. Just want to wish you luck, and I will be more than happy to test it.
  15. Hello, Everyone!!

    Quote:Original post by electron_theory with survival based gameplay based on morally challenging decisions... Like in your video, where after killing the guy, you repeatably squat on his head, and then run over his body a few times in the hummer? :) Welcome, and I think you have a great start to your game.