• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.

zerorepent

Members
  • Content count

    52
  • Joined

  • Last visited

Community Reputation

663 Good

About zerorepent

  • Rank
    Member
  1. Hi! I am trying to figure out why this code generates an error (Unhandled exception, Access violation reading location...)  when releasing the events if __NO_STD_VECTOR is defined, i.e. using the built in more simple vector class in OpenCL, but works perfectly fine using std::vector. i've been scratching my head bout this issue for quite some time now. Its like the destructor of cl::Event is called twice, once in destructor of the vector and once when leaving the scope of main. But it feels like this isn't the intended behaviour considering they are vectors of cl::Event everywhere in the c++ API of openCL, which in turn makes me believe i've overseen an obvious error in the code. Still it works with std::vector and not cl::vector...  #define __NO_STD_STRING #define __NO_STD_VECTOR #include <CL/cl.hpp> const __int64 FILE_LENGTH = 1024*128; #define NUM_WRITES 2 int main() { cl::CommandQueue commandQueues; cl::Program program; cl::Context context; cl_device_id device_id; VECTOR_CLASS<cl::Platform> platforms; VECTOR_CLASS<cl::Device> devices; cl_int error; error = cl::Platform::get(&platforms); if(error !=CL_SUCCESS)//handle error better { return false; } cl_device_type type = CL_DEVICE_TYPE_GPU; #ifdef ENCODE_CPU type = CL_DEVICE_TYPE_CPU; #endif error = platforms[0].getDevices (type, &devices); if(error != CL_SUCCESS) //handle error better { return false; } context = cl::Context(devices); cl::CommandQueue queue = cl::CommandQueue(context, devices[0]); VECTOR_CLASS<cl::Event> m_Events; cl::Buffer destinationbuffer[NUM_WRITES]; int n = 0; for(int i = 0;i<NUM_WRITES;i++) { destinationbuffer[i] = cl::Buffer(context,CL_MEM_ALLOC_HOST_PTR|CL_MEM_READ_ONLY,FILE_LENGTH,0,&error); if(error != CL_SUCCESS) //handle error better { printf("error"); } m_Events.push_back(cl::Event()); error = queue.enqueueFillBuffer<int>(destinationbuffer[i],n,0,FILE_LENGTH,0,&m_Events[i]); if(error != CL_SUCCESS) //handle error better { printf("error"); } } cl::WaitForEvents(m_Events); m_Events.clear(); return 0; } (removing m_Events.clear() doesn't change anything)   I've been requested to not use std::vector or std::string, so going with what works is not really an option.    The error occurs in both intel and amd sdk of opencl. 
  2. It is relatively easy to use gwen gui, there are samples included for several different rendering frameworks, opengl, direct2d, Allegro, SFML etc. (It takes som tinkering making direct2d work with directx but there exist some good tutorials on how to do it). 
  3. wasteful might have been a poor choice of words, but what I mean is that since I'm not using complex pattern, i.e. just filling with zero using fill seems a bit overkill. The Buffer sizes is in ranges between ~64KB and ~128MB. Using a small pattern a float seems to be rather inefficient because even if it zero:ed it still need to do size/4 memcopies. Thats why I thought maybe using unmap/map and memset might be faster, I guess my best option is to time it and compare. (or something similar to that)
  4. Hi! What is the way to fill a opencl buffer (or texture) with zeros?    cl_int errorCode; float arg = 0; //or a larger datastructure/type errorCode = m_Queue->enqueueFillBuffer<float>(destinationBuffer,arg,0,size,NULL,0); This operation seems really wasteful, but maybe I'm wrong? Is it perhaps better to use map/unmap and memset with zeros?     For example I want to create a buffer of size x, fill it with z amounts of data (z<x) and fill the rest of the buffer with zeros. Is the only option then to first write z data, and then do a fill-function call like the one above with an offset? Is it possible to intialize a buffer filled with zeros. Googling only seem to result in information about zero-copy memory (which is interesting in itself, but not what I'm looking for). 
  5. Actually this was one of the greatest dissapointments for me after buying a MBP. Before buying I just looked at the hardware and not into further details about drivers :( 
  6. I think the easiest way is to keep the vertices in mainmemory and then make the update against that and send the updated relevant parts via map/updatesubresource with write discard as MJP wrote below.
  7. Thanks! It works perfectly for the Id3d11Device1, but fails on the id3d11devicecontext1. I guess thats because I use featurelevel 11 and not 11.1 so I don't think thats an issue ^^.
  8. From what I can see you set the writeflag, but not the readflag on the vertexbuffer description, the same with the map function, you set the write flag but not the readflag (D3D11_MAP_READ), i.e. in your case you are allowed to write to the buffer, but not read from it.
  9. Hi! I am trying to use direct2d in directx11.1 with feature level 11, however i quickly run into problems, when creating a directx10.1 device you use D3D10CreateDevice1, however a similar function for directx11.1 doesn't seem to exist. I look at this example [url="http://msdn.microsoft.com/en-us/library/windows/desktop/hh780339(v=vs.85).aspx"]http://msdn.microsof...9(v=vs.85).aspx[/url] however they use ComPtr's, And I am not that familiar with using them, They declare [CODE]ComPtr<ID3D11Device> device; ComPtr<ID3D11DeviceContext> context;[/CODE] uses the regular D3D11CreateDevice function, and then uses [CODE]DX::ThrowIfFailed( device.As(&m_d3dDevice) );[/CODE] where m_d3dDevice is a ID3D11Device1. Is that a regular typecast (in the ComPtr way)? If so is it safe to do use [CODE]m_d3dDevice= (ID3D11Device1*)(device);[/CODE] I do not use ComPtrs in my project, so in this example above both are "regular" pointers.
  10. The language isn't that important as long as you choose one that is commonly used (for two reason, it's easier to get help with problems and it's easier to get a job if you want a career as a programmer). If you choose C++ or C# then I think you should use visual studio 2012. However I think you need visual studio 2010 if you want to use XNA/C#.
  11. Is there a list somewhere of which graphiccards that has drivers that support 11.1? I've heard that MS stated that all dx11 cards can support 11.1 with a software update, but I guess its just wishful thinking that AMD will do that for the 5000-series.
  12. Another thing to consider is if you want to use the deferred context (In case you use dx11, or plan to use dx11 that is). You need one buffer per object in that case, since the data-updating of the constant-buffers aren't "deferred". At least that's how I've understood it.
  13. [quote name='InvalidPointer' timestamp='1331392379' post='4920903'] EDIT 2: Actually Blizzard's a good example of the flip side. Mediocre tech, capital-A Awesome art team. [/quote] Tbh I wouldn't say that blizzard has mediocre tech considering the wide variety of hardware that their games can run on.
  14. I'd use the best tool for the job, i.e. Visual studio on windows, x-code or something similar on OS-X (though I'm not sure if X-Code is the best on OS-X or not), etc. If the target is crossplattform, I'd use a crossplattform compiler/IDE. To be honest it's really annoying to switch and fix projectsettings between different IDEs and OS;es.
  15. OpenGL

    [quote name='renega_666' timestamp='1326461065' post='4902330'] For every shader, I write a small dictionnary file that maps shader unforms names (and vertex attributes) with predefined semanctics for automatic data (such as world,view,light dir,...) and with default values for artists variables. Automatic variables are automatically binded by the engine and artist variables may be changed at runtime(they use their default values at start up). [/quote] It sounds like what I've been thinking about how to keep track of shadervariables, it should possible to write a script that analyzes shader files and outputs a dictionary file. [quote name='V-man' timestamp='1326461180' post='4902334'] I would have to say that there is no such thing in GL, however there is a function called glGetActiveUniform, perhaps it does the same thing. [/quote] hmm, I see, I'll have to look into that function, it sounds like it can do atleast parts of what [left]DirectX shaderreflection does.[/left]