Jump to content
  • Advertisement

zealouselixir

GDNet+
  • Content Count

    2904
  • Joined

  • Last visited

Everything posted by zealouselixir

  1. [[stage_in]] doesn't support packed types, but you can get the same effect using the properties of your vertex descriptor's attributes. For example, if you wanted [[attribute(0)]] (which might represent position) to be laid out as three packed floats followed immediately by [[attribute(1)]] (which might represent a surface normal), also consisting of three packed floats, you'd just set the formats and offsets correspondingly, ensuring that your buffer data is packed as described: vertexDesc.attributes[0].format = MTLVertexFormatFloat3; vertexDesc.attributes[0].offset = 0; vertexDesc.attributes[0].bufferIndex = 0; vertexDesc.attributes[1].format = MTLVertexFormatFloat3; vertexDesc.attributes[1].offset = sizeof(float) * 3; vertexDesc.attributes[1].bufferIndex = 0; The struct that you use as the type of your stage_in vertex function parameter will still have each of these members aligned to 4 bytes, as you observe, but the properties will be fetched from the buffer according to the specified vertex descriptor, allowing you to store your data tightly packed.   HTH, ZE  
  2. zealouselixir

    Error in Creating a Window

    Try defining _UNICODE in your project settings. And UNICODE just to be safe, since the Win32 headers are inconsistent in which they use.
  3. zealouselixir

    [SOLVED] Driving Relays with CMOS signals

    The project isn't done yet - I've just been prototyping the timer circuit. Once the timer is done, I'll wire it into the traffic light, mount it in my living room, and post some pictures. Link coming soon (read: eventually). -ZE
  4. So my friends and I acquired a couple of traffic lights (the incandescent kind that are being phased-out in favor of LED types) and I'm trying to build a timer circuit that will turn each of the lights on as appropriate. I've got everything working, except that the output of my CMOS timer circuit (built around a 4017 decade counter) is insufficient to drive the relays controlling the lightbulbs. Here are some numbers: Power supply: 9 VDC @ 250 mA Relay specs: 9 VDC, 220ohm coil resistance I measure about 15 mA through LEDs connected to the output signals, which is roughly half of what would be needed to toggle my relays. What's odd though, is that I only get a voltage drop of about 2.2V, even when driving the LEDs directly (whereas an ideal diode should have a much higher throughput, since it becomes a near-perfect conductor once saturated. I'm not sure how nearly ideal my LEDs are.) So I'm pretty sure that even with a more powerful voltage source, my output currents are going to be insufficient, and I'll need to use a Darlington transistor configuration to drive the outputs. Does anyone have experience with Darlington DIPs like the ULN2804 family? Would they be able to drive a relay at 9 VDC @ 30 mA, given the above numbers? Thanks for any help you electronics tinkerers can provide. Regards, ZE [Edited by - ZealousElixir on October 3, 2006 3:47:43 PM]
  5. zealouselixir

    [SOLVED] Driving Relays with CMOS signals

    Thanks guys, that worked brilliantly! -ZE
  6. zealouselixir

    Non halting Input/Keyscan function

    I think I did this ages ago by first calling kbhit, then calling getch/getchar if the return value was true. Not sure if that'll do the job for you, though. Regards, ZE
  7. zealouselixir

    Editor

    If you've got an editor that allows you to change the position and other properties of an object in memory, then the hard part is done. Your question is analogous to, "What's the best model format?" And the answer is the same. If you already have technology in your demo/engine/whatever to load a specific model/world format, you might want to use that. Otherwise, you might want to devise your own object format. In any case, loading and saving objects and their properties is as simple as being able to parse objects into the requisite data and writing that out to a file or other storage, then being able to perform the inverse operation (reading a chunk of memory and parsing it into objects). So, from that viewpoint, you'll probably find a few references online about how to stream objects, but beyond that, it's up to you to decide just what information is important to save. It's open-ended, and it will change as the data needs of your application change. HTH. Regards, ZE
  8. zealouselixir

    [4E4] #28 Call of Booty

    It chugs pretty awfully on my laptop (Mobility 9200 with crap drivers from '03), like 3 FPM. But, I look forward to playing it on my other system back home over Christmas (geForce 3 ti500, so should be on par with what you see). Good to see that you're still developing actively, Ian. Best of luck in the contest. Regards, ZE.
  9. zealouselixir

    OpenGL Projects using Visual C++ 6.0

    I'm sure someone's going to beat me to this, but here's my shot at answering. 1) You'll want to create a Win32 Application, since you desire to target the windows subsystem rather than the console subsystem. 2) A workspace contains projects. A project is a collection of files that are used to build one unit, such as a library or executable. The workspace collects these projects together into a sort of virtual portfolio for the whole "solution." The simple answer is, as a beginner you'll only have one project per workspace, so don't worry about it. 3) Exercise for the reader. Start by right-clicking the project name and selecting properties. Keyword: link. 4) I wouldn't have any idea. Odds are that most of them are Win32 projects, if the book mostly covers graphics-oriented games. Later, ZE.
  10. zealouselixir

    My ball physics example program

    Great effort. I noticed I was able to break the simulation by adding about 30 balls. Energy was obviously being created, and things were getting stuck midair, presumably because of conflicting collisions. Fun to play with, though. Later, ZE.
  11. zealouselixir

    Hmm quick help wtih Windows Programming

    Also, you never actually call GetSystemMetrics in your code. I'll let you figure that one out. -ZE
  12. zealouselixir

    I've been accused of plagiarism

    As long as you're going to break his analogy... Cars are not essays. Completely overlooking the illegality of odometer fraud, what's implicit in the sale of a car is a certain degree of fitness, and the mileage is one indicator of fitness: the car with a certain falsified mileage is "less fit" for the same type of use as one with the same mileage (legitimately). In essay-writing, indeed in any academic assignment, there is no need for an assertion of useability, as it were. If the requirements of the assignment are met, then a piece of work which is the work of the purported author is a valid submission, even if it has previously been created to fulfill other requirements. -ZE
  13. zealouselixir

    Ascii definitions

    It's not quite like that. When programs are compiled, they're written in a very compact and low-level machine language. In order to make reading the code an even-close-to-human feat, you'd need to disassemble it. The byte sequences you've posted have no meaning as function calls or any other entity; they're simply the machine code that the original source code of the program translated into when compiled. -ZE
  14. zealouselixir

    Dragosta din tei - makes me wanna kill myself

    It might be good, if it said something meaningful rather than repeating the chorus eight times... You want to leave but you don't want don't want to take me, don't want don't want to take me, don't want don't want don't want to take me.... -ZE
  15. zealouselixir

    Hmm quick help wtih Windows Programming

    Inserting a GetScrollInfo (hwnd, SB_VERT, &si); in your WM_VSCROLL handler (prior to the assignment to vsbPos) will fix the non-scrolling bug. As for why only one line is drawn, in your WM_PAINT handler, change int y = cyChar * (1 - vsbPos); to int y = cyChar * (i - vsbPos); King me. -ZE
  16. zealouselixir

    This problem is soo annoying

    Section 5. -ZE
  17. zealouselixir

    Official Half-Life 2 thread (No spoilers allowed!)

    Quote:Original post by Prozak ZealousElixir, that plain sucks... can't you ask for a friend's CC, and transfer the money to their account? They finally accepted my transaction after a few more attempts. Now if only Sony would update their Mobility Radeon drivers, things might be good in the world. As it stands now, I'm screwed out of 60 bucks and left with 5 gigs of local cache and a broken heart. Somehow, I knew it would turn out like this. -ZE.
  18. zealouselixir

    Half Life 2: Depends

    Can't say I ever attached a trip mine to a human. What a horribly sadistic thing to do...
  19. zealouselixir

    Half Life 2: Depends

    Quote:Original post by nes8bit Quote:Original post by lethalhamster Nes, the game kicks ass. I have played it for about 2 hrs. (my parents wont let me play any more) [sad] It is like... 1000 times better than the Bink videos and all the reviews combined! It is definatly worth the money [smile] I woulnd't know because the fucking game won't install. I too wouldn't know because, while it looks awesome when it runs, the audio stutters and constant (no, I mean it - effing CONSTANT) video driver auto-restarts make it utterly unplayable. Don't get me wrong - I'd love nothing more than to upload my graphics drivers; it just so happens that Sony and ATi collectively suck when it comes to Mobility Radeon 9x00 driver upgrades. I could use the Omega (MultiRes) drivers. I could use the DNA 4.x.x drivers. They both look fantastic, but they both crash after less than half a minute of gameplay. I'm sick of this game already and it breaks my heart. Valve, Vivendi, ATi, Sony, Sierra, you all suck a fat one. Later, ZE.
  20. zealouselixir

    Official Half-Life 2 thread (No spoilers allowed!)

    Thanks Valve and Compass Bancshares! I'm happy to know that I've been identified as a criminal because your software packages don't work together. I guess I'll just sit on the sidelines until you decide to support the product you've burdened the consumer with. Have a nice day. Later, ZE.
  21. zealouselixir

    test my grass demo

    Quote:Original post by mikeman Personally,I like it better with blending off.And why whould it be more realistic,I mean I don't think grass is transparent anyway. True 'nuff, but there are physical properties of grass that aren't modelled by this simple rendering method, things like subsurface scattering and true translucency. So, blending isn't necessarily an unrealistic addition. It certainly aids jaggies which occur at a distance. Matter of visual preference as a whole, though. Later, ZE.
  22. zealouselixir

    Game Engine Design

    Luke wrote a decent overview here. It doesn't delve much into implementation, but it's probably the best one-pager on game engines I've seen. Jake Simpson of course wrote the massive Game Engine Anatomy 101. It doesn't go into anything related to code, but nor does it go into design of specific subsystems. I second the notion that COTC is more oriented to design. It's got some great, well-developed ideas. Eberly (along with a few others who worked on NetImmerse) wrote this for the IEEE. And, our own Rich Fines wrote Enginuity, which is a thought-provoking series, if uberOOP'd. You won't find a comprehensive tutorial set online about doing this kind of thing, but assimilating the above material and looking into printed matter on the subject will give you a good start. Later, ZE.
  23. zealouselixir

    whats this error mean??

    Is the function you've defined declared in a header file, and is that header file included in the file which is using your function? -ZE
  24. zealouselixir

    [tutorial 10] trouble with normals

    edit: I see vinc slid in there and rounded out the final four questions before me. I'll leave these just for posterity and extra support, even though they're less complete than his in some ways. :) 2) You have to ensure that the normals point in a direction consistent with their front-face direction, determined by their winding order and your cull-face settings. 3) You are sending the vertices in a given winding order, most likely. If those vertices are, respectively: v0, v1, v2; then I believe the proper cross is (v0-v1) x (v0-v2). This should result in a normal facing in the "front" face direction. I could be wrong about this, though. 4) I do. Your normals only get normalized if GL_NORMALIZE is enabled, and that can incur unnecessary overhead if *some* of your normals are unity length to begin with. On the other hand, the normalization might be optimized on the graphics hardware and might be ultimately faster than doing it manually, especially if you use a dumb algorithm on a dumb compiler (i.e., resulting in three actual FDIVs for a normalize operation). 5) If nothing else I've said was incorrect, yes, as long as all the vertices are co-planar. Later, ZE.
  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!