Advertisement Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

256 Neutral

About zealouselixir

  • Rank

Personal Information


  • Twitter
  • Github
  • Steam
  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. zealouselixir

    [SOLVED] Driving Relays with CMOS signals

    Thanks guys, that worked brilliantly! -ZE
  5. 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]
  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


    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
  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. 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!